Commit 49e617f9 authored by Mans Rullgard's avatar Mans Rullgard Committed by Michael Niedermayer

yadif: add parens around macro parameters

This fixes compilation with preprocessors which do not add whitespace
around replaced tokens, resulting in invalid expressions like 1--1.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent ac533ac4
......@@ -73,12 +73,12 @@ static void filter_line_c(uint8_t *dst,
+ FFABS(cur[mrefs+1] - cur[prefs+1]) - 1;
#define CHECK(j)\
{ int score = FFABS(cur[mrefs-1+j] - cur[prefs-1-j])\
+ FFABS(cur[mrefs +j] - cur[prefs -j])\
+ FFABS(cur[mrefs+1+j] - cur[prefs+1-j]);\
{ int score = FFABS(cur[mrefs-1+(j)] - cur[prefs-1-(j)])\
+ FFABS(cur[mrefs +(j)] - cur[prefs -(j)])\
+ FFABS(cur[mrefs+1+(j)] - cur[prefs+1-(j)]);\
if (score < spatial_score) {\
spatial_score= score;\
spatial_pred= (cur[mrefs +j] + cur[prefs -j])>>1;\
spatial_pred= (cur[mrefs +(j)] + cur[prefs -(j)])>>1;\
CHECK(-1) CHECK(-2) }} }}
CHECK( 1) CHECK( 2) }} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment