diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-11-29 16:05:50 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-11-29 16:05:50 +0100 |
commit | c754591677367ee9a95ce138daa68d36df0b6ce4 (patch) | |
tree | c920e22f3bfb617f3e4e110e277f2fa375ac0b0f | |
parent | f01a276b50a52abdcde2c989e01c31a056922e76 (diff) | |
parent | eef38316cab68aff080cf2b83c2427a734194e8d (diff) | |
download | ffmpeg-c754591677367ee9a95ce138daa68d36df0b6ce4.tar.gz |
Merge commit 'eef38316cab68aff080cf2b83c2427a734194e8d'
* commit 'eef38316cab68aff080cf2b83c2427a734194e8d':
texturedspenc: Avoid using separate variables
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/texturedspenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c index c5fc70f450..7160396fae 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 */ } /** |