diff options
author | Nils Wallménius <nils@rockbox.org> | 2013-12-11 22:59:14 +0100 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2013-12-16 21:13:23 +0100 |
commit | e3c2ed7a71f65dc721c7210f120259ecd4ff65cb (patch) | |
tree | de593c1e927dcc036f1b6656f1f881995491b3b9 /lib/rbcodec/codecs/libopus/silk/tables_LTP.c | |
parent | d0918b98fa0cfba21208a4fb5ed153687b8f02c3 (diff) | |
download | rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.tar.gz rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.zip |
Sync libopus to upstream release 1.1
Change-Id: I9fea7460fc33f60faff961b3389dd97b5191463c
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/tables_LTP.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/tables_LTP.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/tables_LTP.c b/lib/rbcodec/codecs/libopus/silk/tables_LTP.c index d16a511cc2..ea518652b8 100644 --- a/lib/rbcodec/codecs/libopus/silk/tables_LTP.c +++ b/lib/rbcodec/codecs/libopus/silk/tables_LTP.c | |||
@@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. | |||
8 | - Redistributions in binary form must reproduce the above copyright | 8 | - Redistributions in binary form must reproduce the above copyright |
9 | notice, this list of conditions and the following disclaimer in the | 9 | notice, this list of conditions and the following disclaimer in the |
10 | documentation and/or other materials provided with the distribution. | 10 | documentation and/or other materials provided with the distribution. |
11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the | 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the |
12 | names of specific contributors, may be used to endorse or promote | 12 | names of specific contributors, may be used to endorse or promote |
13 | products derived from this software without specific prior written | 13 | products derived from this software without specific prior written |
14 | permission. | 14 | permission. |
@@ -51,6 +51,7 @@ static const opus_uint8 silk_LTP_gain_iCDF_2[32] = { | |||
51 | 24, 20, 16, 12, 9, 5, 2, 0 | 51 | 24, 20, 16, 12, 9, 5, 2, 0 |
52 | }; | 52 | }; |
53 | 53 | ||
54 | #if 0 | ||
54 | const opus_int16 silk_LTP_gain_middle_avg_RD_Q14 = 12304; | 55 | const opus_int16 silk_LTP_gain_middle_avg_RD_Q14 = 12304; |
55 | 56 | ||
56 | static const opus_uint8 silk_LTP_gain_BITS_Q5_0[8] = { | 57 | static const opus_uint8 silk_LTP_gain_BITS_Q5_0[8] = { |
@@ -68,6 +69,7 @@ static const opus_uint8 silk_LTP_gain_BITS_Q5_2[32] = { | |||
68 | 160, 160, 166, 166, 173, 173, 182, 192, | 69 | 160, 160, 166, 166, 173, 173, 182, 192, |
69 | 182, 192, 192, 192, 205, 192, 205, 224 | 70 | 182, 192, 192, 192, 205, 192, 205, 224 |
70 | }; | 71 | }; |
72 | #endif | ||
71 | 73 | ||
72 | const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = { | 74 | const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = { |
73 | silk_LTP_gain_iCDF_0, | 75 | silk_LTP_gain_iCDF_0, |
@@ -75,11 +77,13 @@ const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS] = { | |||
75 | silk_LTP_gain_iCDF_2 | 77 | silk_LTP_gain_iCDF_2 |
76 | }; | 78 | }; |
77 | 79 | ||
80 | #if 0 | ||
78 | const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[NB_LTP_CBKS] = { | 81 | const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[NB_LTP_CBKS] = { |
79 | silk_LTP_gain_BITS_Q5_0, | 82 | silk_LTP_gain_BITS_Q5_0, |
80 | silk_LTP_gain_BITS_Q5_1, | 83 | silk_LTP_gain_BITS_Q5_1, |
81 | silk_LTP_gain_BITS_Q5_2 | 84 | silk_LTP_gain_BITS_Q5_2 |
82 | }; | 85 | }; |
86 | #endif | ||
83 | 87 | ||
84 | static const opus_int8 silk_LTP_gain_vq_0[8][5] = | 88 | static const opus_int8 silk_LTP_gain_vq_0[8][5] = |
85 | { | 89 | { |
@@ -267,6 +271,32 @@ const opus_int8 * const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS] = { | |||
267 | (opus_int8 *)&silk_LTP_gain_vq_2[0][0] | 271 | (opus_int8 *)&silk_LTP_gain_vq_2[0][0] |
268 | }; | 272 | }; |
269 | 273 | ||
274 | #if 0 | ||
275 | /* Maximum frequency-dependent response of the pitch taps above, | ||
276 | computed as max(abs(freqz(taps))) */ | ||
277 | static const opus_uint8 silk_LTP_gain_vq_0_gain[8] = { | ||
278 | 46, 2, 90, 87, 93, 91, 82, 98 | ||
279 | }; | ||
280 | |||
281 | static const opus_uint8 silk_LTP_gain_vq_1_gain[16] = { | ||
282 | 109, 120, 118, 12, 113, 115, 117, 119, | ||
283 | 99, 59, 87, 111, 63, 111, 112, 80 | ||
284 | }; | ||
285 | |||
286 | static const opus_uint8 silk_LTP_gain_vq_2_gain[32] = { | ||
287 | 126, 124, 125, 124, 129, 121, 126, 23, | ||
288 | 132, 127, 127, 127, 126, 127, 122, 133, | ||
289 | 130, 134, 101, 118, 119, 145, 126, 86, | ||
290 | 124, 120, 123, 119, 170, 173, 107, 109 | ||
291 | }; | ||
292 | |||
293 | const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS] = { | ||
294 | &silk_LTP_gain_vq_0_gain[0], | ||
295 | &silk_LTP_gain_vq_1_gain[0], | ||
296 | &silk_LTP_gain_vq_2_gain[0] | ||
297 | }; | ||
298 | |||
270 | const opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS] = { | 299 | const opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS] = { |
271 | 8, 16, 32 | 300 | 8, 16, 32 |
272 | }; | 301 | }; |
302 | #endif | ||