Opened 3 years ago

Closed 3 years ago

#4464 closed defect (fixed)

fft-test.c should be using fabs() rather than fabsf() for double precision operations

Reported by: jeremyhu Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Change History (1)

comment:1 Changed 3 years ago by gajjanag

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.