Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2011-10-31 14:32:11 +0400
committerStefano Sabatini <stefasab@gmail.com>2011-11-03 00:44:13 +0400
commit0b3e9d5dc61bb705d93db1e87d78d8d5131905c6 (patch)
tree2678dcc81060e2275393530d298bd7050adedb42
parent91dfb7385271b5fb18b0b4fddfbcf934c6cb6954 (diff)
vf_overlay: adopts FAST_DIV255 macro for calculating destination alpha
Ease readability, improve exactness.
-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;
}