lavc/aacsbr: sbr_dequant optimization
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 16 Dec 2015 04:27:23 +0000 (23:27 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sat, 19 Dec 2015 17:32:53 +0000 (09:32 -0800)
commitdef3c83e1b85cc17cade257cbf3b1fb84e61f788
tree6135823380c31ccaddc660ed50d71e9be1434e60
parentce10f572c12b0d172c72d31d8c979afce602bf0c
lavc/aacsbr: sbr_dequant optimization

This uses ff_exp2fi to get a speedup (~ 6x).

sample benchmark (Haswell, GNU/Linux):
old:
  19102 decicycles in sbr_dequant,    1023 runs,      1 skips
  19002 decicycles in sbr_dequant,    2045 runs,      3 skips
  17638 decicycles in sbr_dequant,    4093 runs,      3 skips
  15825 decicycles in sbr_dequant,    8189 runs,      3 skips
  16404 decicycles in sbr_dequant,   16379 runs,      5 skips

new:
   3063 decicycles in sbr_dequant,    1024 runs,      0 skips
   3049 decicycles in sbr_dequant,    2048 runs,      0 skips
   2968 decicycles in sbr_dequant,    4096 runs,      0 skips
   2818 decicycles in sbr_dequant,    8191 runs,      1 skips
   2853 decicycles in sbr_dequant,   16383 runs,      1 skips

Reviewed-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavcodec/aacsbr.c
libavcodec/aacsbr.h