Home
last modified time | relevance | path

Searched refs:nrg (Results 1 – 25 of 33) sorted by relevance

12

/external/libopus/silk/
Dsum_sqr_shift.c45 opus_int32 nrg; in silk_sum_sqr_shift() local
50 nrg = len; in silk_sum_sqr_shift()
54 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft ); in silk_sum_sqr_shift()
59 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft ); in silk_sum_sqr_shift()
61 silk_assert( nrg >= 0 ); in silk_sum_sqr_shift()
64 shft = silk_max_32(0, shft+3 - silk_CLZ32(nrg)); in silk_sum_sqr_shift()
65 nrg = 0; in silk_sum_sqr_shift()
69 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft ); in silk_sum_sqr_shift()
74 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft ); in silk_sum_sqr_shift()
77 silk_assert( nrg >= 0 ); in silk_sum_sqr_shift()
[all …]
DVAD.c309 opus_int32 nl, nrg, inv_nrg; in silk_VAD_GetNoiseLevels() local
327 nrg = silk_ADD_POS_SAT32( pX[ k ], psSilk_VAD->NoiseLevelBias[ k ] ); in silk_VAD_GetNoiseLevels()
328 silk_assert( nrg > 0 ); in silk_VAD_GetNoiseLevels()
331 inv_nrg = silk_DIV32( silk_int32_MAX, nrg ); in silk_VAD_GetNoiseLevels()
335 if( nrg > silk_LSHIFT( nl, 3 ) ) { in silk_VAD_GetNoiseLevels()
337 } else if( nrg < nl ) { in silk_VAD_GetNoiseLevels()
/external/webrtc/webrtc/modules/audio_coding/codecs/isac/main/source/
Dlpc_analysis.c117 double nrg[4], chng, pg; in WebRtcIsac_GetVars() local
123 nrg[0] = 0.0001; in WebRtcIsac_GetVars()
125 nrg[0] += input[k]*input[k]; in WebRtcIsac_GetVars()
127 nrg[1] = 0.0001; in WebRtcIsac_GetVars()
129 nrg[1] += input[k]*input[k]; in WebRtcIsac_GetVars()
131 nrg[2] = 0.0001; in WebRtcIsac_GetVars()
133 nrg[2] += input[k]*input[k]; in WebRtcIsac_GetVars()
135 nrg[3] = 0.0001; in WebRtcIsac_GetVars()
137 nrg[3] += input[k]*input[k]; in WebRtcIsac_GetVars()
141 chng = 0.25 * (fabs(10.0 * log10(nrg[3] / nrg[2])) + in WebRtcIsac_GetVars()
[all …]
/external/libopus/silk/fixed/
Dresidual_energy16_FIX.c45 opus_int32 c_max, w_max, tmp, tmp2, nrg; in silk_residual_energy16_covar_FIX() local
78 nrg = silk_RSHIFT( wxx, 1 + lshifts ) - tmp; /* Q: -lshifts - 1 */ in silk_residual_energy16_covar_FIX()
91 nrg = silk_ADD_LSHIFT32( nrg, tmp2, lshifts ); /* Q: -lshifts - 1 */ in silk_residual_energy16_covar_FIX()
94 if( nrg < 1 ) { in silk_residual_energy16_covar_FIX()
95 nrg = 1; in silk_residual_energy16_covar_FIX()
96 } else if( nrg > silk_RSHIFT( silk_int32_MAX, lshifts + 2 ) ) { in silk_residual_energy16_covar_FIX()
97 nrg = silk_int32_MAX >> 1; in silk_residual_energy16_covar_FIX()
99 nrg = silk_LSHIFT( nrg, lshifts + 1 ); /* Q0 */ in silk_residual_energy16_covar_FIX()
101 return nrg; in silk_residual_energy16_covar_FIX()
Dfind_LTP_FIX.c49 opus_int32 xx, nrg, temp; in silk_find_LTP_FIX() local
57 …silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, XXLTP_Q17_ptr, &nrg, &XX_shifts, arch ); … in silk_find_LTP_FIX()
65nrg = silk_RSHIFT32( nrg, extra_shifts ); /* Q( -xX… in silk_find_LTP_FIX()
76 temp = silk_SMLAWB( 1, nrg, SILK_FIX_CONST( LTP_CORR_INV_MAX, 16 ) ); in silk_find_LTP_FIX()
Dburg_modified_FIX.c58 opus_int32 C0, num, nrg, rc_Q31, invGain_Q30, Atmp_QA, Atmp1, tmp1, tmp2, x1, x2; in silk_burg_modified_c() local
174nrg = silk_ADD32( CAb[ 0 ], CAf[ 0 ] ); /*… in silk_burg_modified_c()
184 nrg = silk_ADD_LSHIFT32( nrg, silk_SMMUL( silk_ADD32( CAb[ k + 1 ], CAf[ k + 1 ] ), in silk_burg_modified_c()
193 if( silk_abs( num ) < nrg ) { in silk_burg_modified_c()
194 rc_Q31 = silk_DIV32_varQ( num, nrg, 31 ); in silk_burg_modified_c()
269nrg = CAf[ 0 ]; /* Q( … in silk_burg_modified_c()
273nrg = silk_SMLAWW( nrg, CAf[ k + 1 ], Atmp1 ); /* Q( -rsh… in silk_burg_modified_c()
277 …*res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ), -tmp1 );/*… in silk_burg_modified_c()
Dnoise_shape_analysis_FIX.c151 opus_int32 nrg, log_energy_Q7, log_energy_prev_Q7, energy_variation_Q7; in silk_noise_shape_analysis_FIX() local
210 silk_sum_sqr_shift( &nrg, &scale, pitch_res_ptr, nSamples ); in silk_noise_shape_analysis_FIX()
211 nrg += silk_RSHIFT( nSamples, scale ); /* Q(-scale)*/ in silk_noise_shape_analysis_FIX()
213 log_energy_Q7 = silk_lin2log( nrg ); in silk_noise_shape_analysis_FIX()
276 nrg = silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FIX()
277 silk_assert( nrg >= 0 ); in silk_noise_shape_analysis_FIX()
289 nrg >>= 1; in silk_noise_shape_analysis_FIX()
292 tmp32 = silk_SQRT_APPROX( nrg ); in silk_noise_shape_analysis_FIX()
DcorrMatrix_FIX.c81 …opus_int32 *nrg, /* O Energy of x vecto… in silk_corrMatrix_FIX() argument
91 silk_sum_sqr_shift( nrg, rshifts, x, L + order - 1 ); in silk_corrMatrix_FIX()
92 energy = *nrg; in silk_corrMatrix_FIX()
/external/libopus/silk/float/
Dresidual_energy_FLP.c47 silk_float tmp, nrg = 0.0f, regularization; in silk_residual_energy_covar_FLP() local
54 nrg = wxx; in silk_residual_energy_covar_FLP()
60 nrg -= 2.0f * tmp; in silk_residual_energy_covar_FLP()
68 nrg += c[ i ] * ( 2.0f * tmp + matrix_c_ptr( wXX, i, i, D ) * c[ i ] ); in silk_residual_energy_covar_FLP()
70 if( nrg > 0 ) { in silk_residual_energy_covar_FLP()
82 silk_assert( nrg == 0 ); in silk_residual_energy_covar_FLP()
83 nrg = 1.0f; in silk_residual_energy_covar_FLP()
86 return nrg; in silk_residual_energy_covar_FLP()
Dnoise_shape_analysis_FLP.c157 silk_float nrg, log_energy, log_energy_prev, energy_variation; in silk_noise_shape_analysis_FLP() local
207 nrg = ( silk_float )nSamples + ( silk_float )silk_energy_FLP( pitch_res_ptr, nSamples ); in silk_noise_shape_analysis_FLP()
208 log_energy = silk_log2( nrg ); in silk_noise_shape_analysis_FLP()
265 nrg = silk_schur_FLP( rc, auto_corr, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FLP()
267 psEncCtrl->Gains[ k ] = ( silk_float )sqrt( nrg ); in silk_noise_shape_analysis_FLP()
/external/aac/libSBRdec/src/
DHFgen_preFlat.cpp893 FIXP_DBL nrg_ov, nrg; in sbrDecoder_calculateGainVec() local
910 nrg_ov = nrg = (FIXP_DBL)0; in sbrDecoder_calculateGainVec()
922 nrg += (fPow2Div2(sourceBufferReal[i][loBand] << reserve) + in sbrDecoder_calculateGainVec()
930 nrg = (scaleValue(nrg_ov, scale_nrg_ov) >> 1) + in sbrDecoder_calculateGainVec()
931 (scaleValue(nrg, scale_nrg) >> 1); in sbrDecoder_calculateGainVec()
932 nrg = fMult(nrg, invNumSlots); in sbrDecoder_calculateGainVec()
940 if (nrg > (FIXP_DBL)0) { in sbrDecoder_calculateGainVec()
942 nrg = CalcLog2(nrg, exp_new, &exp_log2); in sbrDecoder_calculateGainVec()
943 nrg = scaleValue(nrg, exp_log2 - 6); in sbrDecoder_calculateGainVec()
944 nrg = fMult(FL2FXCONST_SGL(LOG10FAC), nrg); in sbrDecoder_calculateGainVec()
[all …]
Dpvc_dec.cpp545 FIXP_DBL nrg = CalcLog2(E[ksg], 2 * qmfExponent, &exp_log); in pvcDecodeTimeSlot() local
546 nrg = fMult(nrg, FL2FXCONST_SGL(LOG10FAC)); in pvcDecodeTimeSlot()
547 nrg = scaleValue(nrg, exp_log - PVC_ESG_EXP + 2); in pvcDecodeTimeSlot()
548 pEsg[ksg] = fMax(nrg, FL2FXCONST_DBL(-10.0 / (1 << PVC_ESG_EXP))); in pvcDecodeTimeSlot()
/external/aac/libSACdec/src/
Dsac_reshapeBBEnv.cpp162 FIXP_DBL nrg; in getSlotNrgHQ() local
179 nrg = ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
182 slotNrg[4] = nrg + ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
186 nrg = ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
189 nrg += ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
192 slotNrg[5] = nrg + ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
196 nrg = ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
199 slotNrg[6] = nrg + ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
211 nrg = ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
214 nrg += ((fPow2Div2((*pReal++) << maxValSF) + in getSlotNrgHQ()
[all …]
/external/libopus/silk/fixed/mips/
Dnoise_shape_analysis_FIX_mipsr1.h45 opus_int32 nrg, pre_nrg_Q30, log_energy_Q7, log_energy_prev_Q7, energy_variation_Q7; in silk_noise_shape_analysis_FIX() local
105 silk_sum_sqr_shift( &nrg, &scale, pitch_res_ptr, nSamples ); in silk_noise_shape_analysis_FIX()
106 nrg += silk_RSHIFT( nSamples, scale ); /* Q(-scale)*/ in silk_noise_shape_analysis_FIX()
108 log_energy_Q7 = silk_lin2log( nrg ); in silk_noise_shape_analysis_FIX()
183 nrg = silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FIX()
184 silk_assert( nrg >= 0 ); in silk_noise_shape_analysis_FIX()
196 nrg >>= 1; in silk_noise_shape_analysis_FIX()
199 tmp32 = silk_SQRT_APPROX( nrg ); in silk_noise_shape_analysis_FIX()
228 nrg = silk_LPC_inverse_pred_gain_Q24( AR1_Q24, psEnc->sCmn.shapingLPCOrder, arch ); in silk_noise_shape_analysis_FIX()
232 …insPre_Q14[ k ] = ( opus_int ) SILK_FIX_CONST( 0.3, 14 ) + silk_DIV32_varQ( pre_nrg_Q30, nrg, 14 ); in silk_noise_shape_analysis_FIX()
/external/libxaac/decoder/
Dixheaacd_pns_js_thumb.c77 WORD32 nrg = 0; in ixheaacd_gen_rand_vec() local
86 nrg = ixheaacd_add32_sat(nrg, ixheaacd_mult32_shl_sat(*spec, *spec)); in ixheaacd_gen_rand_vec()
91 nrg_scale = ixheaacd_norm32(nrg); in ixheaacd_gen_rand_vec()
95 nrg = ixheaacd_shl32_sat(nrg, nrg_scale); in ixheaacd_gen_rand_vec()
99 nrg = ixheaacd_sqrt(nrg); in ixheaacd_gen_rand_vec()
100 scale = ixheaacd_div32_pos_normb(scale, nrg); in ixheaacd_gen_rand_vec()
Dixheaacd_esbr_envcal.c89 FLOAT32 *ptr_real_buf, *ptr_imag_buf, nrg = 0, p_ref, p_est, avg_gain, g_max, in ixheaacd_sbr_env_calc() local
285 for (nrg = 0, l = 0; l < rate; l++) { in ixheaacd_sbr_env_calc()
286 nrg += in ixheaacd_sbr_env_calc()
290 nrg_est_pvc[c][t] = nrg / rate; in ixheaacd_sbr_env_calc()
295 for (nrg = 0, k = c - (ui - li); k < c; k++) { in ixheaacd_sbr_env_calc()
296 nrg += nrg_est_pvc[k][t]; in ixheaacd_sbr_env_calc()
298 nrg /= (ui - li); in ixheaacd_sbr_env_calc()
305 nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t]; in ixheaacd_sbr_env_calc()
403 for (nrg = 0, l = 0; l < rate; l++) { in ixheaacd_sbr_env_calc()
404 nrg += in ixheaacd_sbr_env_calc()
[all …]
/external/webrtc/webrtc/modules/audio_processing/agc/legacy/
Ddigital_agc.c406 int32_t nrg = out[0][k * L + n] * out[0][k * L + n]; in WebRtcAgc_ProcessDigital() local
407 if (nrg > max_nrg) in WebRtcAgc_ProcessDigital()
409 max_nrg = nrg; in WebRtcAgc_ProcessDigital()
638 int32_t out, nrg, tmp32, tmp32b; in WebRtcAgc_ProcessVad() local
647 nrg = 0; in WebRtcAgc_ProcessVad()
675 nrg += (out * out) >> 6; in WebRtcAgc_ProcessVad()
681 if (!(0xFFFF0000 & nrg)) in WebRtcAgc_ProcessVad()
688 if (!(0xFF000000 & (nrg << zeros))) in WebRtcAgc_ProcessVad()
692 if (!(0xF0000000 & (nrg << zeros))) in WebRtcAgc_ProcessVad()
696 if (!(0xC0000000 & (nrg << zeros))) in WebRtcAgc_ProcessVad()
[all …]
Danalog_agc.c118 int32_t nrg, max_nrg, sample, tmp32; in WebRtcAgc_AddMic() local
204 nrg = in_mic[0][i * L + n] * in_mic[0][i * L + n]; in WebRtcAgc_AddMic()
205 if (nrg > max_nrg) in WebRtcAgc_AddMic()
207 max_nrg = nrg; in WebRtcAgc_AddMic()
293 uint32_t nrg; in WebRtcAgc_VirtualMic() local
321 nrg = (uint32_t)(in_near[0][sampleCntr] * in_near[0][sampleCntr]); in WebRtcAgc_VirtualMic()
322 frameNrg += nrg; in WebRtcAgc_VirtualMic()
/external/libopus/silk/fixed/x86/
Dburg_modified_FIX_sse4_1.c63 opus_int32 C0, num, nrg, rc_Q31, invGain_Q30, Atmp_QA, Atmp1, tmp1, tmp2, x1, x2; in silk_burg_modified_sse4_1() local
271nrg = silk_ADD32( CAb[ 0 ], CAf[ 0 ] ); /*… in silk_burg_modified_sse4_1()
281 nrg = silk_ADD_LSHIFT32( nrg, silk_SMMUL( silk_ADD32( CAb[ k + 1 ], CAf[ k + 1 ] ), in silk_burg_modified_sse4_1()
290 if( silk_abs( num ) < nrg ) { in silk_burg_modified_sse4_1()
291 rc_Q31 = silk_DIV32_varQ( num, nrg, 31 ); in silk_burg_modified_sse4_1()
366nrg = CAf[ 0 ]; /* Q( … in silk_burg_modified_sse4_1()
370nrg = silk_SMLAWW( nrg, CAf[ k + 1 ], Atmp1 ); /* Q( -rsh… in silk_burg_modified_sse4_1()
374 …*res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ), -tmp1 );/*… in silk_burg_modified_sse4_1()
/external/aac/libSBRenc/src/
Denv_est.cpp659 static FIXP_DBL mhLoweringEnergy(FIXP_DBL nrg, INT M) { in mhLoweringEnergy() argument
672 tmpScale = CountLeadingBits(nrg); in mhLoweringEnergy()
673 nrg <<= tmpScale; in mhLoweringEnergy()
674 nrg = fMult(nrg, FL2FXCONST_DBL(0.398107267f)); /* The maximum boost in mhLoweringEnergy()
680 nrg >>= tmpScale; in mhLoweringEnergy()
683 nrg >>= 1; in mhLoweringEnergy()
687 return nrg; in mhLoweringEnergy()
698 static FIXP_DBL nmhLoweringEnergy(FIXP_DBL nrg, const FIXP_DBL nrgSum, in nmhLoweringEnergy() argument
700 if (nrg > FL2FXCONST_DBL(0)) { in nmhLoweringEnergy()
703 FIXP_DBL gain = fMult(fDivNorm(nrgSum, nrg, &sc), GetInvInt(M + 1)); in nmhLoweringEnergy()
[all …]
Dinvf_est.cpp432 FIXP_DBL nrg; in decisionAlgorithm() local
450 nrg = in decisionAlgorithm()
477 regionNrg = findRegion(nrg, detectorParams->nrgBorders, numRegionsNrg); in decisionAlgorithm()
/external/libopus/src/
Dopus_demo.c240 double bits=0.0, bits_max=0.0, bits_act=0.0, bits2=0.0, nrg; in main() local
840 nrg = 0.0; in main()
842 nrg += in[ k ] * (double)in[ k ]; in main()
844 nrg /= frame_size * channels; in main()
845 if( nrg > 1e5 ) { in main()
/external/aac/libAACenc/src/
Daacenc_pns.cpp360 INT nrg = (-sfbEnergyLdData[sfb] + FL2FXCONST_DBL(0.5f / 64.0f)) >> in FDKaacEnc_CalcNoiseNrgs() local
362 noiseNrg[sfb] = tmp - nrg; in FDKaacEnc_CalcNoiseNrgs()
/external/aac/libFDK/include/
Dhuff_nodes.h218 SHORT nrg[63][2]; member
/external/webrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/
Dentropy_coding.c534 int32_t nrg; in WebRtcIsacfix_EncodeSpec() local
596 nrg = 0; in WebRtcIsacfix_EncodeSpec()
599 nrg += (ARCoefQ12[j] * ((CorrQ7_norm[j - n] * ARCoefQ12[n] + 256) >> 9) + in WebRtcIsacfix_EncodeSpec()
602 nrg += (ARCoefQ12[j] * ((CorrQ7_norm[n - j] * ARCoefQ12[n] + 256) >> 9) + in WebRtcIsacfix_EncodeSpec()
607 nrg >>= lft_shft; in WebRtcIsacfix_EncodeSpec()
609 nrg <<= -lft_shft; in WebRtcIsacfix_EncodeSpec()
611 if(nrg>131072) in WebRtcIsacfix_EncodeSpec()
612 …gain2_Q10 = WebRtcSpl_DivResultInQ31(FRAMESAMPLES >> 2, nrg); /* also shifts 31 bits to the left!… in WebRtcIsacfix_EncodeSpec()

12