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

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

Issue 2694113002: Delete media/base/yuv_convert and dependents. Prefer libyuv. (Closed)
Patch Set: Fix media_unittests. Created 3 years, 10 months 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/BUILD.gn ('k') | media/base/simd/convert_rgb_to_yuv.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/macros.h" 8 #include "base/macros.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "media/base/media_switches.h" 11 #include "media/base/media_switches.h"
12 #include "media/base/yuv_convert.h"
13 12
14 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
15 #include "base/android/build_info.h" 14 #include "base/android/build_info.h"
16 #include "media/base/android/media_codec_util.h" 15 #include "media/base/android/media_codec_util.h"
17 #endif 16 #endif
18 17
19 #if !defined(MEDIA_DISABLE_FFMPEG) 18 #if !defined(MEDIA_DISABLE_FFMPEG)
20 #include "media/ffmpeg/ffmpeg_common.h" 19 #include "media/ffmpeg/ffmpeg_common.h"
21 #endif 20 #endif
22 21
23 namespace media { 22 namespace media {
24 23
25 // Media must only be initialized once; use a thread-safe static to do this. 24 // Media must only be initialized once; use a thread-safe static to do this.
26 class MediaInitializer { 25 class MediaInitializer {
27 public: 26 public:
28 MediaInitializer() { 27 MediaInitializer() {
29 TRACE_EVENT_WARMUP_CATEGORY("audio"); 28 TRACE_EVENT_WARMUP_CATEGORY("audio");
30 TRACE_EVENT_WARMUP_CATEGORY("media"); 29 TRACE_EVENT_WARMUP_CATEGORY("media");
31 30
32 // Perform initialization of libraries which require runtime CPU detection.
33 InitializeCPUSpecificYUVConversions();
34
35 #if !defined(MEDIA_DISABLE_FFMPEG) 31 #if !defined(MEDIA_DISABLE_FFMPEG)
36 // Initialize CPU flags outside of the sandbox as this may query /proc for 32 // Initialize CPU flags outside of the sandbox as this may query /proc for
37 // details on the current CPU for NEON, VFP, etc optimizations. 33 // details on the current CPU for NEON, VFP, etc optimizations.
38 av_get_cpu_flags(); 34 av_get_cpu_flags();
39 35
40 // Disable logging as it interferes with layout tests. 36 // Disable logging as it interferes with layout tests.
41 av_log_set_level(AV_LOG_QUIET); 37 av_log_set_level(AV_LOG_QUIET);
42 38
43 #if defined(ALLOCATOR_SHIM) 39 #if defined(ALLOCATOR_SHIM)
44 // Remove allocation limit from ffmpeg, so calls go down to shim layer. 40 // Remove allocation limit from ffmpeg, so calls go down to shim layer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool HasPlatformDecoderSupport() { 81 bool HasPlatformDecoderSupport() {
86 return GetMediaInstance()->has_platform_decoder_support(); 82 return GetMediaInstance()->has_platform_decoder_support();
87 } 83 }
88 84
89 bool PlatformHasOpusSupport() { 85 bool PlatformHasOpusSupport() {
90 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; 86 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
91 } 87 }
92 #endif // defined(OS_ANDROID) 88 #endif // defined(OS_ANDROID)
93 89
94 } // namespace media 90 } // namespace media
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/simd/convert_rgb_to_yuv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698