Home
last modified time | relevance | path

Searched refs:psEncCtrl (Results 1 – 16 of 16) sorted by relevance

/external/libopus/silk/fixed/
Dprocess_gains_FIX.c38 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control … in silk_process_gains_FIX() argument
49 …s_Q16 = -silk_sigm_Q15( silk_RSHIFT_ROUND( psEncCtrl->LTPredCodGain_Q7 - SILK_FIX_CONST( 12.0, 7 )… in silk_process_gains_FIX()
51psEncCtrl->Gains_Q16[ k ] = silk_SMLAWB( psEncCtrl->Gains_Q16[ k ], psEncCtrl->Gains_Q16[ k ], s_Q… in silk_process_gains_FIX()
62 ResNrg = psEncCtrl->ResNrg[ k ]; in silk_process_gains_FIX()
64 if( psEncCtrl->ResNrgQ[ k ] > 0 ) { in silk_process_gains_FIX()
65 ResNrgPart = silk_RSHIFT_ROUND( ResNrgPart, psEncCtrl->ResNrgQ[ k ] ); in silk_process_gains_FIX()
67 if( ResNrgPart >= silk_RSHIFT( silk_int32_MAX, -psEncCtrl->ResNrgQ[ k ] ) ) { in silk_process_gains_FIX()
70 ResNrgPart = silk_LSHIFT( ResNrgPart, -psEncCtrl->ResNrgQ[ k ] ); in silk_process_gains_FIX()
73 gain = psEncCtrl->Gains_Q16[ k ]; in silk_process_gains_FIX()
81 psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( gain, 8 ); /* Q16 */ in silk_process_gains_FIX()
[all …]
Dnoise_shape_analysis_FIX.c142 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI… in silk_noise_shape_analysis_FIX() argument
169psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX()
173 psEncCtrl->coding_quality_Q14 = silk_RSHIFT( silk_sigm_Q15( silk_RSHIFT_ROUND( SNR_adj_dB_Q7 - in silk_noise_shape_analysis_FIX()
182 …silk_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q… in silk_noise_shape_analysis_FIX()
192 SILK_FIX_CONST( 1.0, 14 ) - psEncCtrl->input_quality_Q14 ); in silk_noise_shape_analysis_FIX()
233 …strength_Q16 = silk_SMULWB( psEncCtrl->predGain_Q16, SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTI… in silk_noise_shape_analysis_FIX()
239 …warping_Q16 = silk_SMLAWB( psEnc->sCmn.warping_Q16, (opus_int32)psEncCtrl->coding_quality_Q14, SIL… in silk_noise_shape_analysis_FIX()
295 psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( tmp32, 16 - Qnrg ); in silk_noise_shape_analysis_FIX()
300 silk_assert( psEncCtrl->Gains_Q16[ k ] > 0 ); in silk_noise_shape_analysis_FIX()
301 if( psEncCtrl->Gains_Q16[ k ] < SILK_FIX_CONST( 0.25, 16 ) ) { in silk_noise_shape_analysis_FIX()
[all …]
Dfind_pred_coefs_FIX.c37 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … in silk_find_pred_coefs_FIX() argument
55 min_gain_Q16 = silk_min( min_gain_Q16, psEncCtrl->Gains_Q16[ i ] ); in silk_find_pred_coefs_FIX()
59 silk_assert( psEncCtrl->Gains_Q16[ i ] > 0 ); in silk_find_pred_coefs_FIX()
61 invGains_Q16[ i ] = silk_DIV32_varQ( min_gain_Q16, psEncCtrl->Gains_Q16[ i ], 16 - 2 ); in silk_find_pred_coefs_FIX()
83 …celt_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + … in silk_find_pred_coefs_FIX()
90 psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch ); in silk_find_pred_coefs_FIX()
93 …silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.P… in silk_find_pred_coefs_FIX()
94 …&psEnc->sCmn.sum_log_gain_Q7, &psEncCtrl->LTPredCodGain_Q7, XXLTP_Q17, xXLTP_Q17, psEnc->sCmn.subf… in silk_find_pred_coefs_FIX()
97 silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl, condCoding ); in silk_find_pred_coefs_FIX()
100 … silk_LTP_analysis_filter_FIX( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef_Q14, in silk_find_pred_coefs_FIX()
[all …]
Dencode_frame_FIX.c40 …silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FI…
394 …silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FI… in silk_LBRR_encode_FIX() argument
414 … silk_memcpy( TempGains_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) ); in silk_LBRR_encode_FIX()
427 silk_gains_dequant( psEncCtrl->Gains_Q16, psIndices_LBRR->GainsIndices, in silk_LBRR_encode_FIX()
435 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX()
436psEncCtrl->AR_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, in silk_LBRR_encode_FIX()
437psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->s… in silk_LBRR_encode_FIX()
440 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX()
441psEncCtrl->AR_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, in silk_LBRR_encode_FIX()
442psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->s… in silk_LBRR_encode_FIX()
[all …]
DLTP_scale_ctrl_FIX.c37 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … in silk_LTP_scale_ctrl_FIX() argument
47 …silk_SMULWB( silk_SMULBB( round_loss, psEncCtrl->LTPredCodGain_Q7 ), SILK_FIX_CONST( 0.1, 9 ) ), 0… in silk_LTP_scale_ctrl_FIX()
52 psEncCtrl->LTP_scale_Q14 = silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ]; in silk_LTP_scale_ctrl_FIX()
Dmain_FIX.h104 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI…
128 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control …
138 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control …
147 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control …
210 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control …
Dfind_pitch_lags_FIX.c39 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … in silk_find_pitch_lags_FIX() argument
97 psEncCtrl->predGain_Q16 = silk_DIV32_varQ( auto_corr[ 0 ], silk_max_int( res_nrg, 1 ), 16 ); in silk_find_pitch_lags_FIX()
127 …if( silk_pitch_analysis_core( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, &psEnc->sCmn.… in silk_find_pitch_lags_FIX()
137 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); in silk_find_pitch_lags_FIX()
/external/libopus/silk/fixed/mips/
Dnoise_shape_analysis_FIX_mipsr1.h36 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI… in silk_noise_shape_analysis_FIX() argument
64psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX()
68 psEncCtrl->coding_quality_Q14 = silk_RSHIFT( silk_sigm_Q15( silk_RSHIFT_ROUND( SNR_adj_dB_Q7 - in silk_noise_shape_analysis_FIX()
77 …silk_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q… in silk_noise_shape_analysis_FIX()
87 SILK_FIX_CONST( 1.0, 14 ) - psEncCtrl->input_quality_Q14 ); in silk_noise_shape_analysis_FIX()
97 psEncCtrl->sparseness_Q8 = 0; in silk_noise_shape_analysis_FIX()
116 psEncCtrl->sparseness_Q8 = silk_RSHIFT( silk_sigm_Q15( silk_SMULWB( energy_variation_Q7 - in silk_noise_shape_analysis_FIX()
120 if( psEncCtrl->sparseness_Q8 > SILK_FIX_CONST( SPARSENESS_THRESHOLD_QNT_OFFSET, 8 ) ) { in silk_noise_shape_analysis_FIX()
127 …= silk_SMLAWB( SNR_adj_dB_Q7, SILK_FIX_CONST( SPARSE_SNR_INCR_dB, 15 ), psEncCtrl->sparseness_Q8 -… in silk_noise_shape_analysis_FIX()
134 …strength_Q16 = silk_SMULWB( psEncCtrl->predGain_Q16, SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTI… in silk_noise_shape_analysis_FIX()
[all …]
/external/libopus/silk/float/
Dprocess_gains_FLP.c38 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_process_gains_FLP() argument
49 s = 1.0f - 0.5f * silk_sigmoid( 0.25f * ( psEncCtrl->LTPredCodGain - 12.0f ) ); in silk_process_gains_FLP()
51 psEncCtrl->Gains[ k ] *= s; in silk_process_gains_FLP()
60 gain = psEncCtrl->Gains[ k ]; in silk_process_gains_FLP()
61 gain = ( silk_float )sqrt( gain * gain + psEncCtrl->ResNrg[ k ] * InvMaxSqrVal ); in silk_process_gains_FLP()
62 psEncCtrl->Gains[ k ] = silk_min_float( gain, 32767.0f ); in silk_process_gains_FLP()
67 pGains_Q16[ k ] = (opus_int32)( psEncCtrl->Gains[ k ] * 65536.0f ); in silk_process_gains_FLP()
71 silk_memcpy( psEncCtrl->GainsUnq_Q16, pGains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) ); in silk_process_gains_FLP()
72 psEncCtrl->lastGainIndexPrev = psShapeSt->LastGainIndex; in silk_process_gains_FLP()
80 psEncCtrl->Gains[ k ] = pGains_Q16[ k ] / 65536.0f; in silk_process_gains_FLP()
[all …]
Dfind_pred_coefs_FLP.c37 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_find_pred_coefs_FLP() argument
54 silk_assert( psEncCtrl->Gains[ i ] > 0.0f ); in silk_find_pred_coefs_FLP()
55 invGains[ i ] = 1.0f / psEncCtrl->Gains[ i ]; in silk_find_pred_coefs_FLP()
62 …celt_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + … in silk_find_pred_coefs_FLP()
65 …silk_find_LTP_FLP( XXLTP, xXLTP, res_pitch, psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sC… in silk_find_pred_coefs_FLP()
68 …silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.P… in silk_find_pred_coefs_FLP()
69 …&psEnc->sCmn.sum_log_gain_Q7, &psEncCtrl->LTPredCodGain, XXLTP, xXLTP, psEnc->sCmn.subfr_length, p… in silk_find_pred_coefs_FLP()
72 silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding ); in silk_find_pred_coefs_FLP()
75 … silk_LTP_analysis_filter_FLP( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef, in silk_find_pred_coefs_FLP()
76psEncCtrl->pitchL, invGains, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.predictLP… in silk_find_pred_coefs_FLP()
[all …]
Dnoise_shape_analysis_FLP.c149 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_noise_shape_analysis_FLP() argument
173psEncCtrl->input_quality = 0.5f * ( psEnc->sCmn.input_quality_bands_Q15[ 0 ] + psEnc->sCmn.input_q… in silk_noise_shape_analysis_FLP()
176 psEncCtrl->coding_quality = silk_sigmoid( 0.25f * ( SNR_adj_dB - 20.0f ) ); in silk_noise_shape_analysis_FLP()
181 …SNR_adj_dB -= BG_SNR_DECR_dB * psEncCtrl->coding_quality * ( 0.5f + 0.5f * psEncCtrl->input_qualit… in silk_noise_shape_analysis_FLP()
189 …+= ( -0.4f * psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f ) + 6.0f ) * ( 1.0f - psEncCtrl->input_quality ); in silk_noise_shape_analysis_FLP()
228 …strength = FIND_PITCH_WHITE_NOISE_FRACTION * psEncCtrl->predGain; /* between 0.0 and 1.0… in silk_noise_shape_analysis_FLP()
232 warping = (silk_float)psEnc->sCmn.warping_Q16 / 65536.0f + 0.01f * psEncCtrl->coding_quality; in silk_noise_shape_analysis_FLP()
266 silk_k2a_FLP( &psEncCtrl->AR[ k * MAX_SHAPE_LPC_ORDER ], rc, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FLP()
267 psEncCtrl->Gains[ k ] = ( silk_float )sqrt( nrg ); in silk_noise_shape_analysis_FLP()
271psEncCtrl->Gains[ k ] *= warped_gain( &psEncCtrl->AR[ k * MAX_SHAPE_LPC_ORDER ], warping, psEnc->s… in silk_noise_shape_analysis_FLP()
[all …]
Dwrappers_FLP.c98 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_NSQ_wrapper_FLP() argument
123 …AR_Q13[ i * MAX_SHAPE_LPC_ORDER + j ] = silk_float2int( psEncCtrl->AR[ i * MAX_SHAPE_LPC_ORDER + j… in silk_NSQ_wrapper_FLP()
128 …LF_shp_Q14[ i ] = silk_LSHIFT32( silk_float2int( psEncCtrl->LF_AR_shp[ i ] * 16384.0f ), 16 … in silk_NSQ_wrapper_FLP()
129 … (opus_uint16)silk_float2int( psEncCtrl->LF_MA_shp[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP()
130 … Tilt_Q14[ i ] = (opus_int)silk_float2int( psEncCtrl->Tilt[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP()
131 … HarmShapeGain_Q14[ i ] = (opus_int)silk_float2int( psEncCtrl->HarmShapeGain[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP()
133 Lambda_Q10 = ( opus_int )silk_float2int( psEncCtrl->Lambda * 1024.0f ); in silk_NSQ_wrapper_FLP()
137 LTPCoef_Q14[ i ] = (opus_int16)silk_float2int( psEncCtrl->LTPCoef[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP()
142 … PredCoef_Q12[ j ][ i ] = (opus_int16)silk_float2int( psEncCtrl->PredCoef[ j ][ i ] * 4096.0f ); in silk_NSQ_wrapper_FLP()
147 Gains_Q16[ i ] = silk_float2int( psEncCtrl->Gains[ i ] * 65536.0f ); in silk_NSQ_wrapper_FLP()
[all …]
Dmain_FLP.h94 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
111 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
121 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
130 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
212 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
275 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
Dfind_pitch_lags_FLP.c38 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_find_pitch_lags_FLP() argument
94 psEncCtrl->predGain = auto_corr[ 0 ] / silk_max_float( res_nrg, 1.0f ); in silk_find_pitch_lags_FLP()
118 if( silk_pitch_analysis_core_FLP( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, in silk_find_pitch_lags_FLP()
127 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); in silk_find_pitch_lags_FLP()
DLTP_scale_ctrl_FLP.c36 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_LTP_scale_ctrl_FLP() argument
45 …psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( round_loss * psEncCtrl->LTPredCodGain … in silk_LTP_scale_ctrl_FLP()
51psEncCtrl->LTP_scale = (silk_float)silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ] … in silk_LTP_scale_ctrl_FLP()
Dencode_frame_FLP.c39 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
384 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_LBRR_encode_FLP() argument
406 silk_memcpy( TempGains, psEncCtrl->Gains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP()
423 psEncCtrl->Gains[ k ] = Gains_Q16[ k ] * ( 1.0f / 65536.0f ); in silk_LBRR_encode_FLP()
429 silk_NSQ_wrapper_FLP( psEnc, psEncCtrl, psIndices_LBRR, &sNSQ_LBRR, in silk_LBRR_encode_FLP()
433 silk_memcpy( psEncCtrl->Gains, TempGains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP()