summaryrefslogtreecommitdiff
path: root/libavfilter/colorspacedsp_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/colorspacedsp_template.c')
-rw-r--r--libavfilter/colorspacedsp_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/colorspacedsp_template.c b/libavfilter/colorspacedsp_template.c
index a32a0293f0..f225391301 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