Home | History | Annotate | Download | only in float

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