Lines Matching refs:psEnc
145 silk_encoder_state_FIX *psEnc, /* I/O Encoder state FIX */
152 silk_shape_state_FIX *psShapeSt = &psEnc->sShape;
166 x_ptr = x - psEnc->sCmn.la_shape;
171 SNR_adj_dB_Q7 = psEnc->sCmn.SNR_dB_Q7;
174 psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_bands_Q15[ 0 ]
175 + psEnc->sCmn.input_quality_bands_Q15[ 1 ], 2 );
182 if( psEnc->sCmn.useCBR == 0 ) {
183 b_Q8 = SILK_FIX_CONST( 1.0, 8 ) - psEnc->sCmn.speech_activity_Q8;
190 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {
192 SNR_adj_dB_Q7 = silk_SMLAWB( SNR_adj_dB_Q7, SILK_FIX_CONST( HARM_SNR_INCR_dB, 8 ), psEnc->LTPCorr_Q15 );
196 silk_SMLAWB( SILK_FIX_CONST( 6.0, 9 ), -SILK_FIX_CONST( 0.4, 18 ), psEnc->sCmn.SNR_dB_Q7 ),
204 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {
206 psEnc->sCmn.indices.quantOffsetType = 0;
210 nSamples = silk_LSHIFT( psEnc->sCmn.fs_kHz, 1 );
214 for( k = 0; k < silk_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr ) / 2; k++ ) {
231 psEnc->sCmn.indices.quantOffsetType = 0;
233 psEnc->sCmn.indices.quantOffsetType = 1;
254 if( psEnc->sCmn.warping_Q16 > 0 ) {
256 warping_Q16 = silk_SMLAWB( psEnc->sCmn.warping_Q16, (opus_int32)psEncCtrl->coding_quality_Q14, SILK_FIX_CONST( 0.01, 18 ) );
264 ALLOC( x_windowed, psEnc->sCmn.shapeWinLength, opus_int16 );
265 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
268 flat_part = psEnc->sCmn.fs_kHz * 3;
269 slope_part = silk_RSHIFT( psEnc->sCmn.shapeWinLength - flat_part, 1 );
278 x_ptr += psEnc->sCmn.subfr_length;
280 if( psEnc->sCmn.warping_Q16 > 0 ) {
282 silk_warped_autocorrelation_FIX( auto_corr, &scale, x_windowed, warping_Q16, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder );
285 silk_autocorr( auto_corr, &scale, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1, arch );
293 nrg = silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder );
297 silk_k2a_Q16( AR2_Q24, refl_coef_Q16, psEnc->sCmn.shapingLPCOrder );
314 if( psEnc->sCmn.warping_Q16 > 0 ) {
316 gain_mult_Q16 = warped_gain( AR2_Q24, warping_Q16, psEnc->sCmn.shapingLPCOrder );
326 silk_bwexpander_32( AR2_Q24, psEnc->sCmn.shapingLPCOrder, BWExp2_Q16 );
329 silk_memcpy( AR1_Q24, AR2_Q24, psEnc->sCmn.shapingLPCOrder * sizeof( opus_int32 ) );
333 silk_bwexpander_32( AR1_Q24, psEnc->sCmn.shapingLPCOrder, BWExp1_Q16 );
336 pre_nrg_Q30 = silk_LPC_inverse_pred_gain_Q24( AR2_Q24, psEnc->sCmn.shapingLPCOrder );
337 nrg = silk_LPC_inverse_pred_gain_Q24( AR1_Q24, psEnc->sCmn.shapingLPCOrder );
344 limit_warped_coefs( AR2_Q24, AR1_Q24, warping_Q16, SILK_FIX_CONST( 3.999, 24 ), psEnc->sCmn.shapingLPCOrder );
347 for( i = 0; i < psEnc->sCmn.shapingLPCOrder; i++ ) {
360 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
368 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
377 SILK_FIX_CONST( LOW_QUALITY_LOW_FREQ_SHAPING_DECR, 13 ), psEnc->sCmn.input_quality_bands_Q15[ 0 ] - SILK_FIX_CONST( 1.0, 15 ) ) );
378 strength_Q16 = silk_RSHIFT( silk_MUL( strength_Q16, psEnc->sCmn.speech_activity_Q8 ), 8 );
379 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {
382 opus_int fs_kHz_inv = silk_DIV32_16( SILK_FIX_CONST( 0.2, 14 ), psEnc->sCmn.fs_kHz );
383 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
392 silk_SMULWB( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ), psEnc->sCmn.speech_activity_Q8 ) );
394 b_Q14 = silk_DIV32_16( 21299, psEnc->sCmn.fs_kHz ); /* 1.3_Q0 = 21299_Q14*/
399 for( k = 1; k < psEnc->sCmn.nb_subfr; k++ ) {
410 psEnc->LTPCorr_Q15 ), SILK_FIX_CONST( LOW_RATE_HARMONIC_BOOST, 16 ) );
416 if( USE_HARM_SHAPING && psEnc->sCmn.indices.signalType == TYPE_VOICED ) {
424 silk_SQRT_APPROX( silk_LSHIFT( psEnc->LTPCorr_Q15, 15 ) ) );