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

Unified Diff: media/base/simd/convert_yuv_to_rgb_x86.cc

Issue 242643011: Add correct support for videos with YUVJ420P color format, in the software conversion path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuvnopic
Patch Set: Created 6 years, 8 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/simd/convert_yuv_to_rgb_x86.cc
diff --git a/media/base/simd/convert_yuv_to_rgb_x86.cc b/media/base/simd/convert_yuv_to_rgb_x86.cc
index d1d6e16beb7901c097431fe118f8036bb6ed1c46..2574ecf83f52dee171fddb282d9cb8a06599c78d 100644
--- a/media/base/simd/convert_yuv_to_rgb_x86.cc
+++ b/media/base/simd/convert_yuv_to_rgb_x86.cc
@@ -9,6 +9,7 @@
#endif
#include "media/base/simd/convert_yuv_to_rgb.h"
+#include "media/base/simd/yuv_to_rgb_table.h"
#include "media/base/yuv_convert.h"
namespace media {
@@ -23,7 +24,7 @@ void ConvertYUVToRGB32_MMX(const uint8* yplane,
int uvstride,
int rgbstride,
YUVType yuv_type) {
- unsigned int y_shift = yuv_type;
+ unsigned int y_shift = GetVerticalShift(yuv_type);
for (int y = 0; y < height; ++y) {
uint8* rgb_row = rgbframe + y * rgbstride;
const uint8* y_ptr = yplane + y * ystride;
@@ -34,7 +35,8 @@ void ConvertYUVToRGB32_MMX(const uint8* yplane,
u_ptr,
v_ptr,
rgb_row,
- width);
+ width,
+ GET_LOOKUP_TABLE(yuv_type));
}
EmptyRegisterState();
@@ -52,7 +54,7 @@ void ConvertYUVAToARGB_MMX(const uint8* yplane,
int astride,
int rgbstride,
YUVType yuv_type) {
- unsigned int y_shift = yuv_type;
+ unsigned int y_shift = GetVerticalShift(yuv_type);
for (int y = 0; y < height; ++y) {
uint8* rgb_row = rgbframe + y * rgbstride;
const uint8* y_ptr = yplane + y * ystride;
@@ -65,7 +67,8 @@ void ConvertYUVAToARGB_MMX(const uint8* yplane,
v_ptr,
a_ptr,
rgb_row,
- width);
+ width,
+ GET_LOOKUP_TABLE(yuv_type));
}
EmptyRegisterState();
@@ -81,7 +84,7 @@ void ConvertYUVToRGB32_SSE(const uint8* yplane,
int uvstride,
int rgbstride,
YUVType yuv_type) {
- unsigned int y_shift = yuv_type;
+ unsigned int y_shift = GetVerticalShift(yuv_type);
for (int y = 0; y < height; ++y) {
uint8* rgb_row = rgbframe + y * rgbstride;
const uint8* y_ptr = yplane + y * ystride;
@@ -92,7 +95,8 @@ void ConvertYUVToRGB32_SSE(const uint8* yplane,
u_ptr,
v_ptr,
rgb_row,
- width);
+ width,
+ GET_LOOKUP_TABLE(yuv_type));
}
EmptyRegisterState();

Powered by Google App Engine
This is Rietveld 408576698