Lines Matching refs:psEnc
37 …silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP …
44 …silk_encoder_state_FLP *psEnc /* I/O Encoder state FLP … in silk_encode_do_VAD_FLP() argument
50 silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1 ); in silk_encode_do_VAD_FLP()
55 if( psEnc->sCmn.speech_activity_Q8 < SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ) ) { in silk_encode_do_VAD_FLP()
56 psEnc->sCmn.indices.signalType = TYPE_NO_VOICE_ACTIVITY; in silk_encode_do_VAD_FLP()
57 psEnc->sCmn.noSpeechCounter++; in silk_encode_do_VAD_FLP()
58 if( psEnc->sCmn.noSpeechCounter < NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FLP()
59 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FLP()
60 … } else if( psEnc->sCmn.noSpeechCounter > MAX_CONSECUTIVE_DTX + NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FLP()
61 psEnc->sCmn.noSpeechCounter = NB_SPEECH_FRAMES_BEFORE_DTX; in silk_encode_do_VAD_FLP()
62 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FLP()
64 psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 0; in silk_encode_do_VAD_FLP()
66 psEnc->sCmn.noSpeechCounter = 0; in silk_encode_do_VAD_FLP()
67 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FLP()
68 psEnc->sCmn.indices.signalType = TYPE_UNVOICED; in silk_encode_do_VAD_FLP()
69 psEnc->sCmn.VAD_flags[ psEnc->sCmn.nFramesEncoded ] = 1; in silk_encode_do_VAD_FLP()
77 …silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP … in silk_encode_frame_FLP() argument
104 psEnc->sCmn.indices.Seed = psEnc->sCmn.frameCounter++ & 3; in silk_encode_frame_FLP()
110 x_frame = psEnc->x_buf + psEnc->sCmn.ltp_mem_length; /* start of frame to encode */ in silk_encode_frame_FLP()
111 …res_pitch_frame = res_pitch + psEnc->sCmn.ltp_mem_length; /* start of pitch LPC residual fra… in silk_encode_frame_FLP()
116 silk_LP_variable_cutoff( &psEnc->sCmn.sLP, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.frame_length ); in silk_encode_frame_FLP()
121 …silk_short2float_array( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.inputBuf + 1, psEn… in silk_encode_frame_FLP()
125 …x_frame[ LA_SHAPE_MS * psEnc->sCmn.fs_kHz + i * ( psEnc->sCmn.frame_length >> 3 ) ] += ( 1 - ( i &… in silk_encode_frame_FLP()
128 if( !psEnc->sCmn.prefillFlag ) { in silk_encode_frame_FLP()
132 silk_find_pitch_lags_FLP( psEnc, &sEncCtrl, res_pitch, x_frame, psEnc->sCmn.arch ); in silk_encode_frame_FLP()
137 silk_noise_shape_analysis_FLP( psEnc, &sEncCtrl, res_pitch_frame, x_frame ); in silk_encode_frame_FLP()
142 silk_find_pred_coefs_FLP( psEnc, &sEncCtrl, res_pitch, x_frame, condCoding ); in silk_encode_frame_FLP()
147 silk_process_gains_FLP( psEnc, &sEncCtrl, condCoding ); in silk_encode_frame_FLP()
152 silk_prefilter_FLP( psEnc, &sEncCtrl, xfw, x_frame ); in silk_encode_frame_FLP()
157 silk_LBRR_encode_FLP( psEnc, &sEncCtrl, xfw, condCoding ); in silk_encode_frame_FLP()
164 gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FLP()
169 silk_memcpy( &sNSQ_copy, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_encode_frame_FLP()
170 seed_copy = psEnc->sCmn.indices.Seed; in silk_encode_frame_FLP()
171 ec_prevLagIndex_copy = psEnc->sCmn.ec_prevLagIndex; in silk_encode_frame_FLP()
172 ec_prevSignalType_copy = psEnc->sCmn.ec_prevSignalType; in silk_encode_frame_FLP()
182 silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy, sizeof( silk_nsq_state ) ); in silk_encode_frame_FLP()
183 psEnc->sCmn.indices.Seed = seed_copy; in silk_encode_frame_FLP()
184 psEnc->sCmn.ec_prevLagIndex = ec_prevLagIndex_copy; in silk_encode_frame_FLP()
185 psEnc->sCmn.ec_prevSignalType = ec_prevSignalType_copy; in silk_encode_frame_FLP()
191 …silk_NSQ_wrapper_FLP( psEnc, &sEncCtrl, &psEnc->sCmn.indices, &psEnc->sCmn.sNSQ, psEnc->sCmn.pulse… in silk_encode_frame_FLP()
196 … silk_encode_indices( &psEnc->sCmn, psRangeEnc, psEnc->sCmn.nFramesEncoded, 0, condCoding ); in silk_encode_frame_FLP()
201 …silk_encode_pulses( psRangeEnc, psEnc->sCmn.indices.signalType, psEnc->sCmn.indices.quantOffsetTyp… in silk_encode_frame_FLP()
202 psEnc->sCmn.pulses, psEnc->sCmn.frame_length ); in silk_encode_frame_FLP()
217 silk_memcpy( &psEnc->sCmn.sNSQ, &sNSQ_copy2, sizeof( silk_nsq_state ) ); in silk_encode_frame_FLP()
218 psEnc->sShape.LastGainIndex = LastGainIndex_copy2; in silk_encode_frame_FLP()
245 silk_memcpy( &sNSQ_copy2, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_encode_frame_FLP()
246 LastGainIndex_copy2 = psEnc->sShape.LastGainIndex; in silk_encode_frame_FLP()
256 …gain_factor_Q16 = silk_log2lin( silk_LSHIFT( nBits - maxBits, 7 ) / psEnc->sCmn.frame_length + SIL… in silk_encode_frame_FLP()
274 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_encode_frame_FLP()
279 psEnc->sShape.LastGainIndex = sEncCtrl.lastGainIndexPrev; in silk_encode_frame_FLP()
280 silk_gains_quant( psEnc->sCmn.indices.GainsIndices, pGains_Q16, in silk_encode_frame_FLP()
281 … &psEnc->sShape.LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FLP()
284 gainsID = silk_gains_ID( psEnc->sCmn.indices.GainsIndices, psEnc->sCmn.nb_subfr ); in silk_encode_frame_FLP()
287 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_encode_frame_FLP()
294 silk_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], in silk_encode_frame_FLP()
295 ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( silk_float ) ); in silk_encode_frame_FLP()
298 if( psEnc->sCmn.prefillFlag ) { in silk_encode_frame_FLP()
305 psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; in silk_encode_frame_FLP()
306 psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; in silk_encode_frame_FLP()
311 psEnc->sCmn.first_frame_after_reset = 0; in silk_encode_frame_FLP()
320 …silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP … in silk_LBRR_encode_FLP() argument
329 SideInfoIndices *psIndices_LBRR = &psEnc->sCmn.indices_LBRR[ psEnc->sCmn.nFramesEncoded ]; in silk_LBRR_encode_FLP()
335 …if( psEnc->sCmn.LBRR_enabled && psEnc->sCmn.speech_activity_Q8 > SILK_FIX_CONST( LBRR_SPEECH_ACTIV… in silk_LBRR_encode_FLP()
336 psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded ] = 1; in silk_LBRR_encode_FLP()
339 silk_memcpy( &sNSQ_LBRR, &psEnc->sCmn.sNSQ, sizeof( silk_nsq_state ) ); in silk_LBRR_encode_FLP()
340 silk_memcpy( psIndices_LBRR, &psEnc->sCmn.indices, sizeof( SideInfoIndices ) ); in silk_LBRR_encode_FLP()
343 silk_memcpy( TempGains, psEncCtrl->Gains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP()
345 …if( psEnc->sCmn.nFramesEncoded == 0 || psEnc->sCmn.LBRR_flags[ psEnc->sCmn.nFramesEncoded - 1 ] ==… in silk_LBRR_encode_FLP()
347 psEnc->sCmn.LBRRprevLastGainIndex = psEnc->sShape.LastGainIndex; in silk_LBRR_encode_FLP()
350 psIndices_LBRR->GainsIndices[ 0 ] += psEnc->sCmn.LBRR_GainIncreases; in silk_LBRR_encode_FLP()
356 … &psEnc->sCmn.LBRRprevLastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_LBRR_encode_FLP()
359 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_LBRR_encode_FLP()
366 silk_NSQ_wrapper_FLP( psEnc, psEncCtrl, psIndices_LBRR, &sNSQ_LBRR, in silk_LBRR_encode_FLP()
367 psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], xfw ); in silk_LBRR_encode_FLP()
370 silk_memcpy( psEncCtrl->Gains, TempGains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP()