diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-07 11:06:44 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-09 09:26:00 -0400 |
commit | e458b536052a35fe3b0f221ca3ccb308faa84f35 (patch) | |
tree | 20795367d8ab3c8addb535e23994aca5d25ebed5 /libswscale | |
parent | 6e5a8d3c9affbb242e39cea29bd44003361504d4 (diff) | |
download | ffmpeg-e458b536052a35fe3b0f221ca3ccb308faa84f35.tar.gz |
swscale: merge macros that are used only once.
This reduces source code size without affecting the binary.
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index b6561408e6..98331018c0 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -381,7 +381,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, } } -#define YSCALE_YUV_2_PACKEDX_NOCLIP_C(type,alpha) \ +#define YSCALE_YUV_2_PACKEDX_C(type,alpha) \ for (i=0; i<(dstW>>1); i++) {\ int j;\ int Y1 = 1<<18;\ @@ -413,10 +413,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, }\ A1>>=19;\ A2>>=19;\ - } - -#define YSCALE_YUV_2_PACKEDX_C(type,alpha) \ - YSCALE_YUV_2_PACKEDX_NOCLIP_C(type,alpha)\ + }\ if ((Y1|Y2|U|V)&256) {\ if (Y1>255) Y1=255; \ else if (Y1<0)Y1=0; \ @@ -432,7 +429,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, A2=av_clip_uint8(A2);\ } -#define YSCALE_YUV_2_PACKEDX_FULL_C(rnd,alpha) \ +#define YSCALE_YUV_2_RGBX_FULL_C(rnd,alpha) \ for (i=0; i<dstW; i++) {\ int j;\ int Y = 0;\ @@ -458,10 +455,7 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, A >>=19;\ if (A&256)\ A = av_clip_uint8(A);\ - } - -#define YSCALE_YUV_2_RGBX_FULL_C(rnd,alpha) \ - YSCALE_YUV_2_PACKEDX_FULL_C(rnd>>3,alpha)\ + }\ Y-= c->yuv2rgb_y_offset;\ Y*= c->yuv2rgb_y_coeff;\ Y+= rnd;\ |