diff options
author | Cédric Schieli <cschieli@gmail.com> | 2009-03-16 20:04:32 +0000 |
---|---|---|
committer | Cédric Schieli <cschieli@gmail.com> | 2009-03-16 20:04:32 +0000 |
commit | 9a10a0767c42733ca9415eca1bd164841ac1728a (patch) | |
tree | 7c5653adf5af16f6ee495f3569eb86cce0da61a6 /libswscale/yuv2rgb.c | |
parent | d0dab0ecd43651bcebc79e02c5136ac9e6a2ff28 (diff) | |
download | ffmpeg-9a10a0767c42733ca9415eca1bd164841ac1728a.tar.gz |
Add an alpha parameter to the YUV2RGBFUNC macro to ease the upcoming yuva2rgb patch
Originally committed as revision 28978 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 65af412c2c..309cb8df81 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -101,7 +101,7 @@ const int32_t ff_yuv2rgb_coeffs[8][4] = { Y = src[2*i+1]; \ dst[6*i+3] = b[Y]; dst[6*i+4] = g[Y]; dst[6*i+5] = r[Y]; -#define YUV2RGBFUNC(func_name, dst_type) \ +#define YUV2RGBFUNC(func_name, dst_type, alpha) \ static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, \ int srcSliceH, uint8_t* dst[], int dstStride[]){\ int y;\ @@ -145,7 +145,7 @@ static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSlic ENDYUV2RGBLINE(dst_delta)\ ENDYUV2RGBFUNC() -YUV2RGBFUNC(yuv2rgb_c_32, uint32_t) +YUV2RGBFUNC(yuv2rgb_c_32, uint32_t, 0) LOADCHROMA(0); PUTRGB(dst_1,py_1,0,0); PUTRGB(dst_2,py_2,0,1); @@ -174,7 +174,7 @@ ENDYUV2RGBLINE(8) PUTRGB(dst_1,py_1,1,0); ENDYUV2RGBFUNC() -YUV2RGBFUNC(yuv2rgb_c_24_rgb, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_24_rgb, uint8_t, 0) LOADCHROMA(0); PUTRGB24(dst_1,py_1,0); PUTRGB24(dst_2,py_2,0); @@ -201,7 +201,7 @@ ENDYUV2RGBLINE(24) ENDYUV2RGBFUNC() // only trivial mods from yuv2rgb_c_24_rgb -YUV2RGBFUNC(yuv2rgb_c_24_bgr, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_24_bgr, uint8_t, 0) LOADCHROMA(0); PUTBGR24(dst_1,py_1,0); PUTBGR24(dst_2,py_2,0); @@ -229,7 +229,7 @@ ENDYUV2RGBFUNC() // This is exactly the same code as yuv2rgb_c_32 except for the types of // r, g, b, dst_1, dst_2 -YUV2RGBFUNC(yuv2rgb_c_16, uint16_t) +YUV2RGBFUNC(yuv2rgb_c_16, uint16_t, 0) LOADCHROMA(0); PUTRGB(dst_1,py_1,0,0); PUTRGB(dst_2,py_2,0,1); @@ -249,7 +249,7 @@ CLOSEYUV2RGBFUNC(8) // This is exactly the same code as yuv2rgb_c_32 except for the types of // r, g, b, dst_1, dst_2 -YUV2RGBFUNC(yuv2rgb_c_8, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_8, uint8_t, 0) LOADCHROMA(0); PUTRGB(dst_1,py_1,0,0); PUTRGB(dst_2,py_2,0,1); @@ -268,7 +268,7 @@ YUV2RGBFUNC(yuv2rgb_c_8, uint8_t) CLOSEYUV2RGBFUNC(8) // r, g, b, dst_1, dst_2 -YUV2RGBFUNC(yuv2rgb_c_8_ordered_dither, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_8_ordered_dither, uint8_t, 0) const uint8_t *d32 = dither_8x8_32[y&7]; const uint8_t *d64 = dither_8x8_73[y&7]; #define PUTRGB8(dst,src,i,o) \ @@ -297,7 +297,7 @@ CLOSEYUV2RGBFUNC(8) // This is exactly the same code as yuv2rgb_c_32 except for the types of // r, g, b, dst_1, dst_2 -YUV2RGBFUNC(yuv2rgb_c_4, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_4, uint8_t, 0) int acc; #define PUTRGB4(dst,src,i) \ Y = src[2*i]; \ @@ -323,7 +323,7 @@ YUV2RGBFUNC(yuv2rgb_c_4, uint8_t) PUTRGB4(dst_1,py_1,3); CLOSEYUV2RGBFUNC(4) -YUV2RGBFUNC(yuv2rgb_c_4_ordered_dither, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_4_ordered_dither, uint8_t, 0) const uint8_t *d64 = dither_8x8_73[y&7]; const uint8_t *d128 = dither_8x8_220[y&7]; int acc; @@ -354,7 +354,7 @@ CLOSEYUV2RGBFUNC(4) // This is exactly the same code as yuv2rgb_c_32 except for the types of // r, g, b, dst_1, dst_2 -YUV2RGBFUNC(yuv2rgb_c_4b, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_4b, uint8_t, 0) LOADCHROMA(0); PUTRGB(dst_1,py_1,0,0); PUTRGB(dst_2,py_2,0,1); @@ -372,7 +372,7 @@ YUV2RGBFUNC(yuv2rgb_c_4b, uint8_t) PUTRGB(dst_1,py_1,3,0); CLOSEYUV2RGBFUNC(8) -YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t, 0) const uint8_t *d64 = dither_8x8_73[y&7]; const uint8_t *d128 = dither_8x8_220[y&7]; @@ -399,7 +399,7 @@ YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t) PUTRGB4DB(dst_1,py_1,3,6); CLOSEYUV2RGBFUNC(8) -YUV2RGBFUNC(yuv2rgb_c_1_ordered_dither, uint8_t) +YUV2RGBFUNC(yuv2rgb_c_1_ordered_dither, uint8_t, 0) const uint8_t *d128 = dither_8x8_220[y&7]; char out_1 = 0, out_2 = 0; g= c->table_gU[128] + c->table_gV[128]; |