Lines Matching refs:psEnc
39 …silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FI…
46 …silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FI… in silk_encode_do_VAD_FIX() argument
55 silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.arch ); in silk_encode_do_VAD_FIX()
57 if( activity == VAD_NO_ACTIVITY && psEnc->sCmn.speech_activity_Q8 >= activity_threshold ) { in silk_encode_do_VAD_FIX()
58 psEnc->sCmn.speech_activity_Q8 = activity_threshold - 1; in silk_encode_do_VAD_FIX()
64 if( psEnc->sCmn.speech_activity_Q8 < activity_threshold ) { in silk_encode_do_VAD_FIX()
65 psEnc->sCmn.indices.signalType = TYPE_NO_VOICE_ACTIVITY; in silk_encode_do_VAD_FIX()
66 psEnc->sCmn.noSpeechCounter++; in silk_encode_do_VAD_FIX()
67 if( psEnc->sCmn.noSpeechCounter <= NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FIX()
68 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FIX()
69 … } else if( psEnc->sCmn.noSpeechCounter > MAX_CONSECUTIVE_DTX + NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FIX()
70 psEnc->sCmn.noSpeechCounter = NB_SPEECH_FRAMES_BEFORE_DTX; in silk_encode_do_VAD_FIX()
71 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FIX()
73 psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 0; in silk_encode_do_VAD_FIX()
75 psEnc->sCmn.noSpeechCounter = 0; in silk_encode_do_VAD_FIX()
76 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FIX()
77 psEnc->sCmn.indices.signalType = TYPE_UNVOICED; in silk_encode_do_VAD_FIX()
78 psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 1; in silk_encode_do_VAD_FIX()
86 …silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FI… in silk_encode_frame_FIX() argument
113 psEnc->sCmn.indices.Seed = psEnc->sCmn.frameCounter++ & 3; in silk_encode_frame_FIX()
119 x_frame = psEnc->x_buf + psEnc->sCmn.ltp_mem_length; in silk_encode_frame_FIX()
124 silk_LP_variable_cutoff( &psEnc->sCmn.sLP, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.frame_length ); in silk_encode_frame_FIX()
129 …silk_memcpy( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.fra… in silk_encode_frame_FIX()
131 if( !psEnc->sCmn.prefillFlag ) { in silk_encode_frame_FIX()
137 psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length in silk_encode_frame_FIX()
138 + psEnc->sCmn.ltp_mem_length, opus_int16 ); in silk_encode_frame_FIX()
140 res_pitch_frame = res_pitch + psEnc->sCmn.ltp_mem_length; in silk_encode_frame_FIX()
145 …silk_find_pitch_lags_FIX( psEnc, &sEncCtrl, res_pitch, x_frame - psEnc->sCmn.ltp_mem_length, psEnc… in silk_encode_frame_FIX()
150 … silk_noise_shape_analysis_FIX( psEnc, &sEncCtrl, res_pitch_frame, x_frame, psEnc->sCmn.arch ); in silk_encode_frame_FIX()
155 silk_find_pred_coefs_FIX( psEnc, &sEncCtrl, res_pitch_frame, x_frame, condCoding ); in silk_encode_frame_FIX()
160 silk_process_gains_FIX( psEnc, &sEncCtrl, condCoding ); in silk_encode_frame_FIX()
165 silk_LBRR_encode_FIX( psEnc, &sEncCtrl, x_frame, condCoding ); in silk_encode_frame_FIX()
172 gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FIX()
177 silk_memcpy( &sNSQ_copy, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_encode_frame_FIX()
178 seed_copy = psEnc->sCmn.indices.Seed; in silk_encode_frame_FIX()
179 ec_prevLagIndex_copy = psEnc->sCmn.ec_prevLagIndex; in silk_encode_frame_FIX()
180 ec_prevSignalType_copy = psEnc->sCmn.ec_prevSignalType; in silk_encode_frame_FIX()
191 silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy, sizeof( silk_nsq_state ) ); in silk_encode_frame_FIX()
192 psEnc->sCmn.indices.Seed = seed_copy; in silk_encode_frame_FIX()
193 psEnc->sCmn.ec_prevLagIndex = ec_prevLagIndex_copy; in silk_encode_frame_FIX()
194 psEnc->sCmn.ec_prevSignalType = ec_prevSignalType_copy; in silk_encode_frame_FIX()
200 if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) { in silk_encode_frame_FIX()
201 …silk_NSQ_del_dec( &psEnc->sCmn, &psEnc->sCmn.sNSQ, &psEnc->sCmn.indices, x_frame, psEnc->sCmn.puls… in silk_encode_frame_FIX()
204 psEnc->sCmn.arch ); in silk_encode_frame_FIX()
206 … silk_NSQ( &psEnc->sCmn, &psEnc->sCmn.sNSQ, &psEnc->sCmn.indices, x_frame, psEnc->sCmn.pulses, in silk_encode_frame_FIX()
209 psEnc->sCmn.arch); in silk_encode_frame_FIX()
219 … silk_encode_indices( &psEnc->sCmn, psRangeEnc, psEnc->sCmn.nFramesEncoded, 0, condCoding ); in silk_encode_frame_FIX()
224 …silk_encode_pulses( psRangeEnc, psEnc->sCmn.indices.signalType, psEnc->sCmn.indices.quantOffsetTyp… in silk_encode_frame_FIX()
225 psEnc->sCmn.pulses, psEnc->sCmn.frame_length ); in silk_encode_frame_FIX()
234 psEnc->sShape.LastGainIndex = sEncCtrl.lastGainIndexPrev; in silk_encode_frame_FIX()
235 for ( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_encode_frame_FIX()
236 psEnc->sCmn.indices.GainsIndices[ i ] = 4; in silk_encode_frame_FIX()
239 psEnc->sCmn.indices.GainsIndices[ 0 ] = sEncCtrl.lastGainIndexPrev; in silk_encode_frame_FIX()
241 psEnc->sCmn.ec_prevLagIndex = ec_prevLagIndex_copy; in silk_encode_frame_FIX()
242 psEnc->sCmn.ec_prevSignalType = ec_prevSignalType_copy; in silk_encode_frame_FIX()
244 for ( i = 0; i < psEnc->sCmn.frame_length; i++ ) { in silk_encode_frame_FIX()
245 psEnc->sCmn.pulses[ i ] = 0; in silk_encode_frame_FIX()
248 … silk_encode_indices( &psEnc->sCmn, psRangeEnc, psEnc->sCmn.nFramesEncoded, 0, condCoding ); in silk_encode_frame_FIX()
250 …silk_encode_pulses( psRangeEnc, psEnc->sCmn.indices.signalType, psEnc->sCmn.indices.quantOffsetTyp… in silk_encode_frame_FIX()
251 psEnc->sCmn.pulses, psEnc->sCmn.frame_length ); in silk_encode_frame_FIX()
267 silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy2, sizeof( silk_nsq_state ) ); in silk_encode_frame_FIX()
268 psEnc->sShape.LastGainIndex = LastGainIndex_copy2; in silk_encode_frame_FIX()
295 silk_memcpy( &sNSQ_copy2, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_encode_frame_FIX()
296 LastGainIndex_copy2 = psEnc->sShape.LastGainIndex; in silk_encode_frame_FIX()
305 for ( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_encode_frame_FIX()
307 … for ( j = i*psEnc->sCmn.subfr_length; j < (i+1)*psEnc->sCmn.subfr_length; j++ ) { in silk_encode_frame_FIX()
308 sum += abs( psEnc->sCmn.pulses[j] ); in silk_encode_frame_FIX()
328 …gain_factor_Q16 = silk_log2lin( silk_LSHIFT( nBits - maxBits, 7 ) / psEnc->sCmn.frame_length + SIL… in silk_encode_frame_FIX()
344 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_encode_frame_FIX()
355 psEnc->sShape.LastGainIndex = sEncCtrl.lastGainIndexPrev; in silk_encode_frame_FIX()
356 silk_gains_quant( psEnc->sCmn.indices.GainsIndices, sEncCtrl.Gains_Q16, in silk_encode_frame_FIX()
357 … &psEnc->sShape.LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FIX()
360 gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FIX()
365 silk_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], in silk_encode_frame_FIX()
366 ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( opus_int16 ) ); in silk_encode_frame_FIX()
369 if( psEnc->sCmn.prefillFlag ) { in silk_encode_frame_FIX()
377 psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; in silk_encode_frame_FIX()
378 psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; in silk_encode_frame_FIX()
383 psEnc->sCmn.first_frame_after_reset = 0; in silk_encode_frame_FIX()
393 …silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FI… in silk_LBRR_encode_FIX() argument
400 SideInfoIndices *psIndices_LBRR = &psEnc->sCmn.indices_LBRR[ psEnc->sCmn.nFramesEncoded ]; in silk_LBRR_encode_FIX()
406 …if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.speech_activity_Q8 > SILK_FIX_CONST( LBRR_SPEECH_ACTIV… in silk_LBRR_encode_FIX()
407 psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded ] = 1; in silk_LBRR_encode_FIX()
410 silk_memcpy( &sNSQ_LBRR, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_LBRR_encode_FIX()
411 silk_memcpy( psIndices_LBRR, &psEnc->sCmn.indices, sizeof( SideInfoIndices ) ); in silk_LBRR_encode_FIX()
414 … silk_memcpy( TempGains_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) ); in silk_LBRR_encode_FIX()
416 …if( psEnc->sCmn.nFramesEncoded == 0 || psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded - 1 ] ==… in silk_LBRR_encode_FIX()
418 psEnc->sCmn.LBRRprevLastGainIndex = psEnc->sShape.LastGainIndex; in silk_LBRR_encode_FIX()
421 …psIndices_LBRR->GainsIndices[ 0 ] = psIndices_LBRR->GainsIndices[ 0 ] + psEnc->sCmn.LBRR_GainIncre… in silk_LBRR_encode_FIX()
428 … &psEnc->sCmn.LBRRprevLastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_LBRR_encode_FIX()
433 if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) { in silk_LBRR_encode_FIX()
434 silk_NSQ_del_dec( &psEnc->sCmn, &sNSQ_LBRR, psIndices_LBRR, x16, in silk_LBRR_encode_FIX()
435 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX()
437 …>Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->sCmn.arch ); in silk_LBRR_encode_FIX()
439 silk_NSQ( &psEnc->sCmn, &sNSQ_LBRR, psIndices_LBRR, x16, in silk_LBRR_encode_FIX()
440 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX()
442 …>Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->sCmn.arch ); in silk_LBRR_encode_FIX()
446 … silk_memcpy( psEncCtrl->Gains_Q16, TempGains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) ); in silk_LBRR_encode_FIX()