diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2014-04-22 16:42:11 -0400 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2014-04-22 17:51:43 -0400 |
commit | e299cb2cd37330bf58225d45b06dc179f8dd8dac (patch) | |
tree | 36dc87157878d4d68fd8865729618069d4d0b9c9 /libavcodec | |
parent | b0bdc2a7123abd0287de435726ab68e9e475a8d8 (diff) | |
download | ffmpeg-e299cb2cd37330bf58225d45b06dc179f8dd8dac.tar.gz |
fic: Simplify alpha blending
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/fic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c index f5a2ffe369..0f9f798e43 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -195,7 +195,7 @@ static av_always_inline void fic_alpha_blend(uint8_t *dst, uint8_t *src, int i; for (i = 0; i < size; i++) - dst[i] = (dst[i] * (256 - alpha[i]) + src[i] * alpha[i]) >> 8; + dst[i] += ((src[i] - dst[i]) * alpha[i]) >> 8; } static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y) |