[FFmpeg-trac] #4464(avcodec:new): fft-test.c should be using fabs() rather than fabsf() for double precision operations
FFmpeg
trac at avcodec.org
Thu Apr 9 11:26:33 CEST 2015
#4464: fft-test.c should be using fabs() rather than fabsf() for double precision
operations
--------------------------------------+---------------------------------
Reporter: jeremyhu | Owner:
Type: defect | Status: new
Priority: minor | Component: avcodec
Version: git-master | Keywords:
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
--------------------------------------+---------------------------------
input and output are double precision accuracy. It looks like someone
made a typo. The compiler warning says it all:
{{{
src/libavcodec/fft-test.c:200:20: 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]
double e = fabsf(tab1[i] - (tab2[i] / scale)) / RANGE;
^
src/libavcodec/fft-test.c:200:20: note: use function 'fabs' instead
double e = fabsf(tab1[i] - (tab2[i] / scale)) / RANGE;
^~~~~
fabs
1 warning generated.
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4464>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list