aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2025-04-23 00:06:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2025-04-27 05:04:35 +0200
commitfb36f170deb24c5639199518a95e2384dfccef70 (patch)
tree2f3f7389ee3f2911cd855276e16572db8b8211ef /libavcodec/ffv1enc.c
parent716c3986c63b9c9046d2b093d6b728af58394406 (diff)
downloadffmpeg-fb36f170deb24c5639199518a95e2384dfccef70.tar.gz
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>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 75e40771b6..6ab648fd80 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1441,7 +1441,7 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc,
cost = FFMAX((delta + mul/2) / mul, 1);
float score = 1;
if (mul > 1) {
- score *= (fabs(delta - cost*mul)+1);
+ score *= (FFABS(delta - cost*mul)+1);
if (mul_count > 1)
score *= score;
}