avcodec/aacsbr_template: replace qsort with AV_QSORT
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 28 Oct 2015 01:11:45 +0000 (21:11 -0400)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 4 Nov 2015 13:15:24 +0000 (08:15 -0500)
commitfd0bf457b734beee6715254ea264118dc4993507
tree5974340246a5e8e90f711933dc018c81880ee1ee
parentbc55cec57e5d804f8cc9596a6f3878c1bda0ae56
avcodec/aacsbr_template: replace qsort with AV_QSORT

When sbr->reset is set in encode_frame, a bunch of qsort calls might get made.
Thus, there is the potential of calling qsort whenever the spectral
contents change.

AV_QSORT is substantially faster due to the inlining of the comparison callback.
Thus, the increase in performance should be worth the increase in binary size.

Tested with FATE.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavcodec/aacsbr_template.c