1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-15 00:41:37 +02:00

vf_overlay: adopts FAST_DIV255 macro for calculating destination alpha

Ease readability, improve exactness.
This commit is contained in:
Stefano Sabatini 2011-10-31 11:32:11 +01:00
parent 91dfb73852
commit 0b3e9d5dc6

View File

@ -452,7 +452,8 @@ static void blend_slice(AVFilterContext *ctx,
alpha = (alpha_v + alpha_h) >> 1;
} else
alpha = a[0];
*d = (*d * (0xff - alpha) + *s++ * alpha + 128) >> 8;
*d = FAST_DIV255(*d * (255 - alpha) + *s * alpha);
s++;
d++;
a += 1 << hsub;
}