/external/libopus/silk/fixed/ |
D | encode_frame_FIX.c | 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() [all …]
|
D | find_pitch_lags_FIX.c | 59 buf_len = psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length + psEnc->sCmn.ltp_mem_length; in silk_find_pitch_lags_FIX() 62 celt_assert( buf_len >= psEnc->sCmn.pitch_LPC_win_length ); in silk_find_pitch_lags_FIX() 70 ALLOC( Wsig, psEnc->sCmn.pitch_LPC_win_length, opus_int16 ); in silk_find_pitch_lags_FIX() 73 x_ptr = x + buf_len - psEnc->sCmn.pitch_LPC_win_length; in silk_find_pitch_lags_FIX() 75 silk_apply_sine_window( Wsig_ptr, x_ptr, 1, psEnc->sCmn.la_pitch ); in silk_find_pitch_lags_FIX() 78 Wsig_ptr += psEnc->sCmn.la_pitch; in silk_find_pitch_lags_FIX() 79 x_ptr += psEnc->sCmn.la_pitch; in silk_find_pitch_lags_FIX() 80 …silk_memcpy( Wsig_ptr, x_ptr, ( psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pit… in silk_find_pitch_lags_FIX() 83 Wsig_ptr += psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pitch, 1 ); in silk_find_pitch_lags_FIX() 84 x_ptr += psEnc->sCmn.pitch_LPC_win_length - silk_LSHIFT( psEnc->sCmn.la_pitch, 1 ); in silk_find_pitch_lags_FIX() [all …]
|
D | find_pred_coefs_FIX.c | 54 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_find_pred_coefs_FIX() 57 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_find_pred_coefs_FIX() 74 psEnc->sCmn.nb_subfr * psEnc->sCmn.predictLPCOrder in silk_find_pred_coefs_FIX() 75 + psEnc->sCmn.frame_length, opus_int16 ); in silk_find_pred_coefs_FIX() 76 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { 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() 85 ALLOC( xXLTP_Q17, psEnc->sCmn.nb_subfr * LTP_ORDER, opus_int32 ); in silk_find_pred_coefs_FIX() 86 ALLOC( XXLTP_Q17, psEnc->sCmn.nb_subfr * LTP_ORDER * LTP_ORDER, opus_int32 ); 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() [all …]
|
D | noise_shape_analysis_FIX.c | 161 x_ptr = x - psEnc->sCmn.la_shape; in silk_noise_shape_analysis_FIX() 166 SNR_adj_dB_Q7 = psEnc->sCmn.SNR_dB_Q7; in silk_noise_shape_analysis_FIX() 169 …psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX() 170 + psEnc->sCmn.input_quality_bands_Q15[ 1 ], 2 ); in silk_noise_shape_analysis_FIX() 177 if( psEnc->sCmn.useCBR == 0 ) { in silk_noise_shape_analysis_FIX() 178 b_Q8 = SILK_FIX_CONST( 1.0, 8 ) - psEnc->sCmn.speech_activity_Q8; in silk_noise_shape_analysis_FIX() 185 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FIX() 191 … silk_SMLAWB( SILK_FIX_CONST( 6.0, 9 ), -SILK_FIX_CONST( 0.4, 18 ), psEnc->sCmn.SNR_dB_Q7 ), in silk_noise_shape_analysis_FIX() 199 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FIX() 201 psEnc->sCmn.indices.quantOffsetType = 0; in silk_noise_shape_analysis_FIX() [all …]
|
D | process_gains_FIX.c | 47 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_process_gains_FIX() 50 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_process_gains_FIX() 58 …( SILK_FIX_CONST( 21 + 16 / 0.33, 7 ) - psEnc->sCmn.SNR_dB_Q7, SILK_FIX_CONST( 0.33, 16 ) ) ), psE… in silk_process_gains_FIX() 60 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_process_gains_FIX() 90 …silk_memcpy( psEncCtrl->GainsUnq_Q16, psEncCtrl->Gains_Q16, psEnc->sCmn.nb_subfr * sizeof( opus_in… in silk_process_gains_FIX() 94 silk_gains_quant( psEnc->sCmn.indices.GainsIndices, psEncCtrl->Gains_Q16, in silk_process_gains_FIX() 95 &psShapeSt->LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_process_gains_FIX() 98 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_process_gains_FIX() 99 …if( psEncCtrl->LTPredCodGain_Q7 + silk_RSHIFT( psEnc->sCmn.input_tilt_Q15, 8 ) > SILK_FIX_CONST( 1… in silk_process_gains_FIX() 100 psEnc->sCmn.indices.quantOffsetType = 0; in silk_process_gains_FIX() [all …]
|
D | LTP_scale_ctrl_FIX.c | 45 round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; in silk_LTP_scale_ctrl_FIX() 46 psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( in silk_LTP_scale_ctrl_FIX() 50 psEnc->sCmn.indices.LTP_scaleIndex = 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 | structs_FIX.h | 54 …silk_encoder_state sCmn; /* Common struct, shared with … member
|
/external/libopus/silk/ |
D | control_codec.c | 75 psEnc->sCmn.useDTX = encControl->useDTX; in silk_control_encoder() 76 psEnc->sCmn.useCBR = encControl->useCBR; in silk_control_encoder() 77 psEnc->sCmn.API_fs_Hz = encControl->API_sampleRate; in silk_control_encoder() 78 psEnc->sCmn.maxInternal_fs_Hz = encControl->maxInternalSampleRate; in silk_control_encoder() 79 psEnc->sCmn.minInternal_fs_Hz = encControl->minInternalSampleRate; in silk_control_encoder() 80 psEnc->sCmn.desiredInternal_fs_Hz = encControl->desiredInternalSampleRate; in silk_control_encoder() 81 psEnc->sCmn.useInBandFEC = encControl->useInBandFEC; in silk_control_encoder() 82 psEnc->sCmn.nChannelsAPI = encControl->nChannelsAPI; in silk_control_encoder() 83 psEnc->sCmn.nChannelsInternal = encControl->nChannelsInternal; in silk_control_encoder() 84 psEnc->sCmn.allow_bandwidth_switch = allow_bw_switch; in silk_control_encoder() [all …]
|
D | enc_API.c | 116 encStatus->API_sampleRate = state_Fxx[ 0 ].sCmn.API_fs_Hz; in silk_QueryEncoder() 117 encStatus->maxInternalSampleRate = state_Fxx[ 0 ].sCmn.maxInternal_fs_Hz; in silk_QueryEncoder() 118 encStatus->minInternalSampleRate = state_Fxx[ 0 ].sCmn.minInternal_fs_Hz; in silk_QueryEncoder() 119 encStatus->desiredInternalSampleRate = state_Fxx[ 0 ].sCmn.desiredInternal_fs_Hz; in silk_QueryEncoder() 120 encStatus->payloadSize_ms = state_Fxx[ 0 ].sCmn.PacketSize_ms; in silk_QueryEncoder() 121 encStatus->bitRate = state_Fxx[ 0 ].sCmn.TargetRate_bps; in silk_QueryEncoder() 122 encStatus->packetLossPercentage = state_Fxx[ 0 ].sCmn.PacketLoss_perc; in silk_QueryEncoder() 123 encStatus->complexity = state_Fxx[ 0 ].sCmn.Complexity; in silk_QueryEncoder() 124 encStatus->useInBandFEC = state_Fxx[ 0 ].sCmn.useInBandFEC; in silk_QueryEncoder() 125 encStatus->useDTX = state_Fxx[ 0 ].sCmn.useDTX; in silk_QueryEncoder() [all …]
|
D | init_encoder.c | 52 psEnc->sCmn.arch = arch; in silk_init_encoder() 54 …psEnc->sCmn.variable_HP_smth1_Q15 = silk_LSHIFT( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUT… in silk_init_encoder() 55 psEnc->sCmn.variable_HP_smth2_Q15 = psEnc->sCmn.variable_HP_smth1_Q15; in silk_init_encoder() 58 psEnc->sCmn.first_frame_after_reset = 1; in silk_init_encoder() 61 ret += silk_VAD_Init( &psEnc->sCmn.sVAD ); in silk_init_encoder()
|
D | HP_variable_cutoff.c | 45 silk_encoder_state *psEncC1 = &state_Fxx[ 0 ].sCmn; in silk_HP_variable_cutoff()
|
/external/libopus/silk/float/ |
D | encode_frame_FLP.c | 54 silk_VAD_GetSA_Q8( &psEnc->sCmn, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.arch ); in silk_encode_do_VAD_FLP() 56 if( activity == VAD_NO_ACTIVITY && psEnc->sCmn.speech_activity_Q8 >= activity_threshold ) { in silk_encode_do_VAD_FLP() 57 psEnc->sCmn.speech_activity_Q8 = activity_threshold - 1; in silk_encode_do_VAD_FLP() 63 if( psEnc->sCmn.speech_activity_Q8 < activity_threshold ) { in silk_encode_do_VAD_FLP() 64 psEnc->sCmn.indices.signalType = TYPE_NO_VOICE_ACTIVITY; in silk_encode_do_VAD_FLP() 65 psEnc->sCmn.noSpeechCounter++; in silk_encode_do_VAD_FLP() 66 if( psEnc->sCmn.noSpeechCounter <= NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FLP() 67 psEnc->sCmn.inDTX = 0; in silk_encode_do_VAD_FLP() 68 … } else if( psEnc->sCmn.noSpeechCounter > MAX_CONSECUTIVE_DTX + NB_SPEECH_FRAMES_BEFORE_DTX ) { in silk_encode_do_VAD_FLP() 69 psEnc->sCmn.noSpeechCounter = NB_SPEECH_FRAMES_BEFORE_DTX; in silk_encode_do_VAD_FLP() [all …]
|
D | find_pitch_lags_FLP.c | 56 buf_len = psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length + psEnc->sCmn.ltp_mem_length; in silk_find_pitch_lags_FLP() 59 celt_assert( buf_len >= psEnc->sCmn.pitch_LPC_win_length ); in silk_find_pitch_lags_FLP() 61 x_buf = x - psEnc->sCmn.ltp_mem_length; in silk_find_pitch_lags_FLP() 70 x_buf_ptr = x_buf + buf_len - psEnc->sCmn.pitch_LPC_win_length; in silk_find_pitch_lags_FLP() 72 silk_apply_sine_window_FLP( Wsig_ptr, x_buf_ptr, 1, psEnc->sCmn.la_pitch ); in silk_find_pitch_lags_FLP() 75 Wsig_ptr += psEnc->sCmn.la_pitch; in silk_find_pitch_lags_FLP() 76 x_buf_ptr += psEnc->sCmn.la_pitch; in silk_find_pitch_lags_FLP() 77 …silk_memcpy( Wsig_ptr, x_buf_ptr, ( psEnc->sCmn.pitch_LPC_win_length - ( psEnc->sCmn.la_pitch << 1… in silk_find_pitch_lags_FLP() 80 Wsig_ptr += psEnc->sCmn.pitch_LPC_win_length - ( psEnc->sCmn.la_pitch << 1 ); in silk_find_pitch_lags_FLP() 81 x_buf_ptr += psEnc->sCmn.pitch_LPC_win_length - ( psEnc->sCmn.la_pitch << 1 ); in silk_find_pitch_lags_FLP() [all …]
|
D | find_pred_coefs_FLP.c | 53 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_find_pred_coefs_FLP() 58 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { 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 …_LTP_FLP( XXLTP, xXLTP, res_pitch, psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_sub… 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() 75 … silk_LTP_analysis_filter_FLP( LPC_in_pre, x - psEnc->sCmn.predictLPCOrder, psEncCtrl->LTPCoef, in silk_find_pred_coefs_FLP() 76 …psEncCtrl->pitchL, invGains, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.predictLP… in silk_find_pred_coefs_FLP() 82 x_ptr = x - psEnc->sCmn.predictLPCOrder; in silk_find_pred_coefs_FLP() 84 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_find_pred_coefs_FLP() [all …]
|
D | noise_shape_analysis_FLP.c | 165 x_ptr = x - psEnc->sCmn.la_shape; in silk_noise_shape_analysis_FLP() 170 SNR_adj_dB = psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f ); in silk_noise_shape_analysis_FLP() 173 …psEncCtrl->input_quality = 0.5f * ( psEnc->sCmn.input_quality_bands_Q15[ 0 ] + psEnc->sCmn.input_q… in silk_noise_shape_analysis_FLP() 178 if( psEnc->sCmn.useCBR == 0 ) { in silk_noise_shape_analysis_FLP() 180 b = 1.0f - psEnc->sCmn.speech_activity_Q8 * ( 1.0f / 256.0f ); in silk_noise_shape_analysis_FLP() 184 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FLP() 189 …SNR_adj_dB += ( -0.4f * psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f ) + 6.0f ) * ( 1.0f - psEncCtrl->inpu… in silk_noise_shape_analysis_FLP() 196 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FLP() 198 psEnc->sCmn.indices.quantOffsetType = 0; in silk_noise_shape_analysis_FLP() 201 nSamples = 2 * psEnc->sCmn.fs_kHz; in silk_noise_shape_analysis_FLP() [all …]
|
D | process_gains_FLP.c | 48 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_process_gains_FLP() 50 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_process_gains_FLP() 56 …( silk_float )( pow( 2.0f, 0.33f * ( 21.0f - psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f ) ) ) / psEnc->s… in silk_process_gains_FLP() 58 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_process_gains_FLP() 66 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { 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() 75 silk_gains_quant( psEnc->sCmn.indices.GainsIndices, pGains_Q16, in silk_process_gains_FLP() 76 &psShapeSt->LastGainIndex, condCoding == CODE_CONDITIONALLY, psEnc->sCmn.nb_subfr ); in silk_process_gains_FLP() 79 for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { in silk_process_gains_FLP() 84 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_process_gains_FLP() [all …]
|
D | wrappers_FLP.c | 121 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_NSQ_wrapper_FLP() 122 for( j = 0; j < psEnc->sCmn.shapingLPCOrder; j++ ) { in silk_NSQ_wrapper_FLP() 127 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_NSQ_wrapper_FLP() 136 for( i = 0; i < psEnc->sCmn.nb_subfr * LTP_ORDER; i++ ) { in silk_NSQ_wrapper_FLP() 141 for( i = 0; i < psEnc->sCmn.predictLPCOrder; i++ ) { in silk_NSQ_wrapper_FLP() 146 for( i = 0; i < psEnc->sCmn.nb_subfr; i++ ) { in silk_NSQ_wrapper_FLP() 158 for( i = 0; i < psEnc->sCmn.frame_length; i++ ) { in silk_NSQ_wrapper_FLP() 163 if( psEnc->sCmn.nStatesDelayedDecision > 1 || psEnc->sCmn.warping_Q16 > 0 ) { in silk_NSQ_wrapper_FLP() 164 … silk_NSQ_del_dec( &psEnc->sCmn, psNSQ, psIndices, x16, pulses, PredCoef_Q12[ 0 ], LTPCoef_Q14, in silk_NSQ_wrapper_FLP() 165 … Tilt_Q14, LF_shp_Q14, Gains_Q16, psEncCtrl->pitchL, Lambda_Q10, LTP_scale_Q14, psEnc->sCmn.arch ); in silk_NSQ_wrapper_FLP() [all …]
|
D | LTP_scale_ctrl_FLP.c | 44 round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; in silk_LTP_scale_ctrl_FLP() 45 …psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( round_loss * psEncCtrl->LTPredCodGain … in silk_LTP_scale_ctrl_FLP() 48 psEnc->sCmn.indices.LTP_scaleIndex = 0; 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 | structs_FLP.h | 53 …silk_encoder_state sCmn; /* Common struct, shared with fixe… member
|
/external/libopus/silk/fixed/mips/ |
D | noise_shape_analysis_FIX_mipsr1.h | 56 x_ptr = x - psEnc->sCmn.la_shape; in silk_noise_shape_analysis_FIX() 61 SNR_adj_dB_Q7 = psEnc->sCmn.SNR_dB_Q7; in silk_noise_shape_analysis_FIX() 64 …psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX() 65 + psEnc->sCmn.input_quality_bands_Q15[ 1 ], 2 ); in silk_noise_shape_analysis_FIX() 72 if( psEnc->sCmn.useCBR == 0 ) { in silk_noise_shape_analysis_FIX() 73 b_Q8 = SILK_FIX_CONST( 1.0, 8 ) - psEnc->sCmn.speech_activity_Q8; in silk_noise_shape_analysis_FIX() 80 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FIX() 86 … silk_SMLAWB( SILK_FIX_CONST( 6.0, 9 ), -SILK_FIX_CONST( 0.4, 18 ), psEnc->sCmn.SNR_dB_Q7 ), in silk_noise_shape_analysis_FIX() 94 if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { in silk_noise_shape_analysis_FIX() 96 psEnc->sCmn.indices.quantOffsetType = 0; in silk_noise_shape_analysis_FIX() [all …]
|
/external/libopus/src/ |
D | opus_encoder.c | 1636 hp_freq_smth1 = ((silk_encoder*)silk_enc)->state_Fxx[0].sCmn.variable_HP_smth1_Q15; in opus_encode_native()
|