Lines Matching refs:psDec
42 silk_decoder_state *psDec, /* I/O Decoder state */
47 silk_decoder_state *psDec, /* I/O Decoder state */
55 silk_decoder_state *psDec /* I/O Decoder state */ in silk_PLC_Reset() argument
58 psDec->sPLC.pitchL_Q8 = silk_LSHIFT( psDec->frame_length, 8 - 1 ); in silk_PLC_Reset()
59 psDec->sPLC.prevGain_Q16[ 0 ] = SILK_FIX_CONST( 1, 16 ); in silk_PLC_Reset()
60 psDec->sPLC.prevGain_Q16[ 1 ] = SILK_FIX_CONST( 1, 16 ); in silk_PLC_Reset()
61 psDec->sPLC.subfr_length = 20; in silk_PLC_Reset()
62 psDec->sPLC.nb_subfr = 2; in silk_PLC_Reset()
66 silk_decoder_state *psDec, /* I/O Decoder state */ in silk_PLC() argument
74 if( psDec->fs_kHz != psDec->sPLC.fs_kHz ) { in silk_PLC()
75 silk_PLC_Reset( psDec ); in silk_PLC()
76 psDec->sPLC.fs_kHz = psDec->fs_kHz; in silk_PLC()
83 silk_PLC_conceal( psDec, psDecCtrl, frame, arch ); in silk_PLC()
85 psDec->lossCnt++; in silk_PLC()
90 silk_PLC_update( psDec, psDecCtrl ); in silk_PLC()
98 silk_decoder_state *psDec, /* I/O Decoder state */ in silk_PLC_update() argument
106 psPLC = &psDec->sPLC; in silk_PLC_update()
109 psDec->prevSignalType = psDec->indices.signalType; in silk_PLC_update()
111 if( psDec->indices.signalType == TYPE_VOICED ) { in silk_PLC_update()
113 for( j = 0; j * psDec->subfr_length < psDecCtrl->pitchL[ psDec->nb_subfr - 1 ]; j++ ) { in silk_PLC_update()
114 if( j == psDec->nb_subfr ) { in silk_PLC_update()
119 … temp_LTP_Gain_Q14 += psDecCtrl->LTPCoef_Q14[ ( psDec->nb_subfr - 1 - j ) * LTP_ORDER + i ]; in silk_PLC_update()
124 &psDecCtrl->LTPCoef_Q14[ silk_SMULBB( psDec->nb_subfr - 1 - j, LTP_ORDER ) ], in silk_PLC_update()
127 psPLC->pitchL_Q8 = silk_LSHIFT( psDecCtrl->pitchL[ psDec->nb_subfr - 1 - j ], 8 ); in silk_PLC_update()
155 psPLC->pitchL_Q8 = silk_LSHIFT( silk_SMULBB( psDec->fs_kHz, 18 ), 8 ); in silk_PLC_update()
160 …silk_memcpy( psPLC->prevLPC_Q12, psDecCtrl->PredCoef_Q12[ 1 ], psDec->LPC_order * sizeof( opus_int… in silk_PLC_update()
164 …silk_memcpy( psPLC->prevGain_Q16, &psDecCtrl->Gains_Q16[ psDec->nb_subfr - 2 ], 2 * sizeof( opus_i… in silk_PLC_update()
166 psPLC->subfr_length = psDec->subfr_length; in silk_PLC_update()
167 psPLC->nb_subfr = psDec->nb_subfr; in silk_PLC_update()
195 silk_decoder_state *psDec, /* I/O Decoder state */ in silk_PLC_conceal() argument
216 silk_PLC_struct *psPLC = &psDec->sPLC; in silk_PLC_conceal()
220 ALLOC( sLTP_Q14, psDec->ltp_mem_length + psDec->frame_length, opus_int32 ); in silk_PLC_conceal()
223 …sLTP = ((opus_int16*)&sLTP_Q14[psDec->ltp_mem_length + psDec->frame_length])-psDec->ltp_mem_length; in silk_PLC_conceal()
225 ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 ); in silk_PLC_conceal()
231 if( psDec->first_frame_after_reset ) { in silk_PLC_conceal()
235 …LC_energy(&energy1, &shift1, &energy2, &shift2, psDec->exc_Q14, prevGain_Q10, psDec->subfr_length,… in silk_PLC_conceal()
239 …rand_ptr = &psDec->exc_Q14[ silk_max_int( 0, ( psPLC->nb_subfr - 1 ) * psPLC->subfr_length - RAND_… in silk_PLC_conceal()
242 …rand_ptr = &psDec->exc_Q14[ silk_max_int( 0, psPLC->nb_subfr * psPLC->subfr_length - RAND_BUF_SIZE… in silk_PLC_conceal()
250 harm_Gain_Q15 = HARM_ATT_Q15[ silk_min_int( NB_ATT - 1, psDec->lossCnt ) ]; in silk_PLC_conceal()
251 if( psDec->prevSignalType == TYPE_VOICED ) { in silk_PLC_conceal()
252 rand_Gain_Q15 = PLC_RAND_ATTENUATE_V_Q15[ silk_min_int( NB_ATT - 1, psDec->lossCnt ) ]; in silk_PLC_conceal()
254 rand_Gain_Q15 = PLC_RAND_ATTENUATE_UV_Q15[ silk_min_int( NB_ATT - 1, psDec->lossCnt ) ]; in silk_PLC_conceal()
258 silk_bwexpander( psPLC->prevLPC_Q12, psDec->LPC_order, SILK_FIX_CONST( BWE_COEF, 16 ) ); in silk_PLC_conceal()
261 silk_memcpy( A_Q12, psPLC->prevLPC_Q12, psDec->LPC_order * sizeof( opus_int16 ) ); in silk_PLC_conceal()
264 if( psDec->lossCnt == 0 ) { in silk_PLC_conceal()
268 if( psDec->prevSignalType == TYPE_VOICED ) { in silk_PLC_conceal()
278 invGain_Q30 = silk_LPC_inverse_pred_gain( psPLC->prevLPC_Q12, psDec->LPC_order, arch ); in silk_PLC_conceal()
290 sLTP_buf_idx = psDec->ltp_mem_length; in silk_PLC_conceal()
293 idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2; in silk_PLC_conceal()
295 …silk_LPC_analysis_filter( &sLTP[ idx ], &psDec->outBuf[ idx ], A_Q12, psDec->ltp_mem_length - idx,… in silk_PLC_conceal()
299 for( i = idx + psDec->LPC_order; i < psDec->ltp_mem_length; i++ ) { in silk_PLC_conceal()
306 for( k = 0; k < psDec->nb_subfr; k++ ) { in silk_PLC_conceal()
309 for( i = 0; i < psDec->subfr_length; i++ ) { in silk_PLC_conceal()
331 if ( psDec->indices.signalType != TYPE_NO_VOICE_ACTIVITY ) { in silk_PLC_conceal()
338 … silk_min_32( psPLC->pitchL_Q8, silk_LSHIFT( silk_SMULBB( MAX_PITCH_LAG_MS, psDec->fs_kHz ), 8 ) ); in silk_PLC_conceal()
345 sLPC_Q14_ptr = &sLTP_Q14[ psDec->ltp_mem_length - MAX_LPC_ORDER ]; in silk_PLC_conceal()
348 silk_memcpy( sLPC_Q14_ptr, psDec->sLPC_Q14_buf, MAX_LPC_ORDER * sizeof( opus_int32 ) ); in silk_PLC_conceal()
350 celt_assert( psDec->LPC_order >= 10 ); /* check that unrolling works */ in silk_PLC_conceal()
351 for( i = 0; i < psDec->frame_length; i++ ) { in silk_PLC_conceal()
354 LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 ); in silk_PLC_conceal()
365 for( j = 10; j < psDec->LPC_order; j++ ) { in silk_PLC_conceal()
378 …silk_memcpy( psDec->sLPC_Q14_buf, &sLPC_Q14_ptr[ psDec->frame_length ], MAX_LPC_ORDER * sizeof( op… in silk_PLC_conceal()
393 silk_decoder_state *psDec, /* I/O decoder state */ in silk_PLC_glue_frames() argument
401 psPLC = &psDec->sPLC; in silk_PLC_glue_frames()
403 if( psDec->lossCnt ) { in silk_PLC_glue_frames()
409 if( psDec->sPLC.last_frame_lost ) { in silk_PLC_glue_frames()