avfilter/avf_showcqt: optimize gamma calculation
authorMuhammad Faiz <mfcc64@gmail.com>
Fri, 1 May 2015 09:44:59 +0000 (16:44 +0700)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 May 2015 09:53:04 +0000 (11:53 +0200)
commita141948a8be73546c1e684c6a1e37a11f2237c76
treee2e1a6602ef8c2e770da3fee00a07bd9bb52a0b3
parent29ef54aa9086d90d9ef2b7b3badd9aa7508f4281
avfilter/avf_showcqt: optimize gamma calculation

benchmark (on intel core2 duo, gcc 4.9.1)
input samples duration 00:03:39.59
command: time -p ffmpeg -f f32le -ac 2 -ar 44100 -i input.pcm \
         -filter_complex showcqt=fullhd=0:gamma=$gamma \
         -f rawvideo -y /dev/null
gamma  previous  modified
  1    48.49 s   45.38 s
  2    49.33 s   48.11 s
  3    80.86 s   59.80 s
  4    80.84 s   51.25 s
  5    80.75 s   61.06 s
  6    80.93 s   61.80 s
  7    80.03 s   61.56 s

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avf_showcqt.c