| Index: media/base/yuv_convert.cc
|
| diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
|
| index 5ad8f3079fbd552765e89ee4e0bfea37b713e2e0..2b27c1da4a9a717160e6640f84ac77c95d8bb2b4 100644
|
| --- a/media/base/yuv_convert.cc
|
| +++ b/media/base/yuv_convert.cc
|
| @@ -25,7 +25,6 @@
|
| #include "media/base/simd/convert_rgb_to_yuv.h"
|
| #include "media/base/simd/convert_yuv_to_rgb.h"
|
| #include "media/base/simd/filter_yuv.h"
|
| -#include "media/base/simd/yuv_to_rgb_table.h"
|
|
|
| #if defined(ARCH_CPU_X86_FAMILY)
|
| #if defined(COMPILER_MSVC)
|
| @@ -80,24 +79,21 @@
|
| const uint8*,
|
| const uint8*,
|
| uint8*,
|
| - ptrdiff_t,
|
| - const int16[1024][4]);
|
| + ptrdiff_t);
|
|
|
| typedef void (*ConvertYUVAToARGBRowProc)(const uint8*,
|
| const uint8*,
|
| const uint8*,
|
| const uint8*,
|
| uint8*,
|
| - ptrdiff_t,
|
| - const int16[1024][4]);
|
| + ptrdiff_t);
|
|
|
| typedef void (*ScaleYUVToRGB32RowProc)(const uint8*,
|
| const uint8*,
|
| const uint8*,
|
| uint8*,
|
| ptrdiff_t,
|
| - ptrdiff_t,
|
| - const int16[1024][4]);
|
| + ptrdiff_t);
|
|
|
| static FilterYUVRowsProc g_filter_yuv_rows_proc_ = NULL;
|
| static ConvertYUVToRGB32RowProc g_convert_yuv_to_rgb32_row_proc_ = NULL;
|
| @@ -115,31 +111,6 @@
|
| #endif
|
| typedef void (*EmptyRegisterStateProc)();
|
| static EmptyRegisterStateProc g_empty_register_state_proc_ = NULL;
|
| -
|
| -// Get the appropriate value to bitshift by for vertical indices.
|
| -int GetVerticalShift(YUVType type) {
|
| - switch (type) {
|
| - case YV16:
|
| - return 0;
|
| - case YV12:
|
| - case YV12J:
|
| - return 1;
|
| - }
|
| - NOTREACHED();
|
| - return 0;
|
| -}
|
| -
|
| -const int16 (&GetLookupTable(YUVType type))[1024][4] {
|
| - switch (type) {
|
| - case YV12:
|
| - case YV16:
|
| - return kCoefficientsRgbY;
|
| - case YV12J:
|
| - return kCoefficientsRgbY_JPEG;
|
| - }
|
| - NOTREACHED();
|
| - return kCoefficientsRgbY;
|
| -}
|
|
|
| void InitializeCPUSpecificYUVConversions() {
|
| CHECK(!g_filter_yuv_rows_proc_);
|
| @@ -251,7 +222,7 @@
|
| if (source_width > kFilterBufferSize || view_rotate)
|
| filter = FILTER_NONE;
|
|
|
| - unsigned int y_shift = GetVerticalShift(yuv_type);
|
| + unsigned int y_shift = yuv_type;
|
| // Diagram showing origin and direction of source sampling.
|
| // ->0 4<-
|
| // 7 3
|
| @@ -383,25 +354,14 @@
|
| v_ptr = v_buf + (source_y >> y_shift) * uv_pitch;
|
| }
|
| if (source_dx == kFractionMax) { // Not scaled
|
| - g_convert_yuv_to_rgb32_row_proc_(
|
| - y_ptr, u_ptr, v_ptr, dest_pixel, width, kCoefficientsRgbY);
|
| + g_convert_yuv_to_rgb32_row_proc_(y_ptr, u_ptr, v_ptr, dest_pixel, width);
|
| } else {
|
| if (filter & FILTER_BILINEAR_H) {
|
| - g_linear_scale_yuv_to_rgb32_row_proc_(y_ptr,
|
| - u_ptr,
|
| - v_ptr,
|
| - dest_pixel,
|
| - width,
|
| - source_dx,
|
| - kCoefficientsRgbY);
|
| + g_linear_scale_yuv_to_rgb32_row_proc_(
|
| + y_ptr, u_ptr, v_ptr, dest_pixel, width, source_dx);
|
| } else {
|
| - g_scale_yuv_to_rgb32_row_proc_(y_ptr,
|
| - u_ptr,
|
| - v_ptr,
|
| - dest_pixel,
|
| - width,
|
| - source_dx,
|
| - kCoefficientsRgbY);
|
| + g_scale_yuv_to_rgb32_row_proc_(
|
| + y_ptr, u_ptr, v_ptr, dest_pixel, width, source_dx);
|
| }
|
| }
|
| }
|
| @@ -545,8 +505,7 @@
|
| rgb_buf,
|
| dest_rect_width,
|
| source_left,
|
| - x_step,
|
| - kCoefficientsRgbY);
|
| + x_step);
|
| } else {
|
| // If the frame is too large then we linear scale a single row.
|
| LinearScaleYUVToRGB32RowWithRange_C(y0_ptr,
|
| @@ -555,8 +514,7 @@
|
| rgb_buf,
|
| dest_rect_width,
|
| source_left,
|
| - x_step,
|
| - kCoefficientsRgbY);
|
| + x_step);
|
| }
|
|
|
| // Advance vertically in the source and destination image.
|
|
|