diff options
author | Nils Wallménius <nils@rockbox.org> | 2012-09-24 17:45:07 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-09-24 17:45:07 +0200 |
commit | 06fc6fdd0a6e0758043fd7aebb98f5098a8344e4 (patch) | |
tree | 946333c2b2cc38d17a55fb4702f4224428fc0165 | |
parent | f49814214355913458f9f7635561365afa5bc7aa (diff) | |
download | rockbox-06fc6fdd0a6e0758043fd7aebb98f5098a8344e4.tar.gz rockbox-06fc6fdd0a6e0758043fd7aebb98f5098a8344e4.zip |
opus: #if 0 out some more unused code, delete unused file
Change-Id: I96033f42e0c3096ec9d779e9f8ca46570f981ab0
-rw-r--r-- | lib/rbcodec/codecs/libopus/SOURCES | 1 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | 2 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/code_signs.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/gain_quant.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/lin2log.c | 46 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/shell_coder.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/sort.c | 2 |
8 files changed, 16 insertions, 47 deletions
diff --git a/lib/rbcodec/codecs/libopus/SOURCES b/lib/rbcodec/codecs/libopus/SOURCES index df3f014f38..c878495052 100644 --- a/lib/rbcodec/codecs/libopus/SOURCES +++ b/lib/rbcodec/codecs/libopus/SOURCES | |||
@@ -31,7 +31,6 @@ silk/decode_pulses.c | |||
31 | silk/decoder_set_fs.c | 31 | silk/decoder_set_fs.c |
32 | silk/gain_quant.c | 32 | silk/gain_quant.c |
33 | silk/init_decoder.c | 33 | silk/init_decoder.c |
34 | silk/lin2log.c | ||
35 | silk/log2lin.c | 34 | silk/log2lin.c |
36 | silk/LPC_analysis_filter.c | 35 | silk/LPC_analysis_filter.c |
37 | silk/LPC_inv_pred_gain.c | 36 | silk/LPC_inv_pred_gain.c |
diff --git a/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c b/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c index afbb48ae1d..a0a13987d7 100644 --- a/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c +++ b/lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c | |||
@@ -132,6 +132,7 @@ opus_int32 silk_LPC_inverse_pred_gain( /* O Returns inverse predi | |||
132 | 132 | ||
133 | #ifdef FIXED_POINT | 133 | #ifdef FIXED_POINT |
134 | 134 | ||
135 | #if 0 | ||
135 | /* For input in Q24 domain */ | 136 | /* For input in Q24 domain */ |
136 | opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse prediction gain in energy domain, Q30 */ | 137 | opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse prediction gain in energy domain, Q30 */ |
137 | const opus_int32 *A_Q24, /* I Prediction coefficients [order] */ | 138 | const opus_int32 *A_Q24, /* I Prediction coefficients [order] */ |
@@ -152,3 +153,4 @@ opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse pred | |||
152 | return LPC_inverse_pred_gain_QA( Atmp_QA, order ); | 153 | return LPC_inverse_pred_gain_QA( Atmp_QA, order ); |
153 | } | 154 | } |
154 | #endif | 155 | #endif |
156 | #endif | ||
diff --git a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h index 72ec26a67f..212891b35b 100644 --- a/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h +++ b/lib/rbcodec/codecs/libopus/silk/SigProc_FIX.h | |||
@@ -151,11 +151,13 @@ void silk_ana_filt_bank_1( | |||
151 | /* SCALAR FUNCTIONS */ | 151 | /* SCALAR FUNCTIONS */ |
152 | /********************************************************************/ | 152 | /********************************************************************/ |
153 | 153 | ||
154 | #if 0 | ||
154 | /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ | 155 | /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ |
155 | /* Convert input to a log scale */ | 156 | /* Convert input to a log scale */ |
156 | opus_int32 silk_lin2log( | 157 | opus_int32 silk_lin2log( |
157 | const opus_int32 inLin /* I input in linear scale */ | 158 | const opus_int32 inLin /* I input in linear scale */ |
158 | ); | 159 | ); |
160 | #endif | ||
159 | 161 | ||
160 | /* Approximation of a sigmoid function */ | 162 | /* Approximation of a sigmoid function */ |
161 | opus_int silk_sigm_Q15( | 163 | opus_int silk_sigm_Q15( |
diff --git a/lib/rbcodec/codecs/libopus/silk/code_signs.c b/lib/rbcodec/codecs/libopus/silk/code_signs.c index 3903eb1f16..83f0e5f05c 100644 --- a/lib/rbcodec/codecs/libopus/silk/code_signs.c +++ b/lib/rbcodec/codecs/libopus/silk/code_signs.c | |||
@@ -37,6 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
37 | #define silk_enc_map(a) ( silk_RSHIFT( (a), 15 ) + 1 ) | 37 | #define silk_enc_map(a) ( silk_RSHIFT( (a), 15 ) + 1 ) |
38 | #define silk_dec_map(a) ( silk_LSHIFT( (a), 1 ) - 1 ) | 38 | #define silk_dec_map(a) ( silk_LSHIFT( (a), 1 ) - 1 ) |
39 | 39 | ||
40 | #if 0 | ||
40 | /* Encodes signs of excitation */ | 41 | /* Encodes signs of excitation */ |
41 | void silk_encode_signs( | 42 | void silk_encode_signs( |
42 | ec_enc *psRangeEnc, /* I/O Compressor data structure */ | 43 | ec_enc *psRangeEnc, /* I/O Compressor data structure */ |
@@ -70,6 +71,7 @@ void silk_encode_signs( | |||
70 | q_ptr += SHELL_CODEC_FRAME_LENGTH; | 71 | q_ptr += SHELL_CODEC_FRAME_LENGTH; |
71 | } | 72 | } |
72 | } | 73 | } |
74 | #endif | ||
73 | 75 | ||
74 | /* Decodes signs of excitation */ | 76 | /* Decodes signs of excitation */ |
75 | void silk_decode_signs( | 77 | void silk_decode_signs( |
diff --git a/lib/rbcodec/codecs/libopus/silk/gain_quant.c b/lib/rbcodec/codecs/libopus/silk/gain_quant.c index e91ec937e1..ce3617a206 100644 --- a/lib/rbcodec/codecs/libopus/silk/gain_quant.c +++ b/lib/rbcodec/codecs/libopus/silk/gain_quant.c | |||
@@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
35 | #define SCALE_Q16 ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) | 35 | #define SCALE_Q16 ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) |
36 | #define INV_SCALE_Q16 ( ( 65536 * ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) / ( N_LEVELS_QGAIN - 1 ) ) | 36 | #define INV_SCALE_Q16 ( ( 65536 * ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) / ( N_LEVELS_QGAIN - 1 ) ) |
37 | 37 | ||
38 | #if 0 | ||
38 | /* Gain scalar quantization with hysteresis, uniform on log scale */ | 39 | /* Gain scalar quantization with hysteresis, uniform on log scale */ |
39 | void silk_gains_quant( | 40 | void silk_gains_quant( |
40 | opus_int8 ind[ MAX_NB_SUBFR ], /* O gain indices */ | 41 | opus_int8 ind[ MAX_NB_SUBFR ], /* O gain indices */ |
@@ -88,6 +89,7 @@ void silk_gains_quant( | |||
88 | gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ | 89 | gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ |
89 | } | 90 | } |
90 | } | 91 | } |
92 | # endif | ||
91 | 93 | ||
92 | /* Gains scalar dequantization, uniform on log scale */ | 94 | /* Gains scalar dequantization, uniform on log scale */ |
93 | void silk_gains_dequant( | 95 | void silk_gains_dequant( |
@@ -123,6 +125,7 @@ void silk_gains_dequant( | |||
123 | } | 125 | } |
124 | } | 126 | } |
125 | 127 | ||
128 | #if 0 | ||
126 | /* Compute unique identifier of gain indices vector */ | 129 | /* Compute unique identifier of gain indices vector */ |
127 | opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ | 130 | opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ |
128 | const opus_int8 ind[ MAX_NB_SUBFR ], /* I gain indices */ | 131 | const opus_int8 ind[ MAX_NB_SUBFR ], /* I gain indices */ |
@@ -139,3 +142,4 @@ opus_int32 silk_gains_ID( /* O returns | |||
139 | 142 | ||
140 | return gainsID; | 143 | return gainsID; |
141 | } | 144 | } |
145 | #endif | ||
diff --git a/lib/rbcodec/codecs/libopus/silk/lin2log.c b/lib/rbcodec/codecs/libopus/silk/lin2log.c deleted file mode 100644 index 68ea030c89..0000000000 --- a/lib/rbcodec/codecs/libopus/silk/lin2log.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /*********************************************************************** | ||
2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. | ||
3 | Redistribution and use in source and binary forms, with or without | ||
4 | modification, are permitted provided that the following conditions | ||
5 | are met: | ||
6 | - Redistributions of source code must retain the above copyright notice, | ||
7 | this list of conditions and the following disclaimer. | ||
8 | - Redistributions in binary form must reproduce the above copyright | ||
9 | notice, this list of conditions and the following disclaimer in the | ||
10 | documentation and/or other materials provided with the distribution. | ||
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 | ||
13 | products derived from this software without specific prior written | ||
14 | permission. | ||
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” | ||
16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
25 | POSSIBILITY OF SUCH DAMAGE. | ||
26 | ***********************************************************************/ | ||
27 | |||
28 | #ifdef HAVE_CONFIG_H | ||
29 | #include "opus_config.h" | ||
30 | #endif | ||
31 | |||
32 | #include "SigProc_FIX.h" | ||
33 | /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ | ||
34 | /* Convert input to a log scale */ | ||
35 | opus_int32 silk_lin2log( | ||
36 | const opus_int32 inLin /* I input in linear scale */ | ||
37 | ) | ||
38 | { | ||
39 | opus_int32 lz, frac_Q7; | ||
40 | |||
41 | silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); | ||
42 | |||
43 | /* Piece-wise parabolic approximation */ | ||
44 | return silk_LSHIFT( 31 - lz, 7 ) + silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - frac_Q7 ), 179 ); | ||
45 | } | ||
46 | |||
diff --git a/lib/rbcodec/codecs/libopus/silk/shell_coder.c b/lib/rbcodec/codecs/libopus/silk/shell_coder.c index 1cc77fd88e..8308f3fb8a 100644 --- a/lib/rbcodec/codecs/libopus/silk/shell_coder.c +++ b/lib/rbcodec/codecs/libopus/silk/shell_coder.c | |||
@@ -45,6 +45,7 @@ static inline void combine_pulses( | |||
45 | } | 45 | } |
46 | } | 46 | } |
47 | 47 | ||
48 | #if 0 | ||
48 | static inline void encode_split( | 49 | static inline void encode_split( |
49 | ec_enc *psRangeEnc, /* I/O compressor data structure */ | 50 | ec_enc *psRangeEnc, /* I/O compressor data structure */ |
50 | const opus_int p_child1, /* I pulse amplitude of first child subframe */ | 51 | const opus_int p_child1, /* I pulse amplitude of first child subframe */ |
@@ -56,6 +57,7 @@ static inline void encode_split( | |||
56 | ec_enc_icdf( psRangeEnc, p_child1, &shell_table[ silk_shell_code_table_offsets[ p ] ], 8 ); | 57 | ec_enc_icdf( psRangeEnc, p_child1, &shell_table[ silk_shell_code_table_offsets[ p ] ], 8 ); |
57 | } | 58 | } |
58 | } | 59 | } |
60 | #endif | ||
59 | 61 | ||
60 | static inline void decode_split( | 62 | static inline void decode_split( |
61 | opus_int *p_child1, /* O pulse amplitude of first child subframe */ | 63 | opus_int *p_child1, /* O pulse amplitude of first child subframe */ |
@@ -74,6 +76,7 @@ static inline void decode_split( | |||
74 | } | 76 | } |
75 | } | 77 | } |
76 | 78 | ||
79 | #if 0 | ||
77 | /* Shell encoder, operates on one shell code frame of 16 pulses */ | 80 | /* Shell encoder, operates on one shell code frame of 16 pulses */ |
78 | void silk_shell_encoder( | 81 | void silk_shell_encoder( |
79 | ec_enc *psRangeEnc, /* I/O compressor data structure */ | 82 | ec_enc *psRangeEnc, /* I/O compressor data structure */ |
@@ -113,6 +116,7 @@ void silk_shell_encoder( | |||
113 | encode_split( psRangeEnc, pulses0[ 12 ], pulses1[ 6 ], silk_shell_code_table0 ); | 116 | encode_split( psRangeEnc, pulses0[ 12 ], pulses1[ 6 ], silk_shell_code_table0 ); |
114 | encode_split( psRangeEnc, pulses0[ 14 ], pulses1[ 7 ], silk_shell_code_table0 ); | 117 | encode_split( psRangeEnc, pulses0[ 14 ], pulses1[ 7 ], silk_shell_code_table0 ); |
115 | } | 118 | } |
119 | #endif | ||
116 | 120 | ||
117 | 121 | ||
118 | /* Shell decoder, operates on one shell code frame of 16 pulses */ | 122 | /* Shell decoder, operates on one shell code frame of 16 pulses */ |
diff --git a/lib/rbcodec/codecs/libopus/silk/sort.c b/lib/rbcodec/codecs/libopus/silk/sort.c index f9886b45b2..46b7588c69 100644 --- a/lib/rbcodec/codecs/libopus/silk/sort.c +++ b/lib/rbcodec/codecs/libopus/silk/sort.c | |||
@@ -37,6 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
37 | 37 | ||
38 | #include "SigProc_FIX.h" | 38 | #include "SigProc_FIX.h" |
39 | 39 | ||
40 | #if 0 | ||
40 | void silk_insertion_sort_increasing( | 41 | void silk_insertion_sort_increasing( |
41 | opus_int32 *a, /* I/O Unsorted / Sorted vector */ | 42 | opus_int32 *a, /* I/O Unsorted / Sorted vector */ |
42 | opus_int *idx, /* O Index vector for the sorted elements */ | 43 | opus_int *idx, /* O Index vector for the sorted elements */ |
@@ -131,6 +132,7 @@ void silk_insertion_sort_decreasing_int16( | |||
131 | } | 132 | } |
132 | } | 133 | } |
133 | #endif | 134 | #endif |
135 | #endif | ||
134 | 136 | ||
135 | void silk_insertion_sort_increasing_all_values_int16( | 137 | void silk_insertion_sort_increasing_all_values_int16( |
136 | opus_int16 *a, /* I/O Unsorted / Sorted vector */ | 138 | opus_int16 *a, /* I/O Unsorted / Sorted vector */ |