Lines Matching refs:channel_state
40 silk_decoder_state channel_state[ DECODER_NUM_CHANNELS ]; member
68 silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state; in silk_InitDecoder() local
71 ret = silk_init_decoder( &channel_state[ n ] ); in silk_InitDecoder()
101 silk_decoder_state *channel_state = psDec->channel_state; in silk_Decode() local
114 channel_state[ n ].nFramesDecoded = 0; /* Used to count frames in packet */ in silk_Decode()
120 ret += silk_init_decoder( &channel_state[ 1 ] ); in silk_Decode()
124 ( decControl->internalSampleRate == 1000*channel_state[ 0 ].fs_kHz ); in silk_Decode()
126 if( channel_state[ 0 ].nFramesDecoded == 0 ) { in silk_Decode()
131 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
132 channel_state[ n ].nb_subfr = 2; in silk_Decode()
134 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
135 channel_state[ n ].nb_subfr = 2; in silk_Decode()
137 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
138 channel_state[ n ].nb_subfr = 4; in silk_Decode()
140 channel_state[ n ].nFramesPerPacket = 2; in silk_Decode()
141 channel_state[ n ].nb_subfr = 4; in silk_Decode()
143 channel_state[ n ].nFramesPerPacket = 3; in silk_Decode()
144 channel_state[ n ].nb_subfr = 4; in silk_Decode()
156 … ret += silk_decoder_set_fs( &channel_state[ n ], fs_kHz_dec, decControl->API_sampleRate ); in silk_Decode()
163 …silk_memcpy( &channel_state[ 1 ].resampler_state, &channel_state[ 0 ].resampler_state, sizeof( sil… in silk_Decode()
174 if( lostFlag != FLAG_PACKET_LOST && channel_state[ 0 ].nFramesDecoded == 0 ) { in silk_Decode()
178 for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) { in silk_Decode()
179 channel_state[ n ].VAD_flags[ i ] = ec_dec_bit_logp(psRangeDec, 1); in silk_Decode()
181 channel_state[ n ].LBRR_flag = ec_dec_bit_logp(psRangeDec, 1); in silk_Decode()
185 … silk_memset( channel_state[ n ].LBRR_flags, 0, sizeof( channel_state[ n ].LBRR_flags ) ); in silk_Decode()
186 if( channel_state[ n ].LBRR_flag ) { in silk_Decode()
187 if( channel_state[ n ].nFramesPerPacket == 1 ) { in silk_Decode()
188 channel_state[ n ].LBRR_flags[ 0 ] = 1; in silk_Decode()
190 …LBRR_symbol = ec_dec_icdf( psRangeDec, silk_LBRR_flags_iCDF_ptr[ channel_state[ n ].nFramesPerPack… in silk_Decode()
191 for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) { in silk_Decode()
192 channel_state[ n ].LBRR_flags[ i ] = silk_RSHIFT( LBRR_symbol, i ) & 1; in silk_Decode()
200 for( i = 0; i < channel_state[ 0 ].nFramesPerPacket; i++ ) { in silk_Decode()
202 if( channel_state[ n ].LBRR_flags[ i ] ) { in silk_Decode()
208 if( channel_state[ 1 ].LBRR_flags[ i ] == 0 ) { in silk_Decode()
213 if( i > 0 && channel_state[ n ].LBRR_flags[ i - 1 ] ) { in silk_Decode()
218 silk_decode_indices( &channel_state[ n ], psRangeDec, i, 1, condCoding ); in silk_Decode()
219 … silk_decode_pulses( psRangeDec, pulses, channel_state[ n ].indices.signalType, in silk_Decode()
220 … channel_state[ n ].indices.quantOffsetType, channel_state[ n ].frame_length ); in silk_Decode()
230 …( lostFlag == FLAG_DECODE_LBRR && channel_state[ 0 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded… in silk_Decode()
234 …if( ( lostFlag == FLAG_DECODE_NORMAL && channel_state[ 1 ].VAD_flags[ channel_state[ 0 ].nFramesDe… in silk_Decode()
235 …( lostFlag == FLAG_DECODE_LBRR && channel_state[ 1 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded… in silk_Decode()
250 … silk_memset( psDec->channel_state[ 1 ].outBuf, 0, sizeof(psDec->channel_state[ 1 ].outBuf) ); in silk_Decode()
251 …silk_memset( psDec->channel_state[ 1 ].sLPC_Q14_buf, 0, sizeof(psDec->channel_state[ 1 ].sLPC_Q14_… in silk_Decode()
252 psDec->channel_state[ 1 ].lagPrev = 100; in silk_Decode()
253 psDec->channel_state[ 1 ].LastGainIndex = 10; in silk_Decode()
254 psDec->channel_state[ 1 ].prevSignalType = TYPE_NO_VOICE_ACTIVITY; in silk_Decode()
255 psDec->channel_state[ 1 ].first_frame_after_reset = 1; in silk_Decode()
264 : decControl->nChannelsInternal*(channel_state[ 0 ].frame_length + 2 ), in silk_Decode()
269 samplesOut1_tmp[ 1 ] = samplesOut + channel_state[ 0 ].frame_length + 2; in silk_Decode()
272 samplesOut1_tmp[ 1 ] = samplesOut1_tmp_storage1 + channel_state[ 0 ].frame_length + 2; in silk_Decode()
279 …annelsInternal == 2 && lostFlag == FLAG_DECODE_LBRR && channel_state[1].LBRR_flags[ channel_state[… in silk_Decode()
287 FrameIndex = channel_state[ 0 ].nFramesDecoded - n; in silk_Decode()
292 …condCoding = channel_state[ n ].LBRR_flags[ FrameIndex - 1 ] ? CODE_CONDITIONALLY : CODE_INDEPENDE… in silk_Decode()
300 …ret += silk_decode_frame( &channel_state[ n ], psRangeDec, &samplesOut1_tmp[ n ][ 2 ], &nSamplesOu… in silk_Decode()
304 channel_state[ n ].nFramesDecoded++; in silk_Decode()
309 …ec->sStereo, samplesOut1_tmp[ 0 ], samplesOut1_tmp[ 1 ], MS_pred_Q13, channel_state[ 0 ].fs_kHz, n… in silk_Decode()
317 …silk_DIV32( nSamplesOutDec * decControl->API_sampleRate, silk_SMULBB( channel_state[ 0 ].fs_kHz, 1… in silk_Decode()
329 ? decControl->nChannelsInternal*(channel_state[ 0 ].frame_length + 2 ) in silk_Decode()
333 …OPUS_COPY(samplesOut1_tmp_storage2, samplesOut, decControl->nChannelsInternal*(channel_state[ 0 ].… in silk_Decode()
335 samplesOut1_tmp[ 1 ] = samplesOut1_tmp_storage2 + channel_state[ 0 ].frame_length + 2; in silk_Decode()
340 …ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ n … in silk_Decode()
355 …ret += silk_resampler( &channel_state[ 1 ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ 0 … in silk_Decode()
368 if( channel_state[ 0 ].prevSignalType == TYPE_VOICED ) { in silk_Decode()
370 …decControl->prevPitchLag = channel_state[ 0 ].lagPrev * mult_tab[ ( channel_state[ 0 ].fs_kHz - 8 … in silk_Decode()
379 psDec->channel_state[ i ].LastGainIndex = 10; in silk_Decode()