/external/libopus/silk/ |
D | VAD.c | 104 silk_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) ); in silk_VAD_GetSA_Q8() 109 decimated_framelength1 = silk_RSHIFT( psEncC->frame_length, 1 ); in silk_VAD_GetSA_Q8() 110 decimated_framelength2 = silk_RSHIFT( psEncC->frame_length, 2 ); in silk_VAD_GetSA_Q8() 111 decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 ); in silk_VAD_GetSA_Q8() 142 X[ decimated_framelength - 1 ] = silk_RSHIFT( X[ decimated_framelength - 1 ], 1 ); in silk_VAD_GetSA_Q8() 145 X[ i - 1 ] = silk_RSHIFT( X[ i - 1 ], 1 ); in silk_VAD_GetSA_Q8() 156 …decimated_framelength = silk_RSHIFT( psEncC->frame_length, silk_min_int( VAD_N_BANDS - b, VAD_N_BA… in silk_VAD_GetSA_Q8() 159 dec_subframe_length = silk_RSHIFT( decimated_framelength, VAD_INTERNAL_SUBFRAMES_LOG2 ); in silk_VAD_GetSA_Q8() 170 x_tmp = silk_RSHIFT( in silk_VAD_GetSA_Q8() 183 Xnrg[ b ] = silk_ADD_POS_SAT32( Xnrg[ b ], silk_RSHIFT( sumSquared, 1 ) ); in silk_VAD_GetSA_Q8() [all …]
|
D | PLC.c | 140 … psPLC->LTPCoef_Q14[ i ] = silk_RSHIFT( silk_SMULBB( psPLC->LTPCoef_Q14[ i ], scale_Q10 ), 10 ); in silk_PLC_update() 149 … psPLC->LTPCoef_Q14[ i ] = silk_RSHIFT( silk_SMULBB( psPLC->LTPCoef_Q14[ i ], scale_Q14 ), 14 ); in silk_PLC_update() 194 prevGain_Q10[0] = silk_RSHIFT( psPLC->prevGain_Q16[ 0 ], 6); in silk_PLC_conceal() 195 prevGain_Q10[1] = silk_RSHIFT( psPLC->prevGain_Q16[ 1 ], 6); in silk_PLC_conceal() 206 exc_buf_ptr[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT( in silk_PLC_conceal() 215 if( silk_RSHIFT( energy1, shift2 ) < silk_RSHIFT( energy2, shift1 ) ) { in silk_PLC_conceal() 251 …rand_scale_Q14 = (opus_int16)silk_RSHIFT( silk_SMULBB( rand_scale_Q14, psPLC->prevLTP_scale_Q14 ),… in silk_PLC_conceal() 258 …down_scale_Q30 = silk_min_32( silk_RSHIFT( (opus_int32)1 << 30, LOG2_INV_LPC_GAIN_HIGH_THRES ), in… in silk_PLC_conceal() 259 …down_scale_Q30 = silk_max_32( silk_RSHIFT( (opus_int32)1 << 30, LOG2_INV_LPC_GAIN_LOW_THRES ), dow… in silk_PLC_conceal() 262 rand_Gain_Q15 = silk_RSHIFT( silk_SMULWB( down_scale_Q30, rand_Gain_Q15 ), 14 ); in silk_PLC_conceal() [all …]
|
D | Inlines.h | 88 y >>= silk_RSHIFT(lz, 1); in silk_SQRT_APPROX() 116 …b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) ); /* Q: 29 + 16 - b_head… in silk_DIV32_varQ() 134 return silk_RSHIFT(result, lshift); in silk_DIV32_varQ() 159 …b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) ); /* Q: 29 + 16 - b_head… in silk_INVERSE32_varQ() 176 return silk_RSHIFT(result, lshift); in silk_INVERSE32_varQ()
|
D | NLSF_unpack.c | 49 … ec_ix [ i ] = silk_SMULBB( silk_RSHIFT( entry, 1 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 ); in silk_NLSF_unpack() 51 … ec_ix [ i + 1 ] = silk_SMULBB( silk_RSHIFT( entry, 5 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 ); in silk_NLSF_unpack() 52 …pred_Q8[ i + 1 ] = psNLSF_CB->pred_Q8[ i + ( silk_RSHIFT( entry, 4 ) & 1 ) * ( psNLSF_CB->order - … in silk_NLSF_unpack()
|
D | biquad_alt.c | 58 A0_U_Q28 = silk_RSHIFT( -A_Q28[ 0 ], 14 ); /* upper part */ in silk_biquad_alt() 60 A1_U_Q28 = silk_RSHIFT( -A_Q28[ 1 ], 14 ); /* upper part */ in silk_biquad_alt() 76 out[ k * stride ] = (opus_int16)silk_SAT16( silk_RSHIFT( out32_Q14 + (1<<14) - 1, 14 ) ); in silk_biquad_alt()
|
D | stereo_LR_to_MS.c | 146 pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 ); in silk_stereo_LR_to_MS() 147 pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 ); in silk_stereo_LR_to_MS() 161 pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 ); in silk_stereo_LR_to_MS() 162 pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 ); in silk_stereo_LR_to_MS() 174 pred_Q13[ 0 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 0 ] ), 14 ); in silk_stereo_LR_to_MS() 175 pred_Q13[ 1 ] = silk_RSHIFT( silk_SMULBB( state->smth_width_Q14, pred_Q13[ 1 ] ), 14 ); in silk_stereo_LR_to_MS()
|
D | code_signs.c | 37 #define silk_enc_map(a) ( silk_RSHIFT( (a), 15 ) + 1 ) 59 length = silk_RSHIFT( length + SHELL_CODEC_FRAME_LENGTH/2, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_encode_signs() 93 length = silk_RSHIFT( length + SHELL_CODEC_FRAME_LENGTH/2, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_decode_signs()
|
D | NLSF_stabilize.c | 103 min_center_Q15 += silk_RSHIFT( NDeltaMin_Q15[I], 1 ); in silk_NLSF_stabilize() 110 max_center_Q15 -= silk_RSHIFT( NDeltaMin_Q15[I], 1 ); in silk_NLSF_stabilize() 115 NLSF_Q15[I-1] = center_freq_Q15 - silk_RSHIFT( NDeltaMin_Q15[I], 1 ); in silk_NLSF_stabilize()
|
D | sigm_Q15.c | 62 ind = silk_RSHIFT( in_Q5, 5 ); in silk_sigm_Q15() 71 ind = silk_RSHIFT( in_Q5, 5 ); in silk_sigm_Q15()
|
D | log2lin.c | 48 out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); in silk_log2lin() 55 …out = silk_MLA( out, silk_RSHIFT( out, 7 ), silk_SMLAWB( frac_Q7, silk_SMULBB( frac_Q7, 128 - frac… in silk_log2lin()
|
D | encode_pulses.c | 87 iter = silk_RSHIFT( frame_length, LOG2_SHELL_CODEC_FRAME_LENGTH ); in silk_encode_pulses() 125 abs_pulses_ptr[ k ] = silk_RSHIFT( abs_pulses_ptr[ k ], 1 ); in silk_encode_pulses() 192 bit = silk_RSHIFT( abs_q, j ) & 1; in silk_encode_pulses()
|
D | A2NLSF.c | 131 dd = silk_RSHIFT( d, 1 ); in silk_A2NLSF() 191 nom = silk_LSHIFT( ylo, 8 - BIN_DIV_STEPS_A2NLSF_FIX ) + silk_RSHIFT( den, 1 ); in silk_A2NLSF() 197 ffrac += silk_DIV32( ylo, silk_RSHIFT( ylo - yhi, 8 - BIN_DIV_STEPS_A2NLSF_FIX ) ); in silk_A2NLSF()
|
D | encode_indices.c | 78 …ec_enc_icdf( psRangeEnc, silk_RSHIFT( psIndices->GainsIndices[ 0 ], 3 ), silk_gain_iCDF[ psIndices… in silk_encode_indices() 134 … pitch_high_bits = silk_DIV32_16( psIndices->lagIndex, silk_RSHIFT( psEncC->fs_kHz, 1 ) ); in silk_encode_indices() 135 …pitch_low_bits = psIndices->lagIndex - silk_SMULBB( pitch_high_bits, silk_RSHIFT( psEncC->fs_kHz, … in silk_encode_indices()
|
D | NSQ.c | 129 HarmShapeFIRPacked_Q14 = silk_RSHIFT( HarmShapeGain_Q14[ k ], 2 ); in silk_NSQ() 130 … HarmShapeFIRPacked_Q14 |= silk_LSHIFT( (opus_int32)silk_RSHIFT( HarmShapeGain_Q14[ k ], 1 ), 16 ); in silk_NSQ() 206 Gain_Q10 = silk_RSHIFT( Gain_Q16, 6 ); in silk_noise_shape_quantizer() 218 LPC_pred_Q10 = silk_RSHIFT( predictLPCOrder, 1 ); in silk_noise_shape_quantizer() 258 n_AR_Q12 = silk_RSHIFT( shapingLPCOrder, 1 ); in silk_noise_shape_quantizer() 306 q1_Q0 = silk_RSHIFT( q1_Q10, 10 ); in silk_noise_shape_quantizer()
|
D | CNG.c | 49 exc_mask = silk_RSHIFT( exc_mask, 1 ); in silk_CNG_exc() 55 idx = (opus_int)( silk_RSHIFT( seed, 24 ) & exc_mask ); in silk_CNG_exc() 142 sum_Q6 = silk_RSHIFT( psDec->LPC_order, 1 ); in silk_CNG()
|
D | resampler_private_down_FIR.c | 55 buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); in silk_resampler_private_down_FIR_INTERPOL() 89 buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); in silk_resampler_private_down_FIR_INTERPOL() 112 buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); in silk_resampler_private_down_FIR_INTERPOL()
|
/external/libopus/silk/fixed/ |
D | apply_sine_window_FIX.c | 80 S1_Q16 = f_Q16 + silk_RSHIFT( length, 3 ); in silk_apply_sine_window() 85 S1_Q16 = ( (opus_int32)1 << 16 ) + silk_RSHIFT( c_Q16, 1 ) + silk_RSHIFT( length, 4 ); in silk_apply_sine_window() 91 px_win[ k ] = (opus_int16)silk_SMULWB( silk_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k ] ); in silk_apply_sine_window() 96 px_win[ k + 2 ] = (opus_int16)silk_SMULWB( silk_RSHIFT( S0_Q16 + S1_Q16, 1 ), px[ k + 2] ); in silk_apply_sine_window()
|
D | find_LTP_FIX.c | 92 …rr[ k ] = silk_RSHIFT( rr[ k ], corr_rshifts[ k ] - rr_shifts ); /* rr[ k ] in Q( -corr_rshifts[ k… in silk_find_LTP_FIX() 113 …silk_RSHIFT( silk_SMULWB( (opus_int32)subfr_length, 655 ), corr_rshifts[ k ] - extra_shifts ); … in silk_find_LTP_FIX() 117 …temp32 = silk_RSHIFT( temp32, 31 + corr_rshifts[ k ] - extra_shifts - 26 ); /* Q26 */ in silk_find_LTP_FIX() 151 …LPC_res_nrg = silk_ADD32( LPC_res_nrg, silk_RSHIFT( silk_ADD32( silk_SMULWB( rr[ k ], Wgh… in silk_find_LTP_FIX() 152 …LPC_LTP_res_nrg = silk_ADD32( LPC_LTP_res_nrg, silk_RSHIFT( silk_ADD32( silk_SMULWB( nrg[ k ], Wgh… in silk_find_LTP_FIX() 197 …temp32 = silk_RSHIFT( 262, maxRshifts + extra_shifts ) + 1; /* 1e-3f in Q( 18 - (maxRshifts + extr… in silk_find_LTP_FIX() 201 …temp32 = silk_ADD32( temp32, silk_RSHIFT( w[ k ], maxRshifts_wxtra - corr_rshi… in silk_find_LTP_FIX() 202 …wd = silk_ADD32( wd, silk_LSHIFT( silk_SMULWW( silk_RSHIFT( w[ k ], maxRshifts_wxtra - corr_rs… in silk_find_LTP_FIX() 210 temp32 = silk_RSHIFT( w[ k ], 2 - corr_rshifts[ k ] ); in silk_find_LTP_FIX() 218 …silk_RSHIFT( SILK_FIX_CONST( LTP_SMOOTHING, 26 ), 10 ) + temp32 ), /* Q10… in silk_find_LTP_FIX() [all …]
|
D | find_LPC_FIX.c | 76 res_nrg = res_nrg - silk_RSHIFT( res_tmp_nrg, shift ); in silk_find_LPC_FIX() 80 res_nrg = silk_RSHIFT( res_nrg, -shift ) - res_tmp_nrg; in silk_find_LPC_FIX() 106 res_nrg1 = silk_RSHIFT( res_nrg1, shift ); in silk_find_LPC_FIX() 109 res_nrg0 = silk_RSHIFT( res_nrg0, -shift ); in silk_find_LPC_FIX() 117 if( silk_RSHIFT( res_nrg_interp, shift ) < res_nrg ) { in silk_find_LPC_FIX() 124 if( res_nrg_interp < silk_RSHIFT( res_nrg, -shift ) ) { in silk_find_LPC_FIX()
|
D | residual_energy16_FIX.c | 65 …Qxtra = silk_min_int( Qxtra, silk_CLZ32( silk_MUL( D, silk_RSHIFT( silk_SMULWB( w_max, c_max ), 4 … in silk_residual_energy16_covar_FIX() 78 nrg = silk_RSHIFT( wxx, 1 + lshifts ) - tmp; /* Q: -lshifts - 1 */ in silk_residual_energy16_covar_FIX() 88 tmp = silk_SMLAWB( tmp, silk_RSHIFT( pRow[ i ], 1 ), cn[ i ] ); in silk_residual_energy16_covar_FIX() 96 } else if( nrg > silk_RSHIFT( silk_int32_MAX, lshifts + 2 ) ) { in silk_residual_energy16_covar_FIX()
|
D | pitch_analysis_core_FIX.c | 170 shift = silk_RSHIFT( shift, 1 ); in silk_pitch_analysis_core() 172 frame_4kHz[ i ] = silk_RSHIFT( frame_4kHz[ i ], shift ); in silk_pitch_analysis_core() 319 shift = silk_RSHIFT( shift, 1 ); in silk_pitch_analysis_core() 321 frame_8kHz[ i ] = silk_RSHIFT( frame_8kHz[ i ], shift ); in silk_pitch_analysis_core() 374 prevLag = silk_RSHIFT( prevLag, 1 ); in silk_pitch_analysis_core() 425 …CCmax_new_b = CCmax_new - silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 1… in silk_pitch_analysis_core() 432 …delta_lag_log2_sqr_Q7 = silk_RSHIFT( silk_SMULBB( delta_lag_log2_sqr_Q7, delta_lag_log2_sqr_Q7 ), … in silk_pitch_analysis_core() 433 …prev_lag_bias_Q13 = silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ), *L… in silk_pitch_analysis_core() 473 shift = silk_RSHIFT( shift, 1 ); in silk_pitch_analysis_core() 475 scratch_mem[ i ] = silk_RSHIFT( frame[ i ], shift ); in silk_pitch_analysis_core() [all …]
|
D | noise_shape_analysis_FIX.c | 174 …psEncCtrl->input_quality_Q14 = ( opus_int )silk_RSHIFT( (opus_int32)psEnc->sCmn.input_quality_band… in silk_noise_shape_analysis_FIX() 178 psEncCtrl->coding_quality_Q14 = silk_RSHIFT( silk_sigm_Q15( silk_RSHIFT_ROUND( SNR_adj_dB_Q7 - in silk_noise_shape_analysis_FIX() 216 nrg += silk_RSHIFT( nSamples, scale ); /* Q(-scale)*/ in silk_noise_shape_analysis_FIX() 226 psEncCtrl->sparseness_Q8 = silk_RSHIFT( silk_sigm_Q15( silk_SMULWB( energy_variation_Q7 - in silk_noise_shape_analysis_FIX() 252 BWExp1_Q16 = silk_DIV32_16( silk_LSHIFT( BWExp1_Q16, 14 ), silk_RSHIFT( BWExp2_Q16, 2 ) ); in silk_noise_shape_analysis_FIX() 269 slope_part = silk_RSHIFT( psEnc->sCmn.shapeWinLength - flat_part, 1 ); in silk_noise_shape_analysis_FIX() 289 …auto_corr[0] = silk_ADD32( auto_corr[0], silk_max_32( silk_SMULWB( silk_RSHIFT( auto_corr[ 0 ], 4 … in silk_noise_shape_analysis_FIX() 378 strength_Q16 = silk_RSHIFT( silk_MUL( strength_Q16, psEnc->sCmn.speech_activity_Q8 ), 8 ); in silk_noise_shape_analysis_FIX()
|
D | schur_FIX.c | 55 C[ k ][ 0 ] = C[ k ][ 1 ] = silk_RSHIFT( c[ k ], 1 ); in silk_schur() 83 … rc_tmp_Q15 = -silk_DIV32_16( C[ k + 1 ][ 0 ], silk_max_32( silk_RSHIFT( C[ 0 ][ 1 ], 15 ), 1 ) ); in silk_schur()
|
D | prefilter_FIX.c | 71 acc_Q11 = silk_RSHIFT( order, 1 ); in silk_warped_LPC_analysis_filter_FIX() 125 HarmShapeFIRPacked_Q12 = silk_RSHIFT( HarmShapeGain_Q12, 2 ); in silk_prefilter_FIX() 126 … HarmShapeFIRPacked_Q12 |= silk_LSHIFT( (opus_int32)silk_RSHIFT( HarmShapeGain_Q12, 1 ), 16 ); in silk_prefilter_FIX()
|
D | process_gains_FIX.c | 67 if( ResNrgPart >= silk_RSHIFT( silk_int32_MAX, -psEncCtrl->ResNrgQ[ k ] ) ) { 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()
|