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 /lib/rbcodec/codecs | |
parent | f49814214355913458f9f7635561365afa5bc7aa (diff) |
opus: #if 0 out some more unused code, delete unused file
Change-Id: I96033f42e0c3096ec9d779e9f8ca46570f981ab0
Diffstat (limited to 'lib/rbcodec/codecs')
-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 silk/decoder_set_fs.c silk/gain_quant.c silk/init_decoder.c -silk/lin2log.c silk/log2lin.c silk/LPC_analysis_filter.c 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 #ifdef FIXED_POINT +#if 0 /* For input in Q24 domain */ opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse prediction gain in energy domain, Q30 */ 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 return LPC_inverse_pred_gain_QA( Atmp_QA, order ); } #endif +#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( /* SCALAR FUNCTIONS */ /********************************************************************/ +#if 0 /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */ /* Convert input to a log scale */ opus_int32 silk_lin2log( const opus_int32 inLin /* I input in linear scale */ ); +#endif /* Approximation of a sigmoid function */ 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. #define silk_enc_map(a) ( silk_RSHIFT( (a), 15 ) + 1 ) #define silk_dec_map(a) ( silk_LSHIFT( (a), 1 ) - 1 ) +#if 0 /* Encodes signs of excitation */ void silk_encode_signs( ec_enc *psRangeEnc, /* I/O Compressor data structure */ @@ -70,6 +71,7 @@ void silk_encode_signs( q_ptr += SHELL_CODEC_FRAME_LENGTH; } } +#endif /* Decodes signs of excitation */ 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. #define SCALE_Q16 ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) #define INV_SCALE_Q16 ( ( 65536 * ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) / ( N_LEVELS_QGAIN - 1 ) ) +#if 0 /* Gain scalar quantization with hysteresis, uniform on log scale */ void silk_gains_quant( opus_int8 ind[ MAX_NB_SUBFR ], /* O gain indices */ @@ -88,6 +89,7 @@ void silk_gains_quant( gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ } } +# endif /* Gains scalar dequantization, uniform on log scale */ void silk_gains_dequant( @@ -123,6 +125,7 @@ void silk_gains_dequant( } } +#if 0 /* Compute unique identifier of gain indices vector */ opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ const opus_int8 ind[ MAX_NB_SUBFR ], /* I gain indices */ @@ -139,3 +142,4 @@ opus_int32 silk_gains_ID( /* O returns return gainsID; } +#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 @@ -/*********************************************************************** -Copyright (c) 2006-2011, Skype Limited. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the -names of specific contributors, may be used to endorse or promote -products derived from this software without specific prior written -permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -***********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include "opus_config.h" -#endif - -#include "SigProc_FIX.h" -/* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ -/* Convert input to a log scale */ -opus_int32 silk_lin2log( - const opus_int32 inLin /* I input in linear scale */ -) -{ - opus_int32 lz, frac_Q7; - - silk_CLZ_FRAC( inLin, &lz, &frac_Q7 ); - - /* Piece-wise parabolic approximation */ - return silk_LSHIFT( 31 - lz, 7 ) + silk_SMLAWB( frac_Q7, silk_MUL( frac_Q7, 128 - frac_Q7 ), 179 ); -} - 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( } } +#if 0 static inline void encode_split( ec_enc *psRangeEnc, /* I/O compressor data structure */ const opus_int p_child1, /* I pulse amplitude of first child subframe */ @@ -56,6 +57,7 @@ static inline void encode_split( ec_enc_icdf( psRangeEnc, p_child1, &shell_table[ silk_shell_code_table_offsets[ p ] ], 8 ); } } +#endif static inline void decode_split( opus_int *p_child1, /* O pulse amplitude of first child subframe */ @@ -74,6 +76,7 @@ static inline void decode_split( } } +#if 0 /* Shell encoder, operates on one shell code frame of 16 pulses */ void silk_shell_encoder( ec_enc *psRangeEnc, /* I/O compressor data structure */ @@ -113,6 +116,7 @@ void silk_shell_encoder( encode_split( psRangeEnc, pulses0[ 12 ], pulses1[ 6 ], silk_shell_code_table0 ); encode_split( psRangeEnc, pulses0[ 14 ], pulses1[ 7 ], silk_shell_code_table0 ); } +#endif /* 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. #include "SigProc_FIX.h" +#if 0 void silk_insertion_sort_increasing( opus_int32 *a, /* I/O Unsorted / Sorted vector */ opus_int *idx, /* O Index vector for the sorted elements */ @@ -131,6 +132,7 @@ void silk_insertion_sort_decreasing_int16( } } #endif +#endif void silk_insertion_sort_increasing_all_values_int16( opus_int16 *a, /* I/O Unsorted / Sorted vector */ |