ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sun 
Apr 17 11:44:47 2016 +0200| [c8d95e5ceb720b89b5ad055544fa5738125b151c] | 
committer: Michael Niedermayer

avfilter/colorspacedsp_template: Add argument protecting () to avg()

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

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

diff --git a/libavfilter/colorspacedsp_template.c 
b/libavfilter/colorspacedsp_template.c
index a32a029..f225391 100644
--- a/libavfilter/colorspacedsp_template.c
+++ b/libavfilter/colorspacedsp_template.c
@@ -28,10 +28,10 @@
 #define avg(a,b,c,d) (a)
 #elif SS_H == 0
 #define ss 422
-#define avg(a,b,c,d) ((a + b + 1) >> 1)
+#define avg(a,b,c,d) (((a) + (b) + 1) >> 1)
 #else
 #define ss 420
-#define avg(a,b,c,d) ((a + b + c + d + 2) >> 2)
+#define avg(a,b,c,d) (((a) + (b) + (c) + (d) + 2) >> 2)
 #endif
 
 #undef fn

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to