/external/libopus/silk/float/ |
D | noise_shape_analysis_FLP.c | 130 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_noise_shape_analysis_FLP() argument 153 …psEncCtrl->input_quality = 0.5f * ( psEnc->sCmn.input_quality_bands_Q15[ 0 ] + psEnc->sCmn.input_q… in silk_noise_shape_analysis_FLP() 156 psEncCtrl->coding_quality = silk_sigmoid( 0.25f * ( SNR_adj_dB - 20.0f ) ); in silk_noise_shape_analysis_FLP() 161 …SNR_adj_dB -= BG_SNR_DECR_dB * psEncCtrl->coding_quality * ( 0.5f + 0.5f * psEncCtrl->input_qualit… in silk_noise_shape_analysis_FLP() 169 …+= ( -0.4f * psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f ) + 6.0f ) * ( 1.0f - psEncCtrl->input_quality ); in silk_noise_shape_analysis_FLP() 179 psEncCtrl->sparseness = 0.0f; in silk_noise_shape_analysis_FLP() 195 psEncCtrl->sparseness = silk_sigmoid( 0.4f * ( energy_variation - 5.0f ) ); in silk_noise_shape_analysis_FLP() 198 if( psEncCtrl->sparseness > SPARSENESS_THRESHOLD_QNT_OFFSET ) { in silk_noise_shape_analysis_FLP() 205 SNR_adj_dB += SPARSE_SNR_INCR_dB * ( psEncCtrl->sparseness - 0.5f ); in silk_noise_shape_analysis_FLP() 212 …strength = FIND_PITCH_WHITE_NOISE_FRACTION * psEncCtrl->predGain; /* between 0.0 and 1.0… in silk_noise_shape_analysis_FLP() [all …]
|
D | find_pred_coefs_FLP.c | 37 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_find_pred_coefs_FLP() argument 53 silk_assert( psEncCtrl->Gains[ i ] > 0.0f ); in silk_find_pred_coefs_FLP() 54 invGains[ i ] = 1.0f / psEncCtrl->Gains[ i ]; in silk_find_pred_coefs_FLP() 62 …silk_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + … in silk_find_pred_coefs_FLP() 65 silk_find_LTP_FLP( psEncCtrl->LTPCoef, WLTP, &psEncCtrl->LTPredCodGain, res_pitch, in silk_find_pred_coefs_FLP() 66 …psEncCtrl->pitchL, Wght, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.ltp_mem_lengt… in silk_find_pred_coefs_FLP() 69 …silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.P… in silk_find_pred_coefs_FLP() 74 silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding ); in silk_find_pred_coefs_FLP() 77 … silk_LTP_analysis_filter_FLP( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef, in silk_find_pred_coefs_FLP() 78 …psEncCtrl->pitchL, invGains, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.predictLP… in silk_find_pred_coefs_FLP() [all …]
|
D | process_gains_FLP.c | 38 …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 …]
|
D | prefilter_FLP.c | 96 …const silk_encoder_control_FLP *psEncCtrl, /* I Encoder control FLP … in silk_prefilter_FLP() argument 118 lag = psEncCtrl->pitchL[ k ]; in silk_prefilter_FLP() 122 HarmShapeGain = psEncCtrl->HarmShapeGain[ k ] * ( 1.0f - psEncCtrl->HarmBoost[ k ] ); in silk_prefilter_FLP() 126 Tilt = psEncCtrl->Tilt[ k ]; in silk_prefilter_FLP() 127 LF_MA_shp = psEncCtrl->LF_MA_shp[ k ]; in silk_prefilter_FLP() 128 LF_AR_shp = psEncCtrl->LF_AR_shp[ k ]; in silk_prefilter_FLP() 129 AR1_shp = &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ]; in silk_prefilter_FLP() 136 B[ 0 ] = psEncCtrl->GainsPre[ k ]; in silk_prefilter_FLP() 137 B[ 1 ] = -psEncCtrl->GainsPre[ k ] * in silk_prefilter_FLP() 138 …( psEncCtrl->HarmBoost[ k ] * HarmShapeGain + INPUT_TILT + psEncCtrl->coding_quality * HIGH_RATE_I… in silk_prefilter_FLP() [all …]
|
D | wrappers_FLP.c | 97 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_NSQ_wrapper_FLP() argument 122 …AR2_Q13[ i * MAX_SHAPE_LPC_ORDER + j ] = silk_float2int( psEncCtrl->AR2[ i * MAX_SHAPE_LPC_ORDER +… in silk_NSQ_wrapper_FLP() 127 …LF_shp_Q14[ i ] = silk_LSHIFT32( silk_float2int( psEncCtrl->LF_AR_shp[ i ] * 16384.0f ), 16 … in silk_NSQ_wrapper_FLP() 128 … (opus_uint16)silk_float2int( psEncCtrl->LF_MA_shp[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP() 129 … Tilt_Q14[ i ] = (opus_int)silk_float2int( psEncCtrl->Tilt[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP() 130 … HarmShapeGain_Q14[ i ] = (opus_int)silk_float2int( psEncCtrl->HarmShapeGain[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP() 132 Lambda_Q10 = ( opus_int )silk_float2int( psEncCtrl->Lambda * 1024.0f ); in silk_NSQ_wrapper_FLP() 136 LTPCoef_Q14[ i ] = (opus_int16)silk_float2int( psEncCtrl->LTPCoef[ i ] * 16384.0f ); in silk_NSQ_wrapper_FLP() 141 … PredCoef_Q12[ j ][ i ] = (opus_int16)silk_float2int( psEncCtrl->PredCoef[ j ][ i ] * 4096.0f ); in silk_NSQ_wrapper_FLP() 146 Gains_Q16[ i ] = silk_float2int( psEncCtrl->Gains[ i ] * 65536.0f ); in silk_NSQ_wrapper_FLP() [all …]
|
D | main_FLP.h | 93 …const silk_encoder_control_FLP *psEncCtrl, /* I Encoder control FLP … 104 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 121 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 131 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 140 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 224 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 302 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP …
|
D | find_pitch_lags_FLP.c | 38 …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()
|
D | LTP_scale_ctrl_FLP.c | 36 …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() 51 …psEncCtrl->LTP_scale = (silk_float)silk_LTPScales_table_Q14[ psEnc->sCmn.indices.LTP_scaleIndex ] … in silk_LTP_scale_ctrl_FLP()
|
D | encode_frame_FLP.c | 38 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … 321 …silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP … in silk_LBRR_encode_FLP() argument 343 silk_memcpy( TempGains, psEncCtrl->Gains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP() 360 psEncCtrl->Gains[ k ] = Gains_Q16[ k ] * ( 1.0f / 65536.0f ); in silk_LBRR_encode_FLP() 366 silk_NSQ_wrapper_FLP( psEnc, psEncCtrl, psIndices_LBRR, &sNSQ_LBRR, in silk_LBRR_encode_FLP() 370 silk_memcpy( psEncCtrl->Gains, TempGains, psEnc->sCmn.nb_subfr * sizeof( silk_float ) ); in silk_LBRR_encode_FLP()
|
/external/libopus/silk/fixed/ |
D | process_gains_FIX.c | 38 …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() 51 …psEncCtrl->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 …]
|
D | find_pred_coefs_FIX.c | 37 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … in silk_find_pred_coefs_FIX() argument 56 min_gain_Q16 = silk_min( min_gain_Q16, psEncCtrl->Gains_Q16[ i ] ); in silk_find_pred_coefs_FIX() 60 silk_assert( psEncCtrl->Gains_Q16[ i ] > 0 ); in silk_find_pred_coefs_FIX() 62 invGains_Q16[ i ] = silk_DIV32_varQ( min_gain_Q16, psEncCtrl->Gains_Q16[ i ], 16 - 2 ); in silk_find_pred_coefs_FIX() 85 …silk_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + … in silk_find_pred_coefs_FIX() 90 silk_find_LTP_FIX( psEncCtrl->LTPCoef_Q14, WLTP, &psEncCtrl->LTPredCodGain_Q7, in silk_find_pred_coefs_FIX() 91 res_pitch, psEncCtrl->pitchL, Wght_Q15, psEnc->sCmn.subfr_length, in silk_find_pred_coefs_FIX() 95 …silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.P… in silk_find_pred_coefs_FIX() 100 silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl, condCoding ); in silk_find_pred_coefs_FIX() 103 … silk_LTP_analysis_filter_FIX( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef_Q14, in silk_find_pred_coefs_FIX() [all …]
|
D | noise_shape_analysis_FIX.c | 151 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI… in silk_noise_shape_analysis_FIX() argument 179 …psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX() 183 psEncCtrl->coding_quality_Q14 = silk_RSHIFT( silk_sigm_Q15( silk_RSHIFT_ROUND( SNR_adj_dB_Q7 - in silk_noise_shape_analysis_FIX() 192 …silk_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q… in silk_noise_shape_analysis_FIX() 202 SILK_FIX_CONST( 1.0, 14 ) - psEncCtrl->input_quality_Q14 ); in silk_noise_shape_analysis_FIX() 212 psEncCtrl->sparseness_Q8 = 0; in silk_noise_shape_analysis_FIX() 231 psEncCtrl->sparseness_Q8 = silk_RSHIFT( silk_sigm_Q15( silk_SMULWB( energy_variation_Q7 - in silk_noise_shape_analysis_FIX() 235 if( psEncCtrl->sparseness_Q8 > SILK_FIX_CONST( SPARSENESS_THRESHOLD_QNT_OFFSET, 8 ) ) { in silk_noise_shape_analysis_FIX() 242 …= silk_SMLAWB( SNR_adj_dB_Q7, SILK_FIX_CONST( SPARSE_SNR_INCR_dB, 15 ), psEncCtrl->sparseness_Q8 -… in silk_noise_shape_analysis_FIX() 249 …strength_Q16 = silk_SMULWB( psEncCtrl->predGain_Q16, SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTI… in silk_noise_shape_analysis_FIX() [all …]
|
D | encode_frame_FIX.c | 39 …silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FI… 333 …silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FI… in silk_LBRR_encode_FIX() argument 353 … silk_memcpy( TempGains_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_int32 ) ); in silk_LBRR_encode_FIX() 366 silk_gains_dequant( psEncCtrl->Gains_Q16, psIndices_LBRR->GainsIndices, in silk_LBRR_encode_FIX() 374 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX() 375 … psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, in silk_LBRR_encode_FIX() 376 …psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->s… in silk_LBRR_encode_FIX() 379 …psEnc->sCmn.pulses_LBRR[ psEnc->sCmn.nFramesEncoded ], psEncCtrl->PredCoef_Q12[ 0 ], psEncCtrl->LT… in silk_LBRR_encode_FIX() 380 … psEncCtrl->AR2_Q13, psEncCtrl->HarmShapeGain_Q14, psEncCtrl->Tilt_Q14, psEncCtrl->LF_shp_Q14, in silk_LBRR_encode_FIX() 381 …psEncCtrl->Gains_Q16, psEncCtrl->pitchL, psEncCtrl->Lambda_Q10, psEncCtrl->LTP_scale_Q14, psEnc->s… in silk_LBRR_encode_FIX() [all …]
|
D | prefilter_FIX.c | 102 …const silk_encoder_control_FIX *psEncCtrl, /* I Encoder control … in silk_prefilter_FIX() argument 129 lag = psEncCtrl->pitchL[ k ]; in silk_prefilter_FIX() 133 …HarmShapeGain_Q12 = silk_SMULWB( (opus_int32)psEncCtrl->HarmShapeGain_Q14[ k ], 16384 - psEncCtrl-… in silk_prefilter_FIX() 137 Tilt_Q14 = psEncCtrl->Tilt_Q14[ k ]; in silk_prefilter_FIX() 138 LF_shp_Q14 = psEncCtrl->LF_shp_Q14[ k ]; in silk_prefilter_FIX() 139 AR1_shp_Q13 = &psEncCtrl->AR1_Q13[ k * MAX_SHAPE_LPC_ORDER ]; in silk_prefilter_FIX() 146 B_Q10[ 0 ] = silk_RSHIFT_ROUND( psEncCtrl->GainsPre_Q14[ k ], 4 ); in silk_prefilter_FIX() 147 …tmp_32 = silk_SMLABB( SILK_FIX_CONST( INPUT_TILT, 26 ), psEncCtrl->HarmBoost_Q14[ k ], HarmShapeGa… in silk_prefilter_FIX() 148 …tmp_32 = silk_SMLABB( tmp_32, psEncCtrl->coding_quality_Q14, SILK_FIX_CONST( HIGH_RATE_INPUT_TILT,… in silk_prefilter_FIX() 149 …tmp_32 = silk_SMULWB( tmp_32, -psEncCtrl->GainsPre_Q14[ k ] ); … in silk_prefilter_FIX() [all …]
|
D | main_FIX.h | 95 …const silk_encoder_control_FIX *psEncCtrl, /* I Encoder control … 117 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI… 136 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … 146 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … 155 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … 222 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control …
|
D | LTP_scale_ctrl_FIX.c | 37 …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()
|
D | find_pitch_lags_FIX.c | 39 …silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control … in silk_find_pitch_lags_FIX() argument 99 psEncCtrl->predGain_Q16 = silk_DIV32_varQ( auto_corr[ 0 ], silk_max_int( res_nrg, 1 ), 16 ); in silk_find_pitch_lags_FIX() 129 …if( silk_pitch_analysis_core( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, &psEnc->sCmn.… in silk_find_pitch_lags_FIX() 139 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); in silk_find_pitch_lags_FIX()
|
/external/libopus/silk/fixed/mips/ |
D | noise_shape_analysis_FIX_mipsr1.h | 36 …silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FI… in silk_noise_shape_analysis_FIX() argument 64 …psEncCtrl->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 …]
|