[FFmpeg-cvslog] avfilter/vf_blend: fix macro ()

Michael Niedermayer git at videolan.org
Sun Jun 22 21:16:45 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 22 20:49:00 2014 +0200| [9b33cdcab211a773feab8d58819aa08a16c318f8] | committer: Michael Niedermayer

avfilter/vf_blend: fix macro ()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b33cdcab211a773feab8d58819aa08a16c318f8
---

 libavfilter/vf_blend.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index d422a9c..8bf19ff 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -179,10 +179,10 @@ static void blend_## name(const uint8_t *top, int top_linesize,       \
 #define A top[j]
 #define B bottom[j]
 
-#define MULTIPLY(x, a, b) (x * ((a * b) / 255))
-#define SCREEN(x, a, b)   (255 - x * ((255 - a) * (255 - b) / 255))
-#define BURN(a, b)        ((a == 0) ? a : FFMAX(0, 255 - ((255 - b) << 8) / a))
-#define DODGE(a, b)       ((a == 255) ? a : FFMIN(255, ((b << 8) / (255 - a))))
+#define MULTIPLY(x, a, b) ((x) * (((a) * (b)) / 255))
+#define SCREEN(x, a, b)   (255 - (x) * ((255 - (a)) * (255 - (b)) / 255))
+#define BURN(a, b)        (((a) == 0) ? (a) : FFMAX(0, 255 - ((255 - (b)) << 8) / (a)))
+#define DODGE(a, b)       (((a) == 255) ? (a) : FFMIN(255, (((b) << 8) / (255 - (a)))))
 
 DEFINE_BLEND(addition,   FFMIN(255, A + B))
 DEFINE_BLEND(average,    (A + B) / 2)



More information about the ffmpeg-cvslog mailing list