[FFmpeg-devel] [PATCH 00/15] replace pow(10, x) by exp10(x) across FFmpeg

Ganesh Ajjanagadde gajjanagadde at gmail.com
Wed Dec 23 19:47:20 CET 2015


exp10(x) is superior to pow(10,x).
Note that in some cases, this may affect integers derived from pow calls. When
spotted, this remark has been added to the relevant commit message.

Note that if such a thing is troublesome, one can do one of two things:
1. leave the pow(10,x) call as is in such places.
2. replace the lavu/libm fallback by the correct pow(10,x) as opposed to the
sloppy exp2(M_LOG2_10 * x).

Patches tested with FATE on x86-64, GNU/Linux.

Ganesh Ajjanagadde (15):
  lavu/eval: replace pow(10,x) by exp10
  lavfi/vsrc_testsrc: replace pow(10,x) by exp10(x)
  lavfi/f_ebur128: replace pow(10,x) by exp10(x)
  lavfi/af_volume: replace pow(10,x) by exp10(x)
  lavfi/af_compand: replace pow(10,x) by exp10(x)
  lavc/aacpsy: replace pow(10,x) by exp10(x)
  lavc/cngdec: replace pow(10,x) by exp10(x)
  lavc/dcaenc: replace pow(10,x) by exp10(x)
  lavc/imc: replace pow(10,x) by exp10(x)
  lavc/libopusdec: replace pow(10,x) by exp10(x)
  lavc/on2avc: replace pow(10,x) by exp10(x)
  lavc/opus: replace pow(10,x) by exp10(x)
  lavc/wmadec: replace pow(10,x) by exp10(x)
  lavc/wmaenc: replace pow(10,x) by exp10(x)
  lavc/wmaprodec: replace pow(10,x) by exp10(x)

 libavcodec/aacpsy.c        | 8 ++++----
 libavcodec/cngdec.c        | 3 ++-
 libavcodec/dcaenc.c        | 5 +++--
 libavcodec/imc.c           | 4 ++--
 libavcodec/libopusdec.c    | 3 ++-
 libavcodec/on2avc.c        | 5 +++--
 libavcodec/opus.c          | 3 ++-
 libavcodec/wmadec.c        | 5 +++--
 libavcodec/wmaenc.c        | 5 +++--
 libavcodec/wmaprodec.c     | 3 ++-
 libavfilter/af_compand.c   | 2 +-
 libavfilter/af_volume.c    | 2 +-
 libavfilter/f_ebur128.c    | 2 +-
 libavfilter/vsrc_testsrc.c | 2 +-
 libavutil/eval.c           | 2 +-
 15 files changed, 31 insertions(+), 23 deletions(-)

-- 
2.6.4



More information about the ffmpeg-devel mailing list