diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2012-09-10 01:48:25 -0700 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-09-12 15:54:33 -0400 |
commit | 02c653fa0c60e348f5a09f82f66935c5bc470583 (patch) | |
tree | f86552c6c0d8be6e0f5e84260be1e45ae6b1bc78 /silk/resampler_rom.c | |
parent | 3f2efcbf3d7c58f6e328d8c4ba75554f1661bcf5 (diff) | |
download | opus-02c653fa0c60e348f5a09f82f66935c5bc470583.tar.gz |
silk: move down- and upsamplers constants to the header file.
These are only being used outside if the translation unit and only in
a few codepaths; by making them static in the header, the compiler can
optimize them quickly.
This avoids GOT-based access to the external symbol on Unix, and can
allow for constant propagation to optimize the code.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Diffstat (limited to 'silk/resampler_rom.c')
-rw-r--r-- | silk/resampler_rom.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/silk/resampler_rom.c b/silk/resampler_rom.c index b723c418..b50af2e2 100644 --- a/silk/resampler_rom.c +++ b/silk/resampler_rom.c @@ -34,14 +34,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "resampler_private.h" -/* Tables for 2x downsampler */ -const opus_int16 silk_resampler_down2_0 = 9872; -const opus_int16 silk_resampler_down2_1 = 39809 - 65536; - -/* Tables for 2x upsampler, high quality */ -const opus_int16 silk_resampler_up2_hq_0[ 3 ] = { 1746, 14986, 39083 - 65536 }; -const opus_int16 silk_resampler_up2_hq_1[ 3 ] = { 6854, 25769, 55542 - 65536 }; - /* Matlab code for the notch filter coefficients: */ /* B = [1, 0.147, 1]; A = [1, 0.107, 0.89]; G = 0.93; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]) */ /* fprintf('\t%6d, %6d, %6d, %6d\n', round(B(2)*2^16), round(-A(2)*2^16), round((1-A(3))*2^16), round(G*2^15)) */ |