Lines Matching refs:state_Fxx
84 if( ret += silk_init_encoder( &psEnc->state_Fxx[ n ], arch ) ) { in silk_InitEncoder()
109 silk_encoder_state_Fxx *state_Fxx; in silk_QueryEncoder() local
112 state_Fxx = psEnc->state_Fxx; in silk_QueryEncoder()
116 encStatus->API_sampleRate = state_Fxx[ 0 ].sCmn.API_fs_Hz; in silk_QueryEncoder()
117 encStatus->maxInternalSampleRate = state_Fxx[ 0 ].sCmn.maxInternal_fs_Hz; in silk_QueryEncoder()
118 encStatus->minInternalSampleRate = state_Fxx[ 0 ].sCmn.minInternal_fs_Hz; in silk_QueryEncoder()
119 encStatus->desiredInternalSampleRate = state_Fxx[ 0 ].sCmn.desiredInternal_fs_Hz; in silk_QueryEncoder()
120 encStatus->payloadSize_ms = state_Fxx[ 0 ].sCmn.PacketSize_ms; in silk_QueryEncoder()
121 encStatus->bitRate = state_Fxx[ 0 ].sCmn.TargetRate_bps; in silk_QueryEncoder()
122 encStatus->packetLossPercentage = state_Fxx[ 0 ].sCmn.PacketLoss_perc; in silk_QueryEncoder()
123 encStatus->complexity = state_Fxx[ 0 ].sCmn.Complexity; in silk_QueryEncoder()
124 encStatus->useInBandFEC = state_Fxx[ 0 ].sCmn.useInBandFEC; in silk_QueryEncoder()
125 encStatus->useDTX = state_Fxx[ 0 ].sCmn.useDTX; in silk_QueryEncoder()
126 encStatus->useCBR = state_Fxx[ 0 ].sCmn.useCBR; in silk_QueryEncoder()
127 encStatus->internalSampleRate = silk_SMULBB( state_Fxx[ 0 ].sCmn.fs_kHz, 1000 ); in silk_QueryEncoder()
128 encStatus->allowBandwidthSwitch = state_Fxx[ 0 ].sCmn.allow_bandwidth_switch; in silk_QueryEncoder()
129 …encStatus->inWBmodeWithoutVariableLP = state_Fxx[ 0 ].sCmn.fs_kHz == 16 && state_Fxx[ 0 ].sCmn.sLP… in silk_QueryEncoder()
162 psEnc->state_Fxx[0].sCmn.first_frame_after_reset = 1; in silk_Encode()
163 psEnc->state_Fxx[1].sCmn.first_frame_after_reset = 1; in silk_Encode()
165 psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded = psEnc->state_Fxx[ 1 ].sCmn.nFramesEncoded = 0; in silk_Encode()
178 ret += silk_init_encoder( &psEnc->state_Fxx[ 1 ], psEnc->state_Fxx[ 0 ].sCmn.arch ); in silk_Encode()
188 …silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, &psEnc->state_Fxx[ 0 ].sCmn.resampler_st… in silk_Encode()
189 …silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.In_HP_State, &psEnc->state_Fxx[ 0 ].sCmn.In_HP_State,… in silk_Encode()
193 …transition = (encControl->payloadSize_ms != psEnc->state_Fxx[ 0 ].sCmn.PacketSize_ms) || (psEnc->n… in silk_Encode()
210 ret = silk_init_encoder( &psEnc->state_Fxx[ n ], psEnc->state_Fxx[ n ].sCmn.arch ); in silk_Encode()
218 psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0; in silk_Encode()
219 psEnc->state_Fxx[ n ].sCmn.prefillFlag = 1; in silk_Encode()
239 opus_int force_fs_kHz = (n==1) ? psEnc->state_Fxx[0].sCmn.fs_kHz : 0; in silk_Encode()
240 …if( ( ret = silk_control_encoder( &psEnc->state_Fxx[ n ], encControl, TargetRate_bps, psEnc->allow… in silk_Encode()
245 if( psEnc->state_Fxx[n].sCmn.first_frame_after_reset || transition ) { in silk_Encode()
246 for( i = 0; i < psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket; i++ ) { in silk_Encode()
247 psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ] = 0; in silk_Encode()
250 psEnc->state_Fxx[ n ].sCmn.inDTX = psEnc->state_Fxx[ n ].sCmn.useDTX; in silk_Encode()
252 …assert( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 0 ].sCmn.fs_kHz == psEnc->state_Fx… in silk_Encode()
256 10 * nBlocksOf10ms * psEnc->state_Fxx[ 0 ].sCmn.fs_kHz; in silk_Encode()
259 psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz, in silk_Encode()
260 psEnc->state_Fxx[ 0 ].sCmn.fs_kHz * 1000 ); in silk_Encode()
263 …nSamplesToBuffer = psEnc->state_Fxx[ 0 ].sCmn.frame_length - psEnc->state_Fxx[ 0 ].sCmn.inputBufI… in silk_Encode()
265 …FromInput = silk_DIV32_16( nSamplesToBuffer * psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz, psEnc->state_F… in silk_Encode()
268 opus_int id = psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded; in silk_Encode()
274 …silk_memcpy( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, &psEnc->state_Fxx[ 0 ].sCmn.resampler_st… in silk_Encode()
277 ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state, in silk_Encode()
278 …&psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFr… in silk_Encode()
279 psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer; in silk_Encode()
281 …nSamplesToBuffer = psEnc->state_Fxx[ 1 ].sCmn.frame_length - psEnc->state_Fxx[ 1 ].sCmn.inputBufI… in silk_Encode()
282 …nSamplesToBuffer = silk_min( nSamplesToBuffer, 10 * nBlocksOf10ms * psEnc->state_Fxx[ 1 ].sCmn.fs… in silk_Encode()
286 ret += silk_resampler( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, in silk_Encode()
287 …&psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx + 2 ], buf, nSamplesFr… in silk_Encode()
289 psEnc->state_Fxx[ 1 ].sCmn.inputBufIx += nSamplesToBuffer; in silk_Encode()
296 ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state, in silk_Encode()
297 …&psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFr… in silk_Encode()
299 … if( psEnc->nPrevChannelsInternal == 2 && psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == 0 ) { in silk_Encode()
300 ret += silk_resampler( &psEnc->state_Fxx[ 1 ].sCmn.resampler_state, in silk_Encode()
301 …&psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx + 2 ], buf, nSamplesFr… in silk_Encode()
302 for( n = 0; n < psEnc->state_Fxx[ 0 ].sCmn.frame_length; n++ ) { in silk_Encode()
303 psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx+n+2 ] = in silk_Encode()
304 … silk_RSHIFT(psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx+n+2 ] in silk_Encode()
305 … + psEnc->state_Fxx[ 1 ].sCmn.inputBuf[ psEnc->state_Fxx[ 1 ].sCmn.inputBufIx+n+2 ], 1); in silk_Encode()
308 psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer; in silk_Encode()
312 ret += silk_resampler( &psEnc->state_Fxx[ 0 ].sCmn.resampler_state, in silk_Encode()
313 …&psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn.inputBufIx + 2 ], buf, nSamplesFr… in silk_Encode()
314 psEnc->state_Fxx[ 0 ].sCmn.inputBufIx += nSamplesToBuffer; in silk_Encode()
324 if( psEnc->state_Fxx[ 0 ].sCmn.inputBufIx >= psEnc->state_Fxx[ 0 ].sCmn.frame_length ) { in silk_Encode()
326 … silk_assert( psEnc->state_Fxx[ 0 ].sCmn.inputBufIx == psEnc->state_Fxx[ 0 ].sCmn.frame_length ); in silk_Encode()
327 …sert( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 1 ].sCmn.inputBufIx == psEnc->state_… in silk_Encode()
330 if( psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == 0 && !prefillFlag ) { in silk_Encode()
333 …iCDF[ 0 ] = 256 - silk_RSHIFT( 256, ( psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket + 1 ) * encContr… in silk_Encode()
340 for( i = 0; i < psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket; i++ ) { in silk_Encode()
341 LBRR_symbol |= silk_LSHIFT( psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ], i ); in silk_Encode()
343 psEnc->state_Fxx[ n ].sCmn.LBRR_flag = LBRR_symbol > 0 ? 1 : 0; in silk_Encode()
344 if( LBRR_symbol && psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket > 1 ) { in silk_Encode()
345 …enc_icdf( psRangeEnc, LBRR_symbol - 1, silk_LBRR_flags_iCDF_ptr[ psEnc->state_Fxx[ n ].sCmn.nFrame… in silk_Encode()
350 for( i = 0; i < psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket; i++ ) { in silk_Encode()
352 if( psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i ] ) { in silk_Encode()
358 if( psEnc->state_Fxx[ 1 ].sCmn.LBRR_flags[ i ] == 0 ) { in silk_Encode()
363 if( i > 0 && psEnc->state_Fxx[ n ].sCmn.LBRR_flags[ i - 1 ] ) { in silk_Encode()
368 … silk_encode_indices( &psEnc->state_Fxx[ n ].sCmn, psRangeEnc, i, 1, condCoding ); in silk_Encode()
369 …silk_encode_pulses( psRangeEnc, psEnc->state_Fxx[ n ].sCmn.indices_LBRR[i].signalType, psEnc->stat… in silk_Encode()
370 … psEnc->state_Fxx[ n ].sCmn.pulses_LBRR[ i ], psEnc->state_Fxx[ n ].sCmn.frame_length ); in silk_Encode()
377 …silk_memset( psEnc->state_Fxx[ n ].sCmn.LBRR_flags, 0, sizeof( psEnc->state_Fxx[ n ].sCmn.LBRR_fla… in silk_Encode()
381 silk_HP_variable_cutoff( psEnc->state_Fxx ); in silk_Encode()
390 …nBits = silk_DIV32_16( nBits, psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket - psEnc->state_Fxx[ 0 ].… in silk_Encode()
404 …silk_stereo_LR_to_MS( &psEnc->sStereo, &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ 2 ], &psEnc->state_Fx… in silk_Encode()
405 …psEnc->sStereo.predIx[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ], &psEnc->sStereo.mid_only_flags… in silk_Encode()
406 …MStargetRates_bps, TargetRate_bps, psEnc->state_Fxx[ 0 ].sCmn.speech_activity_Q8, encControl->toMo… in silk_Encode()
407 psEnc->state_Fxx[ 0 ].sCmn.fs_kHz, psEnc->state_Fxx[ 0 ].sCmn.frame_length ); in silk_Encode()
408 … if( psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] == 0 ) { in silk_Encode()
411 …silk_memset( &psEnc->state_Fxx[ 1 ].sShape, 0, sizeof( psEnc->state_Fxx[ 1 ].sShape … in silk_Encode()
412 …silk_memset( &psEnc->state_Fxx[ 1 ].sPrefilt, 0, sizeof( psEnc->state_Fxx[ 1 ].sPrefil… in silk_Encode()
413 …silk_memset( &psEnc->state_Fxx[ 1 ].sCmn.sNSQ, 0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.sN… in silk_Encode()
414 …silk_memset( psEnc->state_Fxx[ 1 ].sCmn.prev_NLSFq_Q15, 0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.pr… in silk_Encode()
415 …silk_memset( &psEnc->state_Fxx[ 1 ].sCmn.sLP.In_LP_State, 0, sizeof( psEnc->state_Fxx[ 1 ].sCmn.sL… in silk_Encode()
416 psEnc->state_Fxx[ 1 ].sCmn.prevLag = 100; in silk_Encode()
417 psEnc->state_Fxx[ 1 ].sCmn.sNSQ.lagPrev = 100; in silk_Encode()
418 psEnc->state_Fxx[ 1 ].sShape.LastGainIndex = 10; in silk_Encode()
419 psEnc->state_Fxx[ 1 ].sCmn.prevSignalType = TYPE_NO_VOICE_ACTIVITY; in silk_Encode()
420 psEnc->state_Fxx[ 1 ].sCmn.sNSQ.prev_gain_Q16 = 65536; in silk_Encode()
421 psEnc->state_Fxx[ 1 ].sCmn.first_frame_after_reset = 1; in silk_Encode()
423 silk_encode_do_VAD_Fxx( &psEnc->state_Fxx[ 1 ] ); in silk_Encode()
425 … psEnc->state_Fxx[ 1 ].sCmn.VAD_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] = 0; in silk_Encode()
428 …silk_stereo_encode_pred( psRangeEnc, psEnc->sStereo.predIx[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEnco… in silk_Encode()
429 … if( psEnc->state_Fxx[ 1 ].sCmn.VAD_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded ] == 0 ) { in silk_Encode()
430 …ereo_encode_mid_only( psRangeEnc, psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFrame… in silk_Encode()
435 … silk_memcpy( psEnc->state_Fxx[ 0 ].sCmn.inputBuf, psEnc->sStereo.sMid, 2 * sizeof( opus_int16 ) ); in silk_Encode()
436 …silk_memcpy( psEnc->sStereo.sMid, &psEnc->state_Fxx[ 0 ].sCmn.inputBuf[ psEnc->state_Fxx[ 0 ].sCmn… in silk_Encode()
438 silk_encode_do_VAD_Fxx( &psEnc->state_Fxx[ 0 ] ); in silk_Encode()
471 silk_control_SNR( &psEnc->state_Fxx[ n ].sCmn, channelRate_bps ); in silk_Encode()
474 if( psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded - n <= 0 ) { in silk_Encode()
483 …if( ( ret = silk_encode_frame_Fxx( &psEnc->state_Fxx[ n ], nBytesOut, psRangeEnc, condCoding, maxB… in silk_Encode()
487 psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0; in silk_Encode()
488 psEnc->state_Fxx[ n ].sCmn.inputBufIx = 0; in silk_Encode()
489 psEnc->state_Fxx[ n ].sCmn.nFramesEncoded++; in silk_Encode()
491 …psEnc->prev_decode_only_middle = psEnc->sStereo.mid_only_flags[ psEnc->state_Fxx[ 0 ].sCmn.nFrames… in silk_Encode()
494 …if( *nBytesOut > 0 && psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded == psEnc->state_Fxx[ 0 ].sCmn.nFra… in silk_Encode()
497 for( i = 0; i < psEnc->state_Fxx[ n ].sCmn.nFramesPerPacket; i++ ) { in silk_Encode()
499 flags |= psEnc->state_Fxx[ n ].sCmn.VAD_flags[ i ]; in silk_Encode()
502 flags |= psEnc->state_Fxx[ n ].sCmn.LBRR_flag; in silk_Encode()
505 …ec_enc_patch_initial_bits( psRangeEnc, flags, ( psEnc->state_Fxx[ 0 ].sCmn.nFramesPerPacket + 1 ) … in silk_Encode()
509 …if( psEnc->state_Fxx[ 0 ].sCmn.inDTX && ( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ … in silk_Encode()
520 if( psEnc->state_Fxx[ 0 ].sCmn.speech_activity_Q8 < speech_act_thr_for_switch_Q8 ) { in silk_Encode()
541 …encControl->inWBmodeWithoutVariableLP = psEnc->state_Fxx[ 0 ].sCmn.fs_kHz == 16 && psEnc->state_Fx… in silk_Encode()
542 encControl->internalSampleRate = silk_SMULBB( psEnc->state_Fxx[ 0 ].sCmn.fs_kHz, 1000 ); in silk_Encode()
548 psEnc->state_Fxx[ n ].sCmn.controlled_since_last_payload = 0; in silk_Encode()
549 psEnc->state_Fxx[ n ].sCmn.prefillFlag = 0; in silk_Encode()