Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: media/base/media.cc

Issue 2556993002: Experiment with AVX optimizations for FMAC, FMUL operations.
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/audio_parameters.h ('k') | media/base/sinc_resampler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/media.h" 5 #include "media/base/media.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
12 #include "media/base/media_switches.h" 12 #include "media/base/media_switches.h"
13 #include "media/base/vector_math.h"
13 #include "media/base/yuv_convert.h" 14 #include "media/base/yuv_convert.h"
14 15
15 #if defined(OS_ANDROID) 16 #if defined(OS_ANDROID)
16 #include "base/android/build_info.h" 17 #include "base/android/build_info.h"
17 #include "media/base/android/media_codec_util.h" 18 #include "media/base/android/media_codec_util.h"
18 #endif 19 #endif
19 20
20 #if !defined(MEDIA_DISABLE_FFMPEG) 21 #if !defined(MEDIA_DISABLE_FFMPEG)
21 #include "media/ffmpeg/ffmpeg_common.h" 22 #include "media/ffmpeg/ffmpeg_common.h"
22 #endif 23 #endif
(...skipping 11 matching lines...) Expand all
34 35
35 private: 36 private:
36 friend struct base::DefaultLazyInstanceTraits<MediaInitializer>; 37 friend struct base::DefaultLazyInstanceTraits<MediaInitializer>;
37 38
38 MediaInitializer() { 39 MediaInitializer() {
39 TRACE_EVENT_WARMUP_CATEGORY("audio"); 40 TRACE_EVENT_WARMUP_CATEGORY("audio");
40 TRACE_EVENT_WARMUP_CATEGORY("media"); 41 TRACE_EVENT_WARMUP_CATEGORY("media");
41 42
42 // Perform initialization of libraries which require runtime CPU detection. 43 // Perform initialization of libraries which require runtime CPU detection.
43 InitializeCPUSpecificYUVConversions(); 44 InitializeCPUSpecificYUVConversions();
45 vector_math::Initialize();
44 46
45 #if !defined(MEDIA_DISABLE_FFMPEG) 47 #if !defined(MEDIA_DISABLE_FFMPEG)
46 // Initialize CPU flags outside of the sandbox as this may query /proc for 48 // Initialize CPU flags outside of the sandbox as this may query /proc for
47 // details on the current CPU for NEON, VFP, etc optimizations. 49 // details on the current CPU for NEON, VFP, etc optimizations.
48 av_get_cpu_flags(); 50 av_get_cpu_flags();
49 51
50 // Disable logging as it interferes with layout tests. 52 // Disable logging as it interferes with layout tests.
51 av_log_set_level(AV_LOG_QUIET); 53 av_log_set_level(AV_LOG_QUIET);
52 54
53 #if defined(ALLOCATOR_SHIM) 55 #if defined(ALLOCATOR_SHIM)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 95 }
94 96
95 bool ArePlatformDecodersAvailable() { 97 bool ArePlatformDecodersAvailable() {
96 return IsUnifiedMediaPipelineEnabled() 98 return IsUnifiedMediaPipelineEnabled()
97 ? HasPlatformDecoderSupport() 99 ? HasPlatformDecoderSupport()
98 : MediaCodecUtil::IsMediaCodecAvailable(); 100 : MediaCodecUtil::IsMediaCodecAvailable();
99 } 101 }
100 #endif 102 #endif
101 103
102 } // namespace media 104 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_parameters.h ('k') | media/base/sinc_resampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698