Lines Matching refs:psDec

39     silk_decoder_state          *psDec,                         /* I/O  Decoder state                               */
55 silk_assert( psDec->prev_gain_Q16 != 0 );
57 ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 );
58 ALLOC( sLTP_Q15, psDec->ltp_mem_length + psDec->frame_length, opus_int32 );
59 ALLOC( res_Q14, psDec->subfr_length, opus_int32 );
60 ALLOC( sLPC_Q14, psDec->subfr_length + MAX_LPC_ORDER, opus_int32 );
62 offset_Q10 = silk_Quantization_Offsets_Q10[ psDec->indices.signalType >> 1 ][ psDec->indices.quantOffsetType ];
64 if( psDec->indices.NLSFInterpCoef_Q2 < 1 << 2 ) {
71 rand_seed = psDec->indices.Seed;
72 for( i = 0; i < psDec->frame_length; i++ ) {
74 psDec->exc_Q14[ i ] = silk_LSHIFT( (opus_int32)pulses[ i ], 14 );
75 if( psDec->exc_Q14[ i ] > 0 ) {
76 psDec->exc_Q14[ i ] -= QUANT_LEVEL_ADJUST_Q10 << 4;
78 if( psDec->exc_Q14[ i ] < 0 ) {
79 psDec->exc_Q14[ i ] += QUANT_LEVEL_ADJUST_Q10 << 4;
81 psDec->exc_Q14[ i ] += offset_Q10 << 4;
83 psDec->exc_Q14[ i ] = -psDec->exc_Q14[ i ];
90 silk_memcpy( sLPC_Q14, psDec->sLPC_Q14_buf, MAX_LPC_ORDER * sizeof( opus_int32 ) );
92 pexc_Q14 = psDec->exc_Q14;
94 sLTP_buf_idx = psDec->ltp_mem_length;
96 for( k = 0; k < psDec->nb_subfr; k++ ) {
101 silk_memcpy( A_Q12_tmp, A_Q12, psDec->LPC_order * sizeof( opus_int16 ) );
103 signalType = psDec->indices.signalType;
109 if( psDecCtrl->Gains_Q16[ k ] != psDec->prev_gain_Q16 ) {
110 gain_adj_Q16 = silk_DIV32_varQ( psDec->prev_gain_Q16, psDecCtrl->Gains_Q16[ k ], 16 );
122 psDec->prev_gain_Q16 = psDecCtrl->Gains_Q16[ k ];
125 if( psDec->lossCnt && psDec->prevSignalType == TYPE_VOICED &&
126 psDec->indices.signalType != TYPE_VOICED && k < MAX_NB_SUBFR/2 ) {
132 psDecCtrl->pitchL[ k ] = psDec->lagPrev;
142 start_idx = psDec->ltp_mem_length - lag - psDec->LPC_order - LTP_ORDER / 2;
146 silk_memcpy( &psDec->outBuf[ psDec->ltp_mem_length ], xq, 2 * psDec->subfr_length * sizeof( opus_int16 ) );
149 silk_LPC_analysis_filter( &sLTP[ start_idx ], &psDec->outBuf[ start_idx + k * psDec->subfr_length ],
150 A_Q12, psDec->ltp_mem_length - start_idx, psDec->LPC_order );
158 sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWB( inv_gain_Q31, sLTP[ psDec->ltp_mem_length - i - 1 ] );
174 for( i = 0; i < psDec->subfr_length; i++ ) {
196 for( i = 0; i < psDec->subfr_length; i++ ) {
198 silk_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 );
200 LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 );
211 if( psDec->LPC_order == 16 ) {
227 /* DEBUG_STORE_DATA( dec.pcm, pxq, psDec->subfr_length * sizeof( opus_int16 ) ) */
230 silk_memcpy( sLPC_Q14, &sLPC_Q14[ psDec->subfr_length ], MAX_LPC_ORDER * sizeof( opus_int32 ) );
231 pexc_Q14 += psDec->subfr_length;
232 pxq += psDec->subfr_length;
236 silk_memcpy( psDec->sLPC_Q14_buf, sLPC_Q14, MAX_LPC_ORDER * sizeof( opus_int32 ) );