]> git.sesse.net Git - ffmpeg/commit
avcodec/aacsbr_template: Remove pointless runtime initialization
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 27 Dec 2020 19:46:06 +0000 (20:46 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 31 Dec 2020 21:04:23 +0000 (22:04 +0100)
commit3526f3856abc7586c98ea98cad04abf7696e89e7
tree1337259ade3009e75c85e08a656d88a93d9a5435
parentdf56a1060c7de9b48518d6ac08fa3db6569fc266
avcodec/aacsbr_template: Remove pointless runtime initialization

The sbr_qmf_window_us array is basically symmetric around its middle
element and therefore the latter half is currently initialized from the
first half at runtime. Yet because the first half is initialized, the
array can't be placed in .bss at all, so that one gains nothing from not
already initializing the whole array statically. Therefore this commit
does exactly this.

(There are two exceptions to the symmetry: Elements 384 and 512 are the
negations of their mirror element; for the fixed-point decoder, Q31(-x)
does not equal -Q31(x). In order to keep the array exactly the same, the
latter form has been used for these two elements.)

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/aacsbr_template.c
libavcodec/aacsbrdata.h