summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/silk/gain_quant.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/gain_quant.c')
-rw-r--r--lib/rbcodec/codecs/libopus/silk/gain_quant.c4
1 files changed, 4 insertions, 0 deletions
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 */
39void silk_gains_quant( 40void 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 */
93void silk_gains_dequant( 95void 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 */
127opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ 130opus_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