From: Vittorio Giovara Date: Mon, 23 Nov 2015 22:02:18 +0000 (-0500) Subject: texturedspenc: Avoid using separate variables X-Git-Tag: android-x86-7.1-r1~252^2~1744 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=eef38316cab68aff080cf2b83c2427a734194e8d;p=android-x86%2Fexternal-ffmpeg.git texturedspenc: Avoid using separate variables Use the result directly, removing an unneeded cast. --- diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c index a351bea5f0..d2d9a3441f 100644 --- a/libavcodec/texturedspenc.c +++ b/libavcodec/texturedspenc.c @@ -583,14 +583,10 @@ static void rgba2ycocg(uint8_t *dst, const uint8_t *pixel) int b = pixel[2]; int t = (2 + r + b) >> 2; - int y = av_clip_uint8(g + t); - int co = av_clip_uint8(128 + ((r - b + 1) >> 1)); - int cg = av_clip_uint8(128 + g - t); - - dst[0] = (uint8_t) co; - dst[1] = (uint8_t) cg; + dst[0] = av_clip_uint8(128 + ((r - b + 1) >> 1)); /* Co */ + dst[1] = av_clip_uint8(128 + g - t); /* Cg */ dst[2] = 0; - dst[3] = (uint8_t) y; + dst[3] = av_clip_uint8(g + t); /* Y */ } /**