Commit 0b3e9d5d authored by Stefano Sabatini's avatar Stefano Sabatini

vf_overlay: adopts FAST_DIV255 macro for calculating destination alpha

Ease readability, improve exactness.
parent 91dfb738
......@@ -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;
}
......
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