mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_fieldmatch: Add () to protect the arguments of the HAS_FF_AROUND() macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f15c734be1
commit
2bae7b3370
|
@ -285,9 +285,9 @@ static int calc_combed_score(const FieldMatchContext *fm, const AVFrame *src)
|
||||||
cmkpV += cmk_linesizeUV;
|
cmkpV += cmk_linesizeUV;
|
||||||
cmkpU += cmk_linesizeUV;
|
cmkpU += cmk_linesizeUV;
|
||||||
for (x = 1; x < width - 1; x++) {
|
for (x = 1; x < width - 1; x++) {
|
||||||
#define HAS_FF_AROUND(p, lz) (p[x-1 - lz] == 0xff || p[x - lz] == 0xff || p[x+1 - lz] == 0xff || \
|
#define HAS_FF_AROUND(p, lz) (p[(x)-1 - (lz)] == 0xff || p[(x) - (lz)] == 0xff || p[(x)+1 - (lz)] == 0xff || \
|
||||||
p[x-1 ] == 0xff || p[x+1 ] == 0xff || \
|
p[(x)-1 ] == 0xff || p[(x)+1 ] == 0xff || \
|
||||||
p[x-1 + lz] == 0xff || p[x + lz] == 0xff || p[x+1 + lz] == 0xff)
|
p[(x)-1 + (lz)] == 0xff || p[(x) + (lz)] == 0xff || p[(x)+1 + (lz)] == 0xff)
|
||||||
if ((cmkpV[x] == 0xff && HAS_FF_AROUND(cmkpV, cmk_linesizeUV)) ||
|
if ((cmkpV[x] == 0xff && HAS_FF_AROUND(cmkpV, cmk_linesizeUV)) ||
|
||||||
(cmkpU[x] == 0xff && HAS_FF_AROUND(cmkpU, cmk_linesizeUV))) {
|
(cmkpU[x] == 0xff && HAS_FF_AROUND(cmkpU, cmk_linesizeUV))) {
|
||||||
((uint16_t*)cmkp)[x] = 0xffff;
|
((uint16_t*)cmkp)[x] = 0xffff;
|
||||||
|
|
Loading…
Reference in New Issue