Skip to content
Snippets Groups Projects
Commit c163f5e6 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/pngdec: fix () in OP_* macros

parent ad733089
No related branches found
No related tags found
No related merge requests found
...@@ -237,7 +237,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, ...@@ -237,7 +237,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
*(int *)(dst + i) = p; *(int *)(dst + i) = p;
} }
} else { } else {
#define OP_SUB(x, s, l) x + s #define OP_SUB(x, s, l) ((x) + (s))
UNROLL_FILTER(OP_SUB); UNROLL_FILTER(OP_SUB);
} }
break; break;
...@@ -249,7 +249,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, ...@@ -249,7 +249,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
p = (last[i] >> 1); p = (last[i] >> 1);
dst[i] = p + src[i]; dst[i] = p + src[i];
} }
#define OP_AVG(x, s, l) (((x + l) >> 1) + s) & 0xff #define OP_AVG(x, s, l) (((((x) + (l)) >> 1) + (s)) & 0xff)
UNROLL_FILTER(OP_AVG); UNROLL_FILTER(OP_AVG);
break; break;
case PNG_FILTER_VALUE_PAETH: case PNG_FILTER_VALUE_PAETH:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment