]> git.sesse.net Git - ffmpeg/commitdiff
on2avc: Use the integer abs() version
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 12 Jun 2015 11:32:38 +0000 (12:32 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 12 Jun 2015 16:02:49 +0000 (17:02 +0100)
Fixes clang warning "floating point absolute value function 'fabsf'
when argument is of integer type [-Wabsolute-value]".

libavcodec/on2avc.c

index c00339f7b0fdace26ee88a0710b3582ac43b1d15..287ecfbd891c938a3819b18ad6dee3f85e94e7e5 100644 (file)
@@ -186,7 +186,7 @@ static int on2avc_decode_band_scales(On2AVCContext *c, GetBitContext *gb)
 
 static inline float on2avc_scale(int v, float scale)
 {
-    return v * sqrtf(fabsf(v)) * scale;
+    return v * sqrtf(abs(v)) * scale;
 }
 
 // spectral data is coded completely differently - there are no unsigned codebooks