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

Unified Diff: media/base/yuv_convert.cc

Issue 459603003: Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: media/base/yuv_convert.cc
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
index 5ad8f3079fbd552765e89ee4e0bfea37b713e2e0..4c530672bb04ded068cdb363c172aa14ebade90b 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -165,42 +165,33 @@ void InitializeCPUSpecificYUVConversions() {
// Assembly code confuses MemorySanitizer.
#if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER)
base::CPU cpu;
DaleCurtis 2014/08/12 17:01:11 Move this to the ssse3 check below.
- if (cpu.has_mmx()) {
- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX;
- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX;
- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX;
- g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX;
- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX;
+
+ g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX;
DaleCurtis 2014/08/12 17:01:11 We should probably benchmark these YUV methods to
#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
- g_filter_yuv_rows_proc_ = FilterYUVRows_MMX;
- g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic;
+ g_filter_yuv_rows_proc_ = FilterYUVRows_MMX;
+ g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic;
#else
- g_empty_register_state_proc_ = EmptyRegisterState_MMX;
+ g_empty_register_state_proc_ = EmptyRegisterState_MMX;
#endif
- }
- if (cpu.has_sse()) {
- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE;
- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE;
- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE;
- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE;
- }
+ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE;
+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE;
+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE;
+ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE;
- if (cpu.has_sse2()) {
- g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2;
- g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2;
+ g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2;
+ g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2;
#if defined(ARCH_CPU_X86_64)
- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64;
+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64;
- // Technically this should be in the MMX section, but MSVC will optimize out
- // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit
- // tests, if that decision can be made at compile time. Since all X64 CPUs
- // have SSE2, we can hack around this by making the selection here.
- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64;
+ // Technically this should be in the MMX section, but MSVC will optimize out
+ // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit
+ // tests, if that decision can be made at compile time. Since all X64 CPUs
+ // have SSE2, we can hack around this by making the selection here.
+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64;
#endif
- }
if (cpu.has_ssse3()) {
g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3;

Powered by Google App Engine
This is Rietveld 408576698