avcodec/ffv1enc: Fix handling of 32bit unsigned symbols

This may be needed for floats

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2025-01-09 21:35:06 +01:00
parent afbc3a1b23
commit 402824e9e9
No known key found for this signature in database
GPG key ID: B18E8928B3948D64

View file

@ -199,7 +199,7 @@ static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c,
} while (0) } while (0)
if (v) { if (v) {
const int a = FFABS(v); const unsigned a = is_signed ? FFABS(v) : v;
const int e = av_log2(a); const int e = av_log2(a);
put_rac(c, state + 0, 0); put_rac(c, state + 0, 0);
if (e <= 9) { if (e <= 9) {