Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-09-28 05:26:02 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-20 04:44:07 +0300
commit4b75d960b69c633e3f78d1972b3a7fc63a336b33 (patch)
tree483f163e9acf0bc5e1040dec12deb6f81b01c5c1 /libswscale/utils.c
parentb694403ef92f0006e26d051a1866a1eda42db0e5 (diff)
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)
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 1b1f779532..57c4fd2b0f 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -390,7 +390,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;