Chromium Code Reviews| Index: media/base/yuv_convert.h |
| diff --git a/media/base/yuv_convert.h b/media/base/yuv_convert.h |
| index 8f64c79689a3dfaf33a1944d23d4e1ac66655f6b..04407819417c3923b4eac83a7cbe6ab5e1970169 100644 |
| --- a/media/base/yuv_convert.h |
| +++ b/media/base/yuv_convert.h |
| @@ -28,6 +28,11 @@ enum YUVType { |
| YV12 = 1, // YV12 is half width and half height chroma channels. |
| }; |
| +enum YUVRange { |
| + MPEG, // [16,235] Y channel, [16,239] U/V |
|
Sergey Ulanov
2013/12/02 21:49:09
nit: Maybe call it YUV_RANGE_MPEG and YUV_RANGE_JP
rileya (GONE FROM CHROMIUM)
2013/12/02 23:10:30
It's possible that a different range may eventuall
|
| + JPEG, // Full [0,255] color range for all channels |
| +}; |
| + |
| // Mirror means flip the image horizontally, as in looking in a mirror. |
| // Rotate happens after mirroring. |
| enum Rotate { |
| @@ -62,7 +67,8 @@ MEDIA_EXPORT void ConvertYUVToRGB32(const uint8* yplane, |
| int ystride, |
| int uvstride, |
| int rgbstride, |
| - YUVType yuv_type); |
| + YUVType yuv_type, |
| + YUVRange yuv_range); |
| // Convert a frame of YUVA to 32 bit ARGB. |
| // Pass in YV12A |
| @@ -77,7 +83,8 @@ MEDIA_EXPORT void ConvertYUVAToARGB(const uint8* yplane, |
| int uvstride, |
| int astride, |
| int rgbstride, |
| - YUVType yuv_type); |
| + YUVType yuv_type, |
| + YUVRange yuv_range); |
| // Scale a frame of YUV to 32 bit ARGB. |
| // Supports rotation and mirroring. |
| @@ -93,6 +100,7 @@ MEDIA_EXPORT void ScaleYUVToRGB32(const uint8* yplane, |
| int uvstride, |
| int rgbstride, |
| YUVType yuv_type, |
| + YUVRange yuv_range, |
| Rotate view_rotate, |
| ScaleFilter filter); |