diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-09-28 04:26:02 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-03 00:03:45 +0200 |
commit | 188a773d0fd83a0f6effcaeb122cbf9354178836 (patch) | |
tree | 533433c4c2259c04b6e8e246d4850d8462fc23ce /libswscale | |
parent | 9ed82df0f3b19a1cc22349c4722b604b54eecb7d (diff) | |
download | ffmpeg-188a773d0fd83a0f6effcaeb122cbf9354178836.tar.gz |
swscale/utils: Fix invalid left shifts of negative numbers
Affected the FATE-tests vsynth_lena-dv-411, vsynth1-dv-411,
vsynth2-dv-411 and hevc-paramchange-yuv420p.yuv420p10.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e2646e23be69bdef1e41d4decee1a4298701b8d1)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index dcab707de6..1786b937b4 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -380,7 +380,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, (*filterPos)[i] = xx; // bilinear upscale / linear interpolate / area averaging for (j = 0; j < filterSize; j++) { - int64_t coeff= fone - FFABS(((int64_t)xx<<16) - xDstInSrc)*(fone>>16); + int64_t coeff = fone - FFABS((int64_t)xx * (1 << 16) - xDstInSrc) * (fone >> 16); if (coeff < 0) coeff = 0; filter[i * filterSize + j] = coeff; |