Home
last modified time | relevance | path

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

12

/external/libopus/silk/
Dsum_sqr_shift.c44 opus_int32 nrg_tmp, nrg; in silk_sum_sqr_shift() local
46 nrg = 0; in silk_sum_sqr_shift()
50 nrg = silk_SMLABB_ovflw( nrg, x[ i ], x[ i ] ); in silk_sum_sqr_shift()
51 nrg = silk_SMLABB_ovflw( nrg, x[ i + 1 ], x[ i + 1 ] ); in silk_sum_sqr_shift()
52 if( nrg < 0 ) { in silk_sum_sqr_shift()
54 nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 ); in silk_sum_sqr_shift()
63 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, (opus_uint32)nrg_tmp, shft ); in silk_sum_sqr_shift()
64 if( nrg < 0 ) { in silk_sum_sqr_shift()
66 nrg = (opus_int32)silk_RSHIFT_uint( (opus_uint32)nrg, 2 ); in silk_sum_sqr_shift()
73 nrg = (opus_int32)silk_ADD_RSHIFT_uint( nrg, nrg_tmp, shft ); in silk_sum_sqr_shift()
[all …]
DVAD.c310 opus_int32 nl, nrg, inv_nrg; in silk_VAD_GetNoiseLevels() local
326 nrg = silk_ADD_POS_SAT32( pX[ k ], psSilk_VAD->NoiseLevelBias[ k ] ); in silk_VAD_GetNoiseLevels()
327 silk_assert( nrg > 0 ); in silk_VAD_GetNoiseLevels()
330 inv_nrg = silk_DIV32( silk_int32_MAX, nrg ); in silk_VAD_GetNoiseLevels()
334 if( nrg > silk_LSHIFT( nl, 3 ) ) { in silk_VAD_GetNoiseLevels()
336 } else if( nrg < nl ) { in silk_VAD_GetNoiseLevels()
/external/libopus/silk/float/
Dlevinsondurbin_FLP.c42 silk_float min_nrg, nrg, t, km, Atmp1, Atmp2; in silk_levinsondurbin_FLP() local
45 nrg = corr[ 0 ]; in silk_levinsondurbin_FLP()
46 nrg = silk_max_float(min_nrg, nrg); in silk_levinsondurbin_FLP()
47 A[ 0 ] = corr[ 1 ] / nrg; in silk_levinsondurbin_FLP()
48 nrg -= A[ 0 ] * corr[ 1 ]; in silk_levinsondurbin_FLP()
49 nrg = silk_max_float(min_nrg, nrg); in silk_levinsondurbin_FLP()
59 km = t / nrg; in silk_levinsondurbin_FLP()
62 nrg -= km * t; in silk_levinsondurbin_FLP()
63 nrg = silk_max_float(min_nrg, nrg); in silk_levinsondurbin_FLP()
79 return nrg; in silk_levinsondurbin_FLP()
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()
Dfind_LTP_FLP.c51 silk_float w[ MAX_NB_SUBFR ], nrg[ MAX_NB_SUBFR ], regu; in silk_find_LTP_FLP() local
73 nrg[ k ] = silk_residual_energy_covar_FLP( b_ptr, WLTP_ptr, Rr, rr[ k ], LTP_ORDER ); in silk_find_LTP_FLP()
75 temp = Wght[ k ] / ( nrg[ k ] * Wght[ k ] + 0.01f * subfr_length ); in silk_find_LTP_FLP()
90 LPC_LTP_res_nrg += nrg[ k ] * Wght[ k ]; in silk_find_LTP_FLP()
Dnoise_shape_analysis_FLP.c138 silk_float nrg, pre_nrg, log_energy, log_energy_prev, energy_variation; in silk_noise_shape_analysis_FLP() local
187 nrg = ( silk_float )nSamples + ( silk_float )silk_energy_FLP( pitch_res_ptr, nSamples ); in silk_noise_shape_analysis_FLP()
188 log_energy = silk_log2( nrg ); in silk_noise_shape_analysis_FLP()
258nrg = silk_levinsondurbin_FLP( &psEncCtrl->AR2[ k * MAX_SHAPE_LPC_ORDER ], auto_corr, psEnc->sCmn.… in silk_noise_shape_analysis_FLP()
259 psEncCtrl->Gains[ k ] = ( silk_float )sqrt( nrg ); in silk_noise_shape_analysis_FLP()
280nrg = silk_LPC_inverse_pred_gain_FLP( &psEncCtrl->AR1[ k * MAX_SHAPE_LPC_ORDER ], psEnc->sCmn.… in silk_noise_shape_analysis_FLP()
281 psEncCtrl->GainsPre[ k ] = 1.0f - 0.7f * ( 1.0f - pre_nrg / nrg ); in silk_noise_shape_analysis_FLP()
/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 …]
Dentropy_coding.c403 int32_t nrg, res; in WebRtcIsac_EncodeSpec() local
528 nrg = 0; in WebRtcIsac_EncodeSpec()
531 nrg += (ARCoefQ12[j] * ((CorrQ7_norm[j - n] * ARCoefQ12[n] + 256) >> 9) + in WebRtcIsac_EncodeSpec()
535 nrg += (ARCoefQ12[j] * ((CorrQ7_norm[n - j] * ARCoefQ12[n] + 256) >> 9) + in WebRtcIsac_EncodeSpec()
540 nrg_u32 = (uint32_t)nrg; in WebRtcIsac_EncodeSpec()
547 nrg = 0x7FFFFFFF; in WebRtcIsac_EncodeSpec()
549 nrg = (int32_t)nrg_u32; in WebRtcIsac_EncodeSpec()
552 gain2_Q10 = WebRtcSpl_DivResultInQ31(FRAMESAMPLES_QUARTER, nrg); in WebRtcIsac_EncodeSpec()
/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()
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.c160 opus_int32 nrg, pre_nrg_Q30, log_energy_Q7, log_energy_prev_Q7, energy_variation_Q7; in silk_noise_shape_analysis_FIX() local
220 silk_sum_sqr_shift( &nrg, &scale, pitch_res_ptr, nSamples ); in silk_noise_shape_analysis_FIX()
221 nrg += silk_RSHIFT( nSamples, scale ); /* Q(-scale)*/ in silk_noise_shape_analysis_FIX()
223 log_energy_Q7 = silk_lin2log( nrg ); in silk_noise_shape_analysis_FIX()
298 nrg = silk_schur64( refl_coef_Q16, auto_corr, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FIX()
299 silk_assert( nrg >= 0 ); in silk_noise_shape_analysis_FIX()
311 nrg >>= 1; in silk_noise_shape_analysis_FIX()
314 tmp32 = silk_SQRT_APPROX( nrg ); in silk_noise_shape_analysis_FIX()
342 nrg = silk_LPC_inverse_pred_gain_Q24( AR1_Q24, psEnc->sCmn.shapingLPCOrder ); in silk_noise_shape_analysis_FIX()
346 …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()
Dfind_LTP_FIX.c63 …opus_int32 b_Q16[ LTP_ORDER ], delta_b_Q14[ LTP_ORDER ], d_Q14[ MAX_NB_SUBFR ], nrg[ MAX_NB_SUBFR … in silk_find_LTP_FIX() local
109nrg[ k ] = silk_residual_energy16_covar_FIX( b_Q14_ptr, WLTP_ptr, Rr, rr[ k ], LTP_ORDER, 14 ); /*… in silk_find_LTP_FIX()
113 …denom32 = silk_LSHIFT_SAT32( silk_SMULWB( nrg[ k ], Wght_Q15[ k ] ), 1 + extra_shifts ) + /* Q( -c… in silk_find_LTP_FIX()
153 …s_nrg = silk_ADD32( LPC_LTP_res_nrg, silk_RSHIFT( silk_ADD32( silk_SMULWB( nrg[ k ], Wght_Q15[ k ]… in silk_find_LTP_FIX()
/external/lisa/libs/utils/
Dresults.py175 nrg = json.load(infile)
177 if 'LITTLE' in nrg:
178 self.little = float(nrg['LITTLE'])
179 if 'big' in nrg:
180 self.big = float(nrg['big'])
232 self.nrg = None
243 self.nrg = Energy(nrg_file)
244 self.little_nrg = self.nrg.little
245 self.total_nrg = self.nrg.total
246 self.big_nrg = self.nrg.big
[all …]
Denergy.py211 nrg = self.sample()
215 if site not in nrg:
218 channel, nrg.keys()))
219 nrg_total = nrg[site]['total']
474 nrg = {}
477 nrg[key] = float(val)
478 channels_stats[channel] = nrg
481 self._log.debug(nrg)
488 channels_nrg['{}'.format(channel)] = nrg['energy']
/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 ); 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/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_sse.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.cpp609 mhLoweringEnergy(FIXP_DBL nrg, INT M) in mhLoweringEnergy() argument
622 tmpScale = CountLeadingBits(nrg); in mhLoweringEnergy()
623 nrg <<= tmpScale; in mhLoweringEnergy()
624nrg = fMult(nrg, FL2FXCONST_DBL(0.398107267f)); /* The maximum boost is 1.584893, so the maximum a… in mhLoweringEnergy()
625 nrg >>= tmpScale; in mhLoweringEnergy()
629 nrg >>= 1; in mhLoweringEnergy()
633 return nrg; in mhLoweringEnergy()
645 FIXP_DBL nrg, in nmhLoweringEnergy() argument
651 if (nrg>FL2FXCONST_DBL(0)) { in nmhLoweringEnergy()
654 FIXP_DBL gain = fMult(fDivNorm(nrgSum, nrg, &sc), GetInvInt(M+1)); in nmhLoweringEnergy()
[all …]
Dinvf_est.cpp368 FIXP_DBL nrg; in decisionAlgorithm() local
374nrg = (fMultDiv2(FL2FXCONST_DBL(2.f*0.375f), (FIXP_DBL)(CalcLdData(detectorValues->a… in decisionAlgorithm()
391 regionNrg = findRegion(nrg,nrgBorders,numRegionsNrg); in decisionAlgorithm()
/external/aac/libSBRdec/src/
Dpsdec.cpp595 FIXP_DBL peakDiff, nrg, transRatio; in deCorrelateSlotBased() local
687nrg = h_ps_d->specificTo.mpeg.aPrevNrgBin[bin] + fMult( INT_FILTER_COEFF, aaPowerSlot[bin] - h_ps_… in deCorrelateSlotBased()
691 nrg = fixMax(nrg,FL2FXCONST_DBL(0.f)); in deCorrelateSlotBased()
694 h_ps_d->specificTo.mpeg.aPrevNrgBin[bin] = nrg; in deCorrelateSlotBased()
696 nrg = fMult( nrg, TRANSIENT_IMPACT_FACTOR ); in deCorrelateSlotBased()
699 if ( peakDiff <= nrg || peakDiff == FL2FXCONST_DBL(0.0) ) { in deCorrelateSlotBased()
702 else if ( nrg <= FL2FXCONST_DBL(0.0f) ) { in deCorrelateSlotBased()
708 aaTransRatioSlot[bin] = schur_div( nrg<<scale_left, peakDiff<<scale_left, 16); in deCorrelateSlotBased()
/external/libopus/src/
Dopus_demo.c245 double bits=0.0, bits_max=0.0, bits_act=0.0, bits2=0.0, nrg; in main() local
845 nrg = 0.0; in main()
847 nrg += in[ k ] * (double)in[ k ]; in main()
849 nrg /= frame_size * channels; in main()
850 if( nrg > 1e5 ) { in main()
/external/lisa/ipynb/examples/utils/
Dtestenv_example.ipynb794 "nrg = te.emeter.sample()\n",
795 "nrg = json.dumps(te.emeter.sample(), indent=4)\n",
796 "print \"First read: \", nrg\n",
798 "nrg = te.emeter.sample()\n",
799 "nrg = json.dumps(te.emeter.sample(), indent=4)\n",
800 "print \"Second read: \", nrg"
/external/aac/libAACenc/src/
Daacenc_pns.cpp404 INT nrg = (-sfbEnergyLdData[sfb]+FL2FXCONST_DBL(0.5f/64.0f))>>(DFRACT_BITS-1-7); in FDKaacEnc_CalcNoiseNrgs() local
405 noiseNrg[sfb] = tmp - nrg; in FDKaacEnc_CalcNoiseNrgs()
/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