1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

texturedspenc: Avoid using separate variables

Use the result directly, removing an unneeded cast.
This commit is contained in:
Vittorio Giovara 2015-11-23 17:02:18 -05:00
parent 7831fb9050
commit eef38316ca

View File

@ -583,14 +583,10 @@ static void rgba2ycocg(uint8_t *dst, const uint8_t *pixel)
int b = pixel[2]; int b = pixel[2];
int t = (2 + r + b) >> 2; int t = (2 + r + b) >> 2;
int y = av_clip_uint8(g + t); dst[0] = av_clip_uint8(128 + ((r - b + 1) >> 1)); /* Co */
int co = av_clip_uint8(128 + ((r - b + 1) >> 1)); dst[1] = av_clip_uint8(128 + g - t); /* Cg */
int cg = av_clip_uint8(128 + g - t);
dst[0] = (uint8_t) co;
dst[1] = (uint8_t) cg;
dst[2] = 0; dst[2] = 0;
dst[3] = (uint8_t) y; dst[3] = av_clip_uint8(g + t); /* Y */
} }
/** /**