]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_imageconvert.c
Add support for more image formats to vid.stab
[mlt] / src / modules / core / filter_imageconvert.c
index 33c938802ce8762a91d1d840e24c09982cdcf8b8..20b13288194504464d38c6da780dd9948c54d1ac 100644 (file)
   u = u > 240 ? 240 : u;\
   v = v > 240 ? 240 : v
 
-/** This macro scales YUV up into the full gamut of the RGB color space. */
-#define YUV2RGB_601_SCALED( y, u, v, r, g, b ) \
-  r = ((1192 * ( y - 16 ) + 1634 * ( v - 128 ) ) >> 10 ); \
-  g = ((1192 * ( y - 16 ) - 832 * ( v - 128 ) - 401 * ( u - 128 ) ) >> 10 ); \
-  b = ((1192 * ( y - 16 ) + 2066 * ( u - 128 ) ) >> 10 ); \
-  r = r < 0 ? 0 : r > 255 ? 255 : r; \
-  g = g < 0 ? 0 : g > 255 ? 255 : g; \
-  b = b < 0 ? 0 : b > 255 ? 255 : b;
-
 /** This macro converts a YUV value to the RGB color space. */
 #define YUV2RGB_601_UNSCALED( y, u, v, r, g, b ) \
   r = ((1024 * y + 1404 * ( v - 128 ) ) >> 10 ); \