You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vf_overlay: adopts FAST_DIV255 macro for calculating destination alpha
Ease readability, improve exactness.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user