Home
last modified time | relevance | path

Searched refs:DFRACT_BITS (Results 1 – 25 of 61) sorted by relevance

123

/external/aac/libFDK/src/
Dscale.cpp131 scalefactor = fixmin_I(scalefactor,(INT)(DFRACT_BITS-1)); in scaleValues()
144 INT negScalefactor = fixmin_I(-scalefactor,(INT)DFRACT_BITS-1); in scaleValues()
181 scalefactor = fixmin_I(scalefactor,(INT)DFRACT_BITS-1); in scaleValues()
194 INT negScalefactor = fixmin_I(-scalefactor,(INT)DFRACT_BITS-1); in scaleValues()
240 scalefactor = fixmin_I(scalefactor,(INT)DFRACT_BITS-1); in scaleValues()
253 INT negScalefactor = fixmin_I(-scalefactor,(INT)DFRACT_BITS-1); in scaleValues()
293 scalefactor = fixmin_I(scalefactor,(INT)DFRACT_BITS-1); in scaleValuesWithFactor()
307 INT negScalefactor = fixmin_I(-scalefactor,(INT)DFRACT_BITS-1); in scaleValuesWithFactor()
359 return fixmax_I((INT)0,(INT)(fixnormz_D((INT)maxVal) - (INT)1 - (INT)(DFRACT_BITS - SHORT_BITS))); in getScalefactorShort()
385 …return fixmax_I((INT)0,(INT)(fixnormz_D((INT)maxVal) - (INT)1 - (INT)(DFRACT_BITS - SAMPLE_BITS))); in getScalefactorPCM()
[all …]
Dfixpoint_math.cpp445 reg1 = invSqrtTab[ (INT)(val>>(DFRACT_BITS-1-(SQRT_BITS+1))) & SQRT_BITS_MASK ]; in invSqrtNorm2()
511 return (FIXP_DBL)(div << (DFRACT_BITS - count)); in schur_div()
582 if(res == (FIXP_DBL)(1<<(DFRACT_BITS-2)) && e == 1) in fDivNorm()
641 INT exp_bits = DFRACT_BITS-1 - exp_e; in f2Pow()
693 result_e = fixMin(DFRACT_BITS-1,fixMax(-(DFRACT_BITS-1),result_e)); in f2Pow()
768 return SATURATE_SHIFT(result_m, -result_e, DFRACT_BITS); in fLdPow()
830 *result_e = DFRACT_BITS-1; in fLog2()
866 enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e); in fLog2()
868 result_m = (result_m >> (enorm-1)) + ((FIXP_DBL)x_e << (DFRACT_BITS-1-enorm)); in fLog2()
DFDK_trigFcts.cpp205 if (stf > 0) q = q << (INT)fMin( stf,DFRACT_BITS-1); in fixp_atan2()
206 else q = q >> (INT)fMin(-stf,DFRACT_BITS-1); in fixp_atan2()
265 result = scaleValue(result, (Q_ATANOUT-Q_ATANINP+19-DFRACT_BITS+1) + res_e ); in fixp_atan()
282 result = scaleValue(result, (Q_ATANOUT-Q_ATANINP+18-DFRACT_BITS+1) + res_e ); in fixp_atan()
/external/aac/libAACenc/src/
Dquantize.cpp131 INT tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_quantizeLines()
136 accu >>= fixMin(totalShift,DFRACT_BITS-1); in FDKaacEnc_quantizeLines()
137 quaSpectrum[line] = (SHORT)(-((LONG)(k + accu) >> (DFRACT_BITS-1-16))); in FDKaacEnc_quantizeLines()
144 INT tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_quantizeLines()
149 accu >>= fixMin(totalShift,DFRACT_BITS-1); in FDKaacEnc_quantizeLines()
150 quaSpectrum[line] = (SHORT)((LONG)(k + accu) >> (DFRACT_BITS-1-16)); in FDKaacEnc_quantizeLines()
191 specExp = (DFRACT_BITS-1) - ex; in FDKaacEnc_invQuantizeLines()
195 tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_invQuantizeLines()
225 specExp = (DFRACT_BITS-1) - ex; in FDKaacEnc_invQuantizeLines()
229 tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_invQuantizeLines()
[all …]
Dpsy_configuration.cpp363 mask_factor = fPow(ten_fix, DFRACT_BITS-1-ten_e, -dbVal_fix, DFRACT_BITS-1-dbVal_e, &q_msk); in getMaskFactor()
364 q_msk = fixMin(DFRACT_BITS-1,fixMax(-(DFRACT_BITS-1),q_msk)); in getMaskFactor()
487 qbfac = DFRACT_BITS-1-qbfac; in FDKaacEnc_initMinSnr()
490 qperwin = DFRACT_BITS-1-qperwin; in FDKaacEnc_initMinSnr()
491 …indow = fMult(pePerWindow, BITS2PEFAC); qperwin = qperwin + 30 - (DFRACT_BITS-1); in FDKaacEnc_initMinSnr()
492 …indow = fMult(pePerWindow, PERS2P4); qperwin = qperwin + 36 - (DFRACT_BITS-1); in FDKaacEnc_initMinSnr()
514 qperwin = qperwin + 30 - (DFRACT_BITS-1); in FDKaacEnc_initMinSnr()
516 …fDivNorm(pePerWindow, barcFactor, &qdiv); qpeprt_const = qperwin - qbfac + DFRACT_BITS-1-qdiv; in FDKaacEnc_initMinSnr()
524 pePart = fMult(pePart_const, barcWidth); qpeprt = qpeprt_const + 25 - (DFRACT_BITS-1); in FDKaacEnc_initMinSnr()
528 pePart = fDivNorm(pePart, sfbWidth, &qdiv); qpeprt += DFRACT_BITS-1-qdiv; in FDKaacEnc_initMinSnr()
[all …]
Dband_nrg.cpp115 sfbMaxScaleSpec[i] = (maxSpc==(FIXP_DBL)0) ? (DFRACT_BITS-2) : CntLeadingZeros(maxSpc)-1; in FDKaacEnc_CalcSfbMaxScaleSpec()
163 scale = fixMax(2*(minSpecShift-scale),-(DFRACT_BITS-1)); in FDKaacEnc_CheckBandEnergyOptim()
223 INT scale = fixMin((sfbMaxScaleSpec[i]-4)<<1,(DFRACT_BITS-1)); in FDKaacEnc_CalcBandEnergyOptimLong()
237 INT scale = fixMin( ((sfbMaxScaleSpec[i]-4)+shiftBits)<<1, (DFRACT_BITS-1)); in FDKaacEnc_CalcBandEnergyOptimLong()
276 scale = fixMax(fixMin(scale,(DFRACT_BITS-1)),-(DFRACT_BITS-1)); in FDKaacEnc_CalcBandEnergyOptimShort()
355 scale = fixMin(scale, (DFRACT_BITS-1)); in FDKaacEnc_CalcBandNrgMSOpt()
Dchaosmeasure.cpp112 left = (FIXP_DBL)((LONG)paMDCTDataNM0[i]^((LONG)paMDCTDataNM0[i]>>(DFRACT_BITS-1))); in FDKaacEnc_FDKaacEnc_CalculateChaosMeasurePeakFast()
113 center = (FIXP_DBL)((LONG)paMDCTDataNM0[i+2]^((LONG)paMDCTDataNM0[i+2]>>(DFRACT_BITS-1))); in FDKaacEnc_FDKaacEnc_CalculateChaosMeasurePeakFast()
116 … FIXP_DBL right = (FIXP_DBL)((LONG)paMDCTDataNM0[j+2]^((LONG)paMDCTDataNM0[j+2]>>(DFRACT_BITS-1))); in FDKaacEnc_FDKaacEnc_CalculateChaosMeasurePeakFast()
Dintensity.cpp187 sfbMaxScale = (maxSpc==FL2FXCONST_DBL(0.0)) ? (DFRACT_BITS-2) : CntLeadingZeros(maxSpc)-1; in calcSfbMaxScale()
317 invOverallLoudnessSF = fixMin(fixMax(invOverallLoudnessSF,-(DFRACT_BITS-1)),DFRACT_BITS-1); in FDKaacEnc_prepareIntensityDecision()
388 … channelCorrSF = fixMin(fixMax(( channelCorrSF + ((sL+sR)>>1)),-(DFRACT_BITS-1)),DFRACT_BITS-1); in FDKaacEnc_prepareIntensityDecision()
690 s2 = fixMin(fixMax(s2,-(DFRACT_BITS-1)),(DFRACT_BITS-1)); in FDKaacEnc_IntensityStereoProcessing()
724 s2 = fixMin(fixMax(s2,-(DFRACT_BITS-1)),(DFRACT_BITS-1)); in FDKaacEnc_IntensityStereoProcessing()
744 …offs]>>1)-FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT+1))))>>(DFRACT_BITS-1-REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
747 …offs]>>1)+FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT+1))))>>(DFRACT_BITS-1-REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
Dtransform.cpp177 #if SAMPLE_BITS == DFRACT_BITS /* SPC_BITS and DFRACT_BITS should be equal. */ in FDKaacEnc_Transform_Real()
180 mdctData[(tl/2)+i] = - (FIXP_DBL) timeData[tl-i-1] << (DFRACT_BITS - SAMPLE_BITS - 1); in FDKaacEnc_Transform_Real()
194 #if SAMPLE_BITS == DFRACT_BITS /* This should be SPC_BITS instead of DFRACT_BITS. */ in FDKaacEnc_Transform_Real()
197 mdctData[(tl/2)-1-i] = - (FIXP_DBL) timeData[tl+i] << (DFRACT_BITS - SAMPLE_BITS - 1); in FDKaacEnc_Transform_Real()
Dmetadata_compressor.cpp109 #define METADATA_FRACT_BITS (DFRACT_BITS-1-METADATA_INT_BITS)
379 *pQ2 = (*pValue2!=(FIXP_DBL)0) ? resultScale : DFRACT_BITS-1; in fixpAdd()
404 sampleRateFract = (FIXP_DBL)(sampleRate<<(DFRACT_BITS-1-METADATA_LINT_BITS)); in tc2Coeff()
405 blockLengthFract = (FIXP_DBL)(blockLength<<(DFRACT_BITS-1-METADATA_LINT_BITS)); in tc2Coeff()
421 result = f2Pow(-exponent, DFRACT_BITS-1-METADATA_FRACT_BITS, &e_res); in tc2Coeff()
669 int level_e = DFRACT_BITS-1; in FDK_DRC_Generator_Calc()
761 …_b) + (FIXP_DBL)((level_e-12)<<(DFRACT_BITS-1-LD_DATA_SHIFT)) - CalcLdData((FIXP_DBL)(drcComp->blo… in FDK_DRC_Generator_Calc()
972 …FIXP_DBL ld_peak = CalcLdData(peak[i]) + (FIXP_DBL)((LONG)DOWNMIX_SHIFT<<(DFRACT_BITS-1-LD_DATA_SH… in FDK_DRC_Generator_Calc()
/external/aac/libSBRdec/src/
Dtranscendent.h141 shiftAbs = (shiftAbs < DFRACT_BITS-1)? shiftAbs : DFRACT_BITS-1; in FDK_add_MantExp()
179 shiftAbs = (shiftAbs < DFRACT_BITS-1)? shiftAbs : DFRACT_BITS-1; in FDK_add_MantExp()
293 shift = (DFRACT_BITS - 2 - INV_TABLE_BITS - preShift); in FDK_divide_MantExp()
348 *mantissa = (shift>=0) ? result << (INT)fixMin(DFRACT_BITS-1,shift) in FDK_sqrt_MantExp()
349 : result >> (INT)fixMin(DFRACT_BITS-1,-shift); in FDK_sqrt_MantExp()
Denv_calc.cpp898 int shift = fixMin(DFRACT_BITS-1,(int)(h_sbr_cal_env->filtBufferNoise_e - noise_e)); in calculateSbrEnvelope()
903 int shift = fixMin(DFRACT_BITS-1,-(int)(h_sbr_cal_env->filtBufferNoise_e - noise_e)); in calculateSbrEnvelope()
912 scale_change = -(DFRACT_BITS-1); in calculateSbrEnvelope()
951 shift = fixMin(DFRACT_BITS-1,shift); in calculateSbrEnvelope()
962 shift = fixMin(DFRACT_BITS-1,-shift); in calculateSbrEnvelope()
1232 diff = fixMin(-(reserve + diff),DFRACT_BITS-1); in equalizeFiltBufferExp()
1309 maxVal |= (FIXP_DBL)((LONG)(tmp1)^((LONG)tmp1>>(DFRACT_BITS-1))); in maxSubbandSample()
1310 maxVal |= (FIXP_DBL)((LONG)(tmp2)^((LONG)tmp2>>(DFRACT_BITS-1))); in maxSubbandSample()
1321 maxVal |= (FIXP_DBL)((LONG)(tmp)^((LONG)tmp>>(DFRACT_BITS-1))); in maxSubbandSample()
1385 maxVal |= (FIXP_DBL)((LONG)(bufferImag[l])^((LONG)bufferImag[l]>>(DFRACT_BITS-1))); in calcNrgPerSubband()
[all …]
Dlpp_tran.cpp197 #define ACDET_EXP (2*(DFRACT_BITS+sbrScaleFactor->lb_scale+10-ac.det_scale))
328 int dynamicScale = DFRACT_BITS-1-LPC_SCALE_FACTOR; in lppTransposer()
652 int descale = fixMin(DFRACT_BITS-1, (LPC_SCALE_FACTOR+dynamicScale)); in lppTransposer()
659 int descale = fixMin(DFRACT_BITS-1, (LPC_SCALE_FACTOR+dynamicScale)); in lppTransposer()
668 int descale = fixMin(DFRACT_BITS-1, (LPC_SCALE_FACTOR+dynamicScale)); in lppTransposer()
690 int descale = fixMin(DFRACT_BITS-1, (LPC_SCALE_FACTOR+dynamicScale)); in lppTransposer()
/external/aac/libFDK/include/arm/
Dscale.h144 …( (((LONG)(src) ^ ((LONG)(src) >> (DFRACT_BITS-1)))>>(scale)) > (LONG)(((1U)<<((dBits)-1))-1)) …
145 … ? ((LONG)(src) >> (DFRACT_BITS-1)) ^ (LONG)(((1U)<<((dBits)-1))-1) \
149 …( ((LONG)(src) ^ ((LONG)(src) >> (DFRACT_BITS-1))) > ((LONG)(((1U)<<((dBits)-1))-1) >> (scale)) ) …
150 … ? ((LONG)(src) >> (DFRACT_BITS-1)) ^ (LONG)(((1U)<<((dBits)-1))-1) \
/external/aac/libFDK/include/
DFDK_trigFcts.h111 #define ATI_SF ((DFRACT_BITS-1)-Q_ATANINP) // 6
113 #define ATO_SF ((DFRACT_BITS-1)-Q_ATANOUT) // 1 ] -pi/2 .. pi/2 [
117 #define AT2O_SF ((DFRACT_BITS-1)-Q_ATAN2OUT) // 2 ] -pi .. pi ]
194 *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS-FRACT_BITS)); in fixp_sin_cos_residual_inline()
195 *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS-FRACT_BITS)); in fixp_sin_cos_residual_inline()
Dcommon_fix.h105 #define DFRACT_BITS 32 /* double precision */ macro
110 #if (SAMPLE_BITS == DFRACT_BITS)
119 #error SAMPLE_BITS different from FRACT_BITS or DFRACT_BITS not implemented!
128 #define MAX_SHIFT_DBL (DFRACT_BITS-1) /* maximum possible shift for FIXP_DBL values */
132 #define DFRACT_FIX_SCALE ((INT64(1)<<(DFRACT_BITS-1)))
141 #define FX_DBL2FXCONST_SGL(val) ( ( ((((val) >> (DFRACT_BITS-FRACT_BITS-1)) + 1) > (((LONG)1<<FRACT…
142 …(FIXP_SGL)(SHORT)(((LONG)1<<(FRACT_BITS-1))-1):(FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS-FRACT_BIT…
174 #define FX_ACC2FX_DBL(val) ((FIXP_DBL)((val)>>(ACCU_BITS-DFRACT_BITS)))
176 #define FX_SGL2FX_DBL(val) ((FIXP_DBL)((LONG)(val)<<(DFRACT_BITS-FRACT_BITS)))
177 #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val)>>(DFRACT_BITS-FRACT_BITS)))
Dfixpoint_math.h109 return (b_m >> fMin(a_e-b_e, DFRACT_BITS-1) > a_m); in fIsLessThan()
111 return (a_m >> fMin(b_e-a_e, DFRACT_BITS-1) < b_m); in fIsLessThan()
239 return result << (DFRACT_BITS-16); in schur_div()
248 FDK_ASSERT (count<=DFRACT_BITS-1); in schur_div()
262 return result << (DFRACT_BITS-count); in schur_div()
Dmdct.h99 #define MDCT_OUTPUT_SCALE (DFRACT_BITS-SAMPLE_BITS-MDCT_OUT_HEADROOM)
103 #if (SAMPLE_BITS == DFRACT_BITS)
Dqmf.h111 #define QFRACT_BITS DFRACT_BITS
124 #define QSS_BITS DFRACT_BITS
/external/aac/libFDK/include/mips/
Dscale.h105 (__builtin_mips_shll_s_w((src)>>scale,(DFRACT_BITS-(dBits)))>>(DFRACT_BITS-(dBits)))
/external/aac/libSBRenc/src/
Dtran_det.cpp162 prevEnergies_e_diff = fMin(prevEnergies_e_diff, DFRACT_BITS-1); in spectralChange()
163 newEnergies_e_diff = fMin(newEnergies_e_diff, DFRACT_BITS-1); in spectralChange()
179 accu1_init = fMult(accu1_init, (FIXP_DBL)len1<<((DFRACT_BITS-1)-NRG_SHIFT-1))<<1; in spectralChange()
180 accu2_init = fMult(accu2_init, (FIXP_DBL)len2<<((DFRACT_BITS-1)-NRG_SHIFT-1))<<1; in spectralChange()
331 …if ((scaleEnergies[0]-scale[0]) > (DFRACT_BITS-1) || (scaleEnergies[1]-scale[0]) > (DFRACT_BITS-1)) in addHighbandEnergies()
483 scaleFactor0 = fixMin((scaleEnergies[0]-commonScale), (DFRACT_BITS-1)); in calculateThresholds()
484 scaleFactor1 = fixMin((scaleEnergies[1]-commonScale), (DFRACT_BITS-1)); in calculateThresholds()
529 temp = ( commonScale<=(DFRACT_BITS-1) ) in calculateThresholds()
838 myExp = scaleValueSaturate(myExp, e+0+DFRACT_BITS-1-EXP_E); in FDKsbrEnc_InitSbrFastTransientDetector()
881 dBf_e = (DFRACT_BITS-1 - tmp) - CountLeadingBits(dBf_int); in FDKsbrEnc_InitSbrFastTransientDetector()
[all …]
Dresampler.cpp382 input = ((FIXP_DBL)pInput[n*inStride]) << (DFRACT_BITS-SAMPLE_BITS-BIQUAD_SCALE); in AdvanceFilter()
448 …tes[i][s2] = (FIXP_BQS)(LONG)((state0 + (FIXP_DBL)(1<<(DFRACT_BITS-FRACT_BITS-2))) >> (DFRACT_BITS in AdvanceFilter()
466 …= (INT_PCM) SATURATE_RIGHT_SHIFT(y+(FIXP_DBL)(1<<(DFRACT_BITS-SAMPLE_BITS-BIQUAD_SCALE-1)), DFRACT…
Denv_est.cpp241 scale = DFRACT_BITS; in FDKsbrEnc_getEnergyFromCplxQmfData()
247 if (scale >= DFRACT_BITS-1) { in FDKsbrEnc_getEnergyFromCplxQmfData()
334 scale = DFRACT_BITS; in FDKsbrEnc_getEnergyFromCplxQmfDataFull()
340 if (scale >= DFRACT_BITS-1) { in FDKsbrEnc_getEnergyFromCplxQmfDataFull()
467 tmp = ((((INT)NoiseLevels[i])>>(DFRACT_BITS-1-LD_DATA_SHIFT)) ); /* conversion to integer */ in sbrNoiseFloorLevelsQuantisation()
512 …temp1 = temp1 << (DFRACT_BITS-1-LD_DATA_SHIFT-1); /* INT to fract conversion of result, if input … in coupleNoiseFloor()
520 …temp2 = temp2 << (DFRACT_BITS-1-LD_DATA_SHIFT-1); /* INT to fract conversion of result, if input … in coupleNoiseFloor()
572 if(ui-li==0) dynScale = DFRACT_BITS-1; in getEnvSfbEnergy()
574 dynScale = CalcLdInt(ui-li)>>(DFRACT_BITS-1-LD_DATA_SHIFT); in getEnvSfbEnergy()
594 nrgSum += ( accu1 >> fixMin((scaleNrg0-sc0-dynScale1),(DFRACT_BITS-1)) ) in getEnvSfbEnergy()
[all …]
Dsbr_misc.cpp256 if ( denom > (tmp >> fixMin(shiftNum+shiftScale-1,(DFRACT_BITS-1))) ) { in FDKsbrEnc_LSI_divide_scale_fract()
259 shiftCommon = fixMin((shiftNum-shiftDenom+shiftScale-1),(DFRACT_BITS-1)); in FDKsbrEnc_LSI_divide_scale_fract()
Dcode_env.cpp450 tmp1 = FL2FXCONST_DBL(0.5f) >> (DFRACT_BITS-16-1); in FDKsbrEnc_codeEnvelope()
451 tmp2 = h_sbrCodeEnvelope->dF_edge_1stEnv >> (DFRACT_BITS-16); in FDKsbrEnc_codeEnvelope()
452 …NT)(LONG)h_sbrCodeEnvelope->dF_edge_incr*h_sbrCodeEnvelope->dF_edge_incr_fac) >> (DFRACT_BITS-16)); in FDKsbrEnc_codeEnvelope()
587 tmp_bits = (((delta_T_bits * dF_edge_1stEnv) >> (DFRACT_BITS-18)) + (FIXP_DBL)1) >> 1; in FDKsbrEnc_codeEnvelope()

123