Commit e299cb2c authored by Derek Buitenhuis's avatar Derek Buitenhuis

fic: Simplify alpha blending

Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent b0bdc2a7
...@@ -195,7 +195,7 @@ static av_always_inline void fic_alpha_blend(uint8_t *dst, uint8_t *src, ...@@ -195,7 +195,7 @@ static av_always_inline void fic_alpha_blend(uint8_t *dst, uint8_t *src,
int i; int i;
for (i = 0; i < size; 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) static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment