Lines Matching refs:channel_state
39 silk_decoder_state channel_state[ DECODER_NUM_CHANNELS ]; member
67 silk_decoder_state *channel_state = ((silk_decoder *)decState)->channel_state; in silk_InitDecoder() local
70 ret = silk_init_decoder( &channel_state[ n ] ); in silk_InitDecoder()
98 silk_decoder_state *channel_state = psDec->channel_state; in silk_Decode() local
110 channel_state[ n ].nFramesDecoded = 0; /* Used to count frames in packet */ in silk_Decode()
116 ret += silk_init_decoder( &channel_state[ 1 ] ); in silk_Decode()
120 ( decControl->internalSampleRate == 1000*channel_state[ 0 ].fs_kHz ); in silk_Decode()
122 if( channel_state[ 0 ].nFramesDecoded == 0 ) { in silk_Decode()
127 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
128 channel_state[ n ].nb_subfr = 2; in silk_Decode()
130 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
131 channel_state[ n ].nb_subfr = 2; in silk_Decode()
133 channel_state[ n ].nFramesPerPacket = 1; in silk_Decode()
134 channel_state[ n ].nb_subfr = 4; in silk_Decode()
136 channel_state[ n ].nFramesPerPacket = 2; in silk_Decode()
137 channel_state[ n ].nb_subfr = 4; in silk_Decode()
139 channel_state[ n ].nFramesPerPacket = 3; in silk_Decode()
140 channel_state[ n ].nb_subfr = 4; in silk_Decode()
152 … ret += silk_decoder_set_fs( &channel_state[ n ], fs_kHz_dec, decControl->API_sampleRate ); in silk_Decode()
159 …silk_memcpy( &channel_state[ 1 ].resampler_state, &channel_state[ 0 ].resampler_state, sizeof( sil… in silk_Decode()
170 if( lostFlag != FLAG_PACKET_LOST && channel_state[ 0 ].nFramesDecoded == 0 ) { in silk_Decode()
174 for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) { in silk_Decode()
175 channel_state[ n ].VAD_flags[ i ] = ec_dec_bit_logp(psRangeDec, 1); in silk_Decode()
177 channel_state[ n ].LBRR_flag = ec_dec_bit_logp(psRangeDec, 1); in silk_Decode()
181 … silk_memset( channel_state[ n ].LBRR_flags, 0, sizeof( channel_state[ n ].LBRR_flags ) ); in silk_Decode()
182 if( channel_state[ n ].LBRR_flag ) { in silk_Decode()
183 if( channel_state[ n ].nFramesPerPacket == 1 ) { in silk_Decode()
184 channel_state[ n ].LBRR_flags[ 0 ] = 1; in silk_Decode()
186 …LBRR_symbol = ec_dec_icdf( psRangeDec, silk_LBRR_flags_iCDF_ptr[ channel_state[ n ].nFramesPerPack… in silk_Decode()
187 for( i = 0; i < channel_state[ n ].nFramesPerPacket; i++ ) { in silk_Decode()
188 channel_state[ n ].LBRR_flags[ i ] = silk_RSHIFT( LBRR_symbol, i ) & 1; in silk_Decode()
196 for( i = 0; i < channel_state[ 0 ].nFramesPerPacket; i++ ) { in silk_Decode()
198 if( channel_state[ n ].LBRR_flags[ i ] ) { in silk_Decode()
204 if( channel_state[ 1 ].LBRR_flags[ i ] == 0 ) { in silk_Decode()
209 if( i > 0 && channel_state[ n ].LBRR_flags[ i - 1 ] ) { in silk_Decode()
214 silk_decode_indices( &channel_state[ n ], psRangeDec, i, 1, condCoding ); in silk_Decode()
215 … silk_decode_pulses( psRangeDec, pulses, channel_state[ n ].indices.signalType, in silk_Decode()
216 … channel_state[ n ].indices.quantOffsetType, channel_state[ n ].frame_length ); in silk_Decode()
226 …( lostFlag == FLAG_DECODE_LBRR && channel_state[ 0 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded… in silk_Decode()
230 …if( ( lostFlag == FLAG_DECODE_NORMAL && channel_state[ 1 ].VAD_flags[ channel_state[ 0 ].nFramesDe… in silk_Decode()
231 …( lostFlag == FLAG_DECODE_LBRR && channel_state[ 1 ].LBRR_flags[ channel_state[ 0 ].nFramesDecoded… in silk_Decode()
246 … silk_memset( psDec->channel_state[ 1 ].outBuf, 0, sizeof(psDec->channel_state[ 1 ].outBuf) ); in silk_Decode()
247 …silk_memset( psDec->channel_state[ 1 ].sLPC_Q14_buf, 0, sizeof(psDec->channel_state[ 1 ].sLPC_Q14_… in silk_Decode()
248 psDec->channel_state[ 1 ].lagPrev = 100; in silk_Decode()
249 psDec->channel_state[ 1 ].LastGainIndex = 10; in silk_Decode()
250 psDec->channel_state[ 1 ].prevSignalType = TYPE_NO_VOICE_ACTIVITY; in silk_Decode()
251 psDec->channel_state[ 1 ].first_frame_after_reset = 1; in silk_Decode()
256 channel_state[ 0 ].frame_length + 2 ), in silk_Decode()
260 + channel_state[ 0 ].frame_length + 2; in silk_Decode()
266 …annelsInternal == 2 && lostFlag == FLAG_DECODE_LBRR && channel_state[1].LBRR_flags[ channel_state[… in silk_Decode()
274 FrameIndex = channel_state[ 0 ].nFramesDecoded - n; in silk_Decode()
279 …condCoding = channel_state[ n ].LBRR_flags[ FrameIndex - 1 ] ? CODE_CONDITIONALLY : CODE_INDEPENDE… in silk_Decode()
287 …ret += silk_decode_frame( &channel_state[ n ], psRangeDec, &samplesOut1_tmp[ n ][ 2 ], &nSamplesOu… in silk_Decode()
291 channel_state[ n ].nFramesDecoded++; in silk_Decode()
296 …ec->sStereo, samplesOut1_tmp[ 0 ], samplesOut1_tmp[ 1 ], MS_pred_Q13, channel_state[ 0 ].fs_kHz, n… in silk_Decode()
304 …silk_DIV32( nSamplesOutDec * decControl->API_sampleRate, silk_SMULBB( channel_state[ 0 ].fs_kHz, 1… in silk_Decode()
318 …ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ n … in silk_Decode()
333 …ret += silk_resampler( &channel_state[ 1 ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ 0 … in silk_Decode()
346 if( channel_state[ 0 ].prevSignalType == TYPE_VOICED ) { in silk_Decode()
348 …decControl->prevPitchLag = channel_state[ 0 ].lagPrev * mult_tab[ ( channel_state[ 0 ].fs_kHz - 8 … in silk_Decode()
357 psDec->channel_state[ i ].LastGainIndex = 10; in silk_Decode()