summaryrefslogtreecommitdiff
path: root/libavfilter/vf_overlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_overlay.c')
-rw-r--r--libavfilter/vf_overlay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 06967c2db5..6fa10aec8e 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -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;
}