1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/ffv1enc: Eliminate fabs()

Fixes: warning: using floating point absolute value function 'fabs' when argument is of integer type
No change in output
Changing variables to float worsens compression significantly

Found-by: ePirat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-04-23 00:06:39 +02:00
parent 716c3986c6
commit fb36f170de

View File

@ -1441,7 +1441,7 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc,
cost = FFMAX((delta + mul/2) / mul, 1); cost = FFMAX((delta + mul/2) / mul, 1);
float score = 1; float score = 1;
if (mul > 1) { if (mul > 1) {
score *= (fabs(delta - cost*mul)+1); score *= (FFABS(delta - cost*mul)+1);
if (mul_count > 1) if (mul_count > 1)
score *= score; score *= score;
} }