[FFmpeg-cvslog] fft-test: Use the float fabs() version

Vittorio Giovara git at videolan.org
Fri Jun 12 23:21:49 CEST 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Jun 12 17:04:20 2015 +0100| [3b73d5c942f44b37f0e44276ebcfd66c8b12c02d] | committer: Vittorio Giovara

fft-test: Use the float fabs() version

Fixes clang warning "absolute value function 'fabsf' given an argument
of type 'double' but has parameter of type 'float' which may cause
truncation of value [-Wabsolute-value]".

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b73d5c942f44b37f0e44276ebcfd66c8b12c02d
---

 libavcodec/fft-test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index b7c83cf..83b5546 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -193,7 +193,7 @@ static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale)
     double error = 0, max = 0;
 
     for (i = 0; i < n; i++) {
-        double e = fabsf(tab1[i] - (tab2[i] / scale)) / RANGE;
+        double e = fabs(tab1[i] - (tab2[i] / scale)) / RANGE;
         if (e >= 1e-3) {
             av_log(NULL, AV_LOG_ERROR, "ERROR %5d: "FMT" "FMT"\n",
                    i, tab1[i], tab2[i]);



More information about the ffmpeg-cvslog mailing list