diff options
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/gain_quant.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/gain_quant.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/gain_quant.c b/lib/rbcodec/codecs/libopus/silk/gain_quant.c index ed084073b1..ee65245aa3 100644 --- a/lib/rbcodec/codecs/libopus/silk/gain_quant.c +++ b/lib/rbcodec/codecs/libopus/silk/gain_quant.c | |||
@@ -35,7 +35,6 @@ 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 | ||
39 | /* Gain scalar quantization with hysteresis, uniform on log scale */ | 38 | /* Gain scalar quantization with hysteresis, uniform on log scale */ |
40 | void silk_gains_quant( | 39 | void silk_gains_quant( |
41 | opus_int8 ind[ MAX_NB_SUBFR ], /* O gain indices */ | 40 | opus_int8 ind[ MAX_NB_SUBFR ], /* O gain indices */ |
@@ -77,6 +76,7 @@ void silk_gains_quant( | |||
77 | /* Accumulate deltas */ | 76 | /* Accumulate deltas */ |
78 | if( ind[ k ] > double_step_size_threshold ) { | 77 | if( ind[ k ] > double_step_size_threshold ) { |
79 | *prev_ind += silk_LSHIFT( ind[ k ], 1 ) - double_step_size_threshold; | 78 | *prev_ind += silk_LSHIFT( ind[ k ], 1 ) - double_step_size_threshold; |
79 | *prev_ind = silk_min_int( *prev_ind, N_LEVELS_QGAIN - 1 ); | ||
80 | } else { | 80 | } else { |
81 | *prev_ind += ind[ k ]; | 81 | *prev_ind += ind[ k ]; |
82 | } | 82 | } |
@@ -89,7 +89,6 @@ void silk_gains_quant( | |||
89 | 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 */ |
90 | } | 90 | } |
91 | } | 91 | } |
92 | #endif | ||
93 | 92 | ||
94 | /* Gains scalar dequantization, uniform on log scale */ | 93 | /* Gains scalar dequantization, uniform on log scale */ |
95 | void silk_gains_dequant( | 94 | void silk_gains_dequant( |
@@ -125,7 +124,6 @@ void silk_gains_dequant( | |||
125 | } | 124 | } |
126 | } | 125 | } |
127 | 126 | ||
128 | #if 0 | ||
129 | /* Compute unique identifier of gain indices vector */ | 127 | /* Compute unique identifier of gain indices vector */ |
130 | opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ | 128 | opus_int32 silk_gains_ID( /* O returns unique identifier of gains */ |
131 | const opus_int8 ind[ MAX_NB_SUBFR ], /* I gain indices */ | 129 | const opus_int8 ind[ MAX_NB_SUBFR ], /* I gain indices */ |
@@ -142,4 +140,3 @@ opus_int32 silk_gains_ID( /* O returns | |||
142 | 140 | ||
143 | return gainsID; | 141 | return gainsID; |
144 | } | 142 | } |
145 | #endif | ||