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

Unified Diff: media/base/yuv_convert.h

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/yuv_convert.h
diff --git a/media/base/yuv_convert.h b/media/base/yuv_convert.h
index 8f64c79689a3dfaf33a1944d23d4e1ac66655f6b..2fe5acaefac299cfac46066b68365ad19bb65318 100644
--- a/media/base/yuv_convert.h
+++ b/media/base/yuv_convert.h
@@ -22,12 +22,18 @@
namespace media {
// Type of YUV surface.
-// The value of these enums matter as they are used to shift vertical indices.
enum YUVType {
- YV16 = 0, // YV16 is half width and full height chroma channels.
- YV12 = 1, // YV12 is half width and half height chroma channels.
+ YV16 = 0, // YV16 is half width and full height chroma channels.
+ YV12 = 1, // YV12 is half width and half height chroma channels.
+ YV12J = 2, // YV12J is the same as YV12, but in JPEG color range.
};
+// Get the appropriate value to bitshift by for vertical indices.
+int GetVerticalShift(YUVType type);
+
+#define GET_LOOKUP_TABLE(type) \
rileya (GONE FROM CHROMIUM) 2014/04/22 17:57:50 Ugly macro, since we can't return a sized/multidim
scherkus (not reviewing) 2014/04/22 18:53:33 so there is some heinous syntax you can use to pas
rileya (GONE FROM CHROMIUM) 2014/04/23 21:23:51 Looks like that worked without needing to modify t
+ ((type) == YV12J ? kCoefficientsRgbY_JPEG : kCoefficientsRgbY)
+
// Mirror means flip the image horizontally, as in looking in a mirror.
// Rotate happens after mirroring.
enum Rotate {

Powered by Google App Engine
This is Rietveld 408576698