OLD | NEW |
1 /*********************************************************************** | 1 /*********************************************************************** |
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. | 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
3 Redistribution and use in source and binary forms, with or without | 3 Redistribution and use in source and binary forms, with or without |
4 modification, are permitted provided that the following conditions | 4 modification, are permitted provided that the following conditions |
5 are met: | 5 are met: |
6 - Redistributions of source code must retain the above copyright notice, | 6 - Redistributions of source code must retain the above copyright notice, |
7 this list of conditions and the following disclaimer. | 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. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 | 149 |
150 if( psIndices->signalType == TYPE_VOICED ) { | 150 if( psIndices->signalType == TYPE_VOICED ) { |
151 LTP_scale_Q14 = silk_LTPScales_table_Q14[ psIndices->LTP_scaleIndex ]; | 151 LTP_scale_Q14 = silk_LTPScales_table_Q14[ psIndices->LTP_scaleIndex ]; |
152 } else { | 152 } else { |
153 LTP_scale_Q14 = 0; | 153 LTP_scale_Q14 = 0; |
154 } | 154 } |
155 | 155 |
156 /* Convert input to fix */ | 156 /* Convert input to fix */ |
157 for( i = 0; i < psEnc->sCmn.frame_length; i++ ) { | 157 for( i = 0; i < psEnc->sCmn.frame_length; i++ ) { |
158 x_Q3[ i ] = silk_float2int( 8.0 * x[ i ] ); | 158 x_Q3[ i ] = silk_float2int( 8.0f * x[ i ] ); |
159 } | 159 } |
160 | 160 |
161 /* Call NSQ */ | 161 /* Call NSQ */ |
162 if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 )
{ | 162 if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 )
{ |
163 silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef
_Q12[ 0 ], LTPCoef_Q14, | 163 silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef
_Q12[ 0 ], LTPCoef_Q14, |
164 AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCt
rl->pitchL, Lambda_Q10, LTP_scale_Q14 ); | 164 AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCt
rl->pitchL, Lambda_Q10, LTP_scale_Q14 ); |
165 } else { | 165 } else { |
166 silk_NSQ( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0
], LTPCoef_Q14, | 166 silk_NSQ( &psEnc->sCmn, psNSQ, psIndices, x_Q3, pulses, PredCoef_Q12[ 0
], LTPCoef_Q14, |
167 AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCt
rl->pitchL, Lambda_Q10, LTP_scale_Q14 ); | 167 AR2_Q13, HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCt
rl->pitchL, Lambda_Q10, LTP_scale_Q14 ); |
168 } | 168 } |
(...skipping 22 matching lines...) Expand all Loading... |
191 for( i = 0; i < nb_subfr * LTP_ORDER * LTP_ORDER; i++ ) { | 191 for( i = 0; i < nb_subfr * LTP_ORDER * LTP_ORDER; i++ ) { |
192 W_Q18[ i ] = (opus_int32)silk_float2int( W[ i ] * 262144.0f ); | 192 W_Q18[ i ] = (opus_int32)silk_float2int( W[ i ] * 262144.0f ); |
193 } | 193 } |
194 | 194 |
195 silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, W_Q18, mu_Q10, lo
wComplexity, nb_subfr ); | 195 silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, W_Q18, mu_Q10, lo
wComplexity, nb_subfr ); |
196 | 196 |
197 for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) { | 197 for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) { |
198 B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f ); | 198 B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f ); |
199 } | 199 } |
200 } | 200 } |
OLD | NEW |