diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-21 17:14:19 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-23 23:42:17 +0200 |
commit | a14c5af58db7068536d3ce2331ea8507c5dc5a39 (patch) | |
tree | 26b13a5886f249f33db0b18654c3524289e582cd /libavcodec | |
parent | 882a17068fd8e62c7d38c14e6fb160d7c9fc446a (diff) | |
download | ffmpeg-a14c5af58db7068536d3ce2331ea8507c5dc5a39.tar.gz |
avcodec/snowenc: Fix invalid left shift of negative numbers
Affected the vsynth(1|2|_lena)-snow(|-hpel) tests.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/snowenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index ea0d4fc27f..ada24f7895 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -935,7 +935,7 @@ static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y av_assert2(mb_x < b_stride); index = (p0 + 31 * p1) & (ME_CACHE_SIZE-1); - value = s->me_cache_generation + (p0 >> 10) + (p1 << 6) + (block->ref << 12); + value = s->me_cache_generation + (p0 >> 10) + p1 * (1 << 6) + (block->ref << 12); if (s->me_cache[index] == value) return 0; s->me_cache[index] = value; |