mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/ffv1enc: Fix undefined left shifts of negative numbers
Maybe this fixes the FPE encountered here: https://fate.ffmpeg.org/report.cgi?slot=alpha-debian-qemu-gcc-4.7&time=20220530144951 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
c5b2ddfe18
commit
415f012359
@ -143,7 +143,7 @@ static void find_best_state(uint8_t best_state[256][256],
|
||||
uint32_t l2tab[256];
|
||||
|
||||
for (i = 1; i < 256; i++)
|
||||
l2tab[i] = log2(i / 256.0) * ((-1<<31) / 8);
|
||||
l2tab[i] = -log2(i / 256.0) * ((1U << 31) / 8);
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
uint64_t best_len[256];
|
||||
|
Loading…
Reference in New Issue
Block a user