Home
last modified time | relevance | path

Searched refs:DFRACT_BITS (Results 1 – 25 of 59) 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.cpp259 …result_e = fixMin(fixMax(result_e+1-(DFRACT_BITS-1), -(DFRACT_BITS-1)), (DFRACT_BITS-1)); /* round… in CalcInvLdData()
403 reg1 = invSqrtTab[ (INT)(val>>(DFRACT_BITS-1-(SQRT_BITS+1))) & SQRT_BITS_MASK ]; in invSqrtNorm2()
469 return (FIXP_DBL)(div << (DFRACT_BITS - count)); in schur_div()
540 if(res == (FIXP_DBL)(1<<(DFRACT_BITS-2)) && e == 1) in fDivNorm()
599 INT exp_bits = DFRACT_BITS-1 - exp_e; in f2Pow()
651 result_e = fixMin(DFRACT_BITS-1,fixMax(-(DFRACT_BITS-1),result_e)); in f2Pow()
726 return SATURATE_SHIFT(result_m, -result_e, DFRACT_BITS); in fLdPow()
788 *result_e = DFRACT_BITS-1; in fLog2()
824 enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e); in fLog2()
826 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.cpp125 INT tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_quantizeLines()
131 quaSpectrum[line] = (SHORT)(-((LONG)(k + accu) >> (DFRACT_BITS-1-16))); in FDKaacEnc_quantizeLines()
138 INT tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_quantizeLines()
144 quaSpectrum[line] = (SHORT)((LONG)(k + accu) >> (DFRACT_BITS-1-16)); in FDKaacEnc_quantizeLines()
185 specExp = (DFRACT_BITS-1) - ex; in FDKaacEnc_invQuantizeLines()
189 tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_invQuantizeLines()
219 specExp = (DFRACT_BITS-1) - ex; in FDKaacEnc_invQuantizeLines()
223 tabIndex = (INT)(accu>>(DFRACT_BITS-2-MANT_DIGITS))&(~MANT_SIZE); in FDKaacEnc_invQuantizeLines()
328 scale = fixMin(2*(scale-1), DFRACT_BITS-1); in FDKaacEnc_calcSfbDist()
385 scale = fixMin(2*(scale-1), DFRACT_BITS-1); in FDKaacEnc_calcSfbQuantEnergyAndDist()
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()
389 … channelCorrSF = fixMin(fixMax(( channelCorrSF + ((sL+sR)>>1)),-(DFRACT_BITS-1)),DFRACT_BITS-1); in FDKaacEnc_prepareIntensityDecision()
682 s2 = fixMin(fixMax(s2,-(DFRACT_BITS-1)),(DFRACT_BITS-1)); in FDKaacEnc_IntensityStereoProcessing()
716 s2 = fixMin(fixMax(s2,-(DFRACT_BITS-1)),(DFRACT_BITS-1)); in FDKaacEnc_IntensityStereoProcessing()
736 …offs]>>1)-FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT+1))))>>(DFRACT_BITS-1-REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
739 …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()
658 int level_e = DFRACT_BITS-1; in FDK_DRC_Generator_Calc()
750 …_b) + (FIXP_DBL)((level_e-12)<<(DFRACT_BITS-1-LD_DATA_SHIFT)) - CalcLdData((FIXP_DBL)(drcComp->blo… in FDK_DRC_Generator_Calc()
961 …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.cpp889 int shift = fixMin(DFRACT_BITS-1,(int)(h_sbr_cal_env->filtBufferNoise_e - noise_e)); in calculateSbrEnvelope()
894 int shift = fixMin(DFRACT_BITS-1,-(int)(h_sbr_cal_env->filtBufferNoise_e - noise_e)); in calculateSbrEnvelope()
903 scale_change = -(DFRACT_BITS-1); in calculateSbrEnvelope()
942 shift = fixMin(DFRACT_BITS-1,shift); in calculateSbrEnvelope()
953 shift = fixMin(DFRACT_BITS-1,-shift); in calculateSbrEnvelope()
1212 diff = fixMin(-(reserve + diff),DFRACT_BITS-1); in equalizeFiltBufferExp()
1289 maxVal |= (FIXP_DBL)((LONG)(tmp1)^((LONG)tmp1>>(DFRACT_BITS-1))); in maxSubbandSample()
1290 maxVal |= (FIXP_DBL)((LONG)(tmp2)^((LONG)tmp2>>(DFRACT_BITS-1))); in maxSubbandSample()
1301 maxVal |= (FIXP_DBL)((LONG)(tmp)^((LONG)tmp>>(DFRACT_BITS-1))); in maxSubbandSample()
1365 maxVal |= (FIXP_DBL)((LONG)(bufferImag[l])^((LONG)bufferImag[l]>>(DFRACT_BITS-1))); in calcNrgPerSubband()
[all …]
/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)))
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
Dfixpoint_math.h210 return result << (DFRACT_BITS-16); in schur_div()
219 FDK_ASSERT (count<=DFRACT_BITS-1); in schur_div()
233 return result << (DFRACT_BITS-count); in schur_div()
/external/aac/libPCMutils/src/
Dpcmutils_lib.cpp894 …(INT_PCM)SATURATE_RIGHT_SHIFT(fMult((FIXP_PCM)*pInLF, flev), DFRACT_BITS-SAMPLE_BITS, SAMPLE_BITS); in pcmDmx_ApplyFrame()
904 …(INT_PCM)SATURATE_RIGHT_SHIFT(fMult((FIXP_PCM)*pInRF, flev), DFRACT_BITS-SAMPLE_BITS, SAMPLE_BITS); in pcmDmx_ApplyFrame()
937 …INT_PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInLF)>>1)+tCF, DFRACT_BITS-SAMPLE_BITS-1, … in pcmDmx_ApplyFrame()
939 …INT_PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInRF)>>1)+tCF, DFRACT_BITS-SAMPLE_BITS-1, … in pcmDmx_ApplyFrame()
965 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInLF)>>2)+tCF-tLR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
967 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInRF)>>2)+tCF+tLR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
985 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInLF)>>2)+tCF-tLR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
987 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInRF)>>2)+tCF+tLR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
1014 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInLF)>>2)+tCF+tLR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
1016 …PCM)SATURATE_RIGHT_SHIFT((FX_PCM2FX_DBL((FIXP_PCM)*pInRF)>>2)+tCF+tRR, DFRACT_BITS-SAMPLE_BITS-2, … in pcmDmx_ApplyFrame()
[all …]
/external/aac/libFDK/include/mips/
Dscale.h105 (__builtin_mips_shll_s_w((src)>>scale,(DFRACT_BITS-(dBits)))>>(DFRACT_BITS-(dBits)))
/external/aac/libSBRenc/src/
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…
Dtran_det.cpp164 … (FIXP_DBL)MAXVAL_DBL >> fixMin(scaleEnergies[0],(DFRACT_BITS-1)) ); in spectralChange()
208 nrgTotal = ( (accu1 >> fixMin(scaleEnergies[0],(DFRACT_BITS-1))) in addLowbandEnergies()
209 + (accu2 >> fixMin(scaleEnergies[1],(DFRACT_BITS-1))) ) << (2); in addLowbandEnergies()
267 if ((scaleEnergies[0]-1) > (DFRACT_BITS-1) ) in addHighbandEnergies()
393 scaleFactor0 = fixMin((scaleEnergies[0]-commonScale), (DFRACT_BITS-1)); in calculateThresholds()
394 scaleFactor1 = fixMin((scaleEnergies[1]-commonScale), (DFRACT_BITS-1)); in calculateThresholds()
439 temp = ( commonScale<=(DFRACT_BITS-1) ) in calculateThresholds()
Denv_est.cpp136 scale = DFRACT_BITS; in FDKsbrEnc_getEnergyFromCplxQmfData()
142 if (scale >= DFRACT_BITS-1) { in FDKsbrEnc_getEnergyFromCplxQmfData()
229 scale = DFRACT_BITS; in FDKsbrEnc_getEnergyFromCplxQmfDataFull()
235 if (scale >= DFRACT_BITS-1) { in FDKsbrEnc_getEnergyFromCplxQmfDataFull()
362 tmp = ((((INT)NoiseLevels[i])>>(DFRACT_BITS-1-LD_DATA_SHIFT)) ); /* conversion to integer */ in sbrNoiseFloorLevelsQuantisation()
407 …temp1 = temp1 << (DFRACT_BITS-1-LD_DATA_SHIFT-1); /* INT to fract conversion of result, if input … in coupleNoiseFloor()
415 …temp2 = temp2 << (DFRACT_BITS-1-LD_DATA_SHIFT-1); /* INT to fract conversion of result, if input … in coupleNoiseFloor()
467 if(ui-li==0) dynScale = DFRACT_BITS-1; in getEnvSfbEnergy()
469 dynScale = CalcLdInt(ui-li)>>(DFRACT_BITS-1-LD_DATA_SHIFT); in getEnvSfbEnergy()
489 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