Lines Matching refs:FIXP_DBL

155   FIXP_DBL nrgRef[MAX_FREQ_COEFFS];
156 FIXP_DBL nrgEst[MAX_FREQ_COEFFS];
157 FIXP_DBL nrgGain[MAX_FREQ_COEFFS];
158 FIXP_DBL noiseLevel[MAX_FREQ_COEFFS];
159 FIXP_DBL nrgSine[MAX_FREQ_COEFFS];
170 static void equalizeFiltBufferExp(FIXP_DBL *filtBuffer, SCHAR *filtBuffer_e,
171 FIXP_DBL *NrgGain, SCHAR *NrgGain_e,
174 static void calcNrgPerSubband(FIXP_DBL **analysBufferReal,
175 FIXP_DBL **analysBufferImag, int lowSubband,
177 SCHAR frameExp, FIXP_DBL *nrgEst,
180 static void calcNrgPerSfb(FIXP_DBL **analysBufferReal,
181 FIXP_DBL **analysBufferImag, int nSfb,
183 SCHAR input_e, FIXP_DBL *nrg_est, SCHAR *nrg_est_e);
185 static void calcSubbandGain(FIXP_DBL nrgRef, SCHAR nrgRef_e,
186 ENV_CALC_NRGS *nrgs, int c, FIXP_DBL tmpNoise,
191 FIXP_DBL *sumRef_m, SCHAR *sumRef_e,
192 FIXP_DBL *ptrAvgGain_m, SCHAR *ptrAvgGain_e);
194 static void adjustTimeSlot_EldGrid(FIXP_DBL *ptrReal, ENV_CALC_NRGS *nrgs,
200 static void adjustTimeSlotLC(FIXP_DBL *ptrReal, ENV_CALC_NRGS *nrgs,
210 FIXP_DBL *ptrReal, FIXP_DBL *ptrImag,
218 FIXP_DBL *ptrReal, FIXP_DBL *ptrImag,
222 static void adjustTimeSlotHQ(FIXP_DBL *ptrReal, FIXP_DBL *ptrImag,
375 FIXP_DBL *degreeAlias, /*!< estimated aliasing for each QMF in aliasingReduction()
382 FIXP_DBL *nrgGain = nrgs->nrgGain; /*!< subband gains to be modified */ in aliasingReduction()
385 FIXP_DBL *nrgEst = nrgs->nrgEst; /*!< subband energy before amplification */ in aliasingReduction()
421 FIXP_DBL nrgOrig = FL2FXCONST_DBL( in aliasingReduction()
424 FIXP_DBL nrgAmp = FL2FXCONST_DBL( in aliasingReduction()
427 FIXP_DBL nrgMod = FL2FXCONST_DBL( in aliasingReduction()
430 FIXP_DBL groupGain; /* Total energy gain in group */ in aliasingReduction()
432 FIXP_DBL compensation; /* Compensation factor for the energy change when in aliasingReduction()
443 FIXP_DBL tmp = nrgEst[k]; in aliasingReduction()
460 FIXP_DBL tmp; in aliasingReduction()
463 FIXP_DBL alpha = degreeAlias[k]; in aliasingReduction()
471 fMult(/*FL2FXCONST_DBL(1.0f)*/ (FIXP_DBL)MAXVAL_DBL - alpha, in aliasingReduction()
499 FIXP_DBL subsample_power_low[(((1024) / (32) * (4) / 2) + (3 * (4)))];
500 FIXP_DBL subsample_power_high[(((1024) / (32) * (4) / 2) + (3 * (4)))];
501 FIXP_DBL gain[(((1024) / (32) * (4) / 2) + (3 * (4)))];
506 static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag, in apply_inter_tes()
513 FIXP_DBL *subsample_power_high, *subsample_power_low; in apply_inter_tes()
515 FIXP_DBL total_power_high = (FIXP_DBL)0; in apply_inter_tes()
516 FIXP_DBL total_power_low = (FIXP_DBL)0; in apply_inter_tes()
517 FIXP_DBL *gain; in apply_inter_tes()
535 int preShift2 = 32 - fNormz((FIXP_DBL)nbSubsample); in apply_inter_tes()
540 FIXP_DBL bufferReal[(((1024) / (32) * (4) / 2) + (3 * (4)))]; in apply_inter_tes()
541 FIXP_DBL bufferImag[(((1024) / (32) * (4) / 2) + (3 * (4)))]; in apply_inter_tes()
542 FIXP_DBL maxVal = (FIXP_DBL)0; in apply_inter_tes()
552 maxVal |= (FIXP_DBL)((LONG)(bufferImag[j]) ^ in apply_inter_tes()
555 maxVal |= (FIXP_DBL)((LONG)(bufferReal[j]) ^ in apply_inter_tes()
559 subsample_power_low[i] = (FIXP_DBL)0; in apply_inter_tes()
565 int postShift = 32 - fNormz((FIXP_DBL)lowSubband); in apply_inter_tes()
575 FIXP_DBL addme; in apply_inter_tes()
585 maxVal = (FIXP_DBL)0; in apply_inter_tes()
591 maxVal |= (FIXP_DBL)((LONG)(bufferImag[j]) ^ in apply_inter_tes()
594 maxVal |= (FIXP_DBL)((LONG)(bufferReal[j]) ^ in apply_inter_tes()
598 subsample_power_high[i] = (FIXP_DBL)0; in apply_inter_tes()
606 int postShift = 32 - fNormz((FIXP_DBL)(highSubband - lowSubband)); in apply_inter_tes()
620 FIXP_DBL new_summand = subsample_power_low[i]; in apply_inter_tes()
653 FIXP_DBL mult = in apply_inter_tes()
654 fMultNorm(subsample_power_low[i], (FIXP_DBL)nbSubsample, &sf2); in apply_inter_tes()
657 if (total_power_low != FIXP_DBL(0)) { in apply_inter_tes()
666 if (mult == FIXP_DBL(0)) { in apply_inter_tes()
667 gain[i] = FIXP_DBL(0); in apply_inter_tes()
670 gain[i] = (FIXP_DBL)MAXVAL_DBL; in apply_inter_tes()
676 FIXP_DBL total_power_high_after = (FIXP_DBL)0; in apply_inter_tes()
687 FIXP_DBL one = (FIXP_DBL)MAXVAL_DBL >> in apply_inter_tes()
692 FIXP_DBL mult = (gain[i] - one) >> 1; in apply_inter_tes()
700 FIXP_DBL point_two = FL2FXCONST_DBL(0.8f); /* scaled up by 2 */ in apply_inter_tes()
703 FIXP_DBL tmp = gain[i]; in apply_inter_tes()
711 FIXP_DBL gain_pow2; in apply_inter_tes()
748 FIXP_DBL gain_adj_2 = FL2FX_DBL(0.5f); in apply_inter_tes()
751 if ((total_power_high != (FIXP_DBL)0) && in apply_inter_tes()
752 (total_power_high_after != (FIXP_DBL)0)) { in apply_inter_tes()
757 FIXP_DBL gain_adj = sqrtFixp_lookup(gain_adj_2, &gain_adj_2_sf); in apply_inter_tes()
766 gain[i] = (FIXP_DBL)MAXVAL_DBL; in apply_inter_tes()
886 FIXP_DBL * in calculateSbrEnvelope()
888 FIXP_DBL * in calculateSbrEnvelope()
891 FIXP_DBL *degreeAlias, /*!< Estimated aliasing for each QMF channel */ in calculateSbrEnvelope()
1183 FIXP_DBL tmpNoise = in calculateSbrEnvelope()
1202 FIXP_DBL refNrg = pNrgs->nrgRef[k - lowSubband]; in calculateSbrEnvelope()
1229 FIXP_DBL refNrg = FX_SGL2FX_DBL((FIXP_SGL)((LONG)(*pIenv) & MASK_M)); in calculateSbrEnvelope()
1276 FIXP_DBL sumRef, boostGain, maxGain; in calculateSbrEnvelope()
1277 FIXP_DBL accu = FL2FXCONST_DBL(0.0f); in calculateSbrEnvelope()
1321 FIXP_DBL noiseAmp; in calculateSbrEnvelope()
1342 FIXP_DBL tmp = fMult(pNrgs->nrgGain[k], pNrgs->nrgEst[k]); in calculateSbrEnvelope()
1360 if (accu == (FIXP_DBL)0) { /* If divisor is 0, limit quotient to +4 dB */ in calculateSbrEnvelope()
1432 noSubbands * sizeof(FIXP_DBL)); in calculateSbrEnvelope()
1434 noSubbands * sizeof(FIXP_DBL)); in calculateSbrEnvelope()
1636 noSubbands * sizeof(FIXP_DBL)); in calculateSbrEnvelope()
1640 noSubbands * sizeof(FIXP_DBL)); in calculateSbrEnvelope()
1651 FIXP_DBL maxVal; in calculateSbrEnvelope()
1816 FIXP_DBL *filtBuffer, /*!< bufferd gains */ in equalizeFiltBufferExp()
1818 FIXP_DBL *nrgGain, /*!< gains for current envelope */ in equalizeFiltBufferExp()
1865 FIXP_DBL **re, /*!< Real part of input and output subband samples */ in rescaleSubbandSamples()
1866 FIXP_DBL **im, /*!< Imaginary part of input and output subband samples */ in rescaleSubbandSamples()
1889 static inline FIXP_DBL FDK_get_maxval_real(FIXP_DBL maxVal, FIXP_DBL *reTmp, in FDK_get_maxval_real()
1891 maxVal = (FIXP_DBL)0; in FDK_get_maxval_real()
1893 FIXP_DBL tmp = *(reTmp++); in FDK_get_maxval_real()
1894 maxVal |= (FIXP_DBL)((LONG)(tmp) ^ ((LONG)tmp >> (DFRACT_BITS - 1))); in FDK_get_maxval_real()
1909 FIXP_DBL maxSubbandSample( in maxSubbandSample()
1910 FIXP_DBL **re, /*!< Real part of input and output subband samples */ in maxSubbandSample()
1911 FIXP_DBL **im, /*!< Real part of input and output subband samples */ in maxSubbandSample()
1917 FIXP_DBL maxVal = FL2FX_DBL(0.0f); in maxSubbandSample()
1926 FIXP_DBL *reTmp = &re[l][lowSubband]; in maxSubbandSample()
1927 FIXP_DBL *imTmp = &im[l][lowSubband]; in maxSubbandSample()
1929 FIXP_DBL tmp1 = *(reTmp++); in maxSubbandSample()
1930 FIXP_DBL tmp2 = *(imTmp++); in maxSubbandSample()
1932 (FIXP_DBL)((LONG)(tmp1) ^ ((LONG)tmp1 >> (DFRACT_BITS - 1))); in maxSubbandSample()
1934 (FIXP_DBL)((LONG)(tmp2) ^ ((LONG)tmp2 >> (DFRACT_BITS - 1))); in maxSubbandSample()
1944 if (maxVal > (FIXP_DBL)0) { in maxSubbandSample()
1947 FIXP_DBL lowerPow2 = in maxSubbandSample()
1948 (FIXP_DBL)(1 << (DFRACT_BITS - 1 - CntLeadingZeros(maxVal))); in maxSubbandSample()
1949 if (maxVal == lowerPow2) maxVal += (FIXP_DBL)1; in maxSubbandSample()
1985 FIXP_DBL **analysBufferReal, /*!< Real part of subband samples */ in calcNrgPerSubband()
1986 FIXP_DBL **analysBufferImag, /*!< Imaginary part of subband samples */ in calcNrgPerSubband()
1992 FIXP_DBL *nrgEst, /*!< resulting Energy (0..1) */ in calcNrgPerSubband()
1998 FIXP_DBL sum; in calcNrgPerSubband()
2008 FIXP_DBL bufferReal[(((1024) / (32) * (4) / 2) + (3 * (4)))]; in calcNrgPerSubband()
2009 FIXP_DBL bufferImag[(((1024) / (32) * (4) / 2) + (3 * (4)))]; in calcNrgPerSubband()
2010 FIXP_DBL maxVal; in calcNrgPerSubband()
2017 maxVal |= (FIXP_DBL)((LONG)(bufferImag[l]) ^ in calcNrgPerSubband()
2020 maxVal |= (FIXP_DBL)((LONG)(bufferReal[l]) ^ in calcNrgPerSubband()
2028 maxVal |= (FIXP_DBL)((LONG)(bufferReal[l]) ^ in calcNrgPerSubband()
2040 FIXP_DBL accu; in calcNrgPerSubband()
2055 FIXP_DBL temp1 = bufferReal[l] << (int)preShift; in calcNrgPerSubband()
2056 FIXP_DBL temp2 = bufferImag[l] << (int)preShift; in calcNrgPerSubband()
2062 FIXP_DBL temp = bufferReal[l] << (int)preShift; in calcNrgPerSubband()
2071 FIXP_DBL temp1 = bufferReal[l] >> (int)negpreShift; in calcNrgPerSubband()
2072 FIXP_DBL temp2 = bufferImag[l] >> (int)negpreShift; in calcNrgPerSubband()
2078 FIXP_DBL temp = bufferReal[l] >> (int)negpreShift; in calcNrgPerSubband()
2113 FIXP_DBL **analysBufferReal, /*!< Real part of subband samples */ in calcNrgPerSfb()
2114 FIXP_DBL **analysBufferImag, /*!< Imaginary part of subband samples */ in calcNrgPerSfb()
2120 FIXP_DBL *nrgEst, /*!< resulting Energy (0..1) */ in calcNrgPerSfb()
2124 FIXP_DBL temp; in calcNrgPerSfb()
2127 FIXP_DBL sum; in calcNrgPerSfb()
2130 FIXP_DBL sumAll, sumLine; /* Single precision would be sufficient, in calcNrgPerSfb()
2143 FIXP_DBL maxVal = maxSubbandSample(analysBufferReal, analysBufferImag, li, in calcNrgPerSfb()
2238 FIXP_DBL nrgRef, /*!< Reference Energy according to envelope data */ in calcSubbandGain()
2241 ENV_CALC_NRGS *nrgs, int i, FIXP_DBL tmpNoise, /*!< Relative noise level */ in calcSubbandGain()
2247 FIXP_DBL nrgEst = nrgs->nrgEst[i]; /*!< Energy in transposed signal */ in calcSubbandGain()
2250 FIXP_DBL *ptrNrgGain = &nrgs->nrgGain[i]; /*!< Resulting energy gain */ in calcSubbandGain()
2253 FIXP_DBL *ptrNoiseLevel = in calcSubbandGain()
2257 FIXP_DBL *ptrNrgSine = &nrgs->nrgSine[i]; /*!< Additional sine energy */ in calcSubbandGain()
2261 FIXP_DBL a, b, c; in calcSubbandGain()
2339 FIXP_DBL *ptrSumRef, SCHAR *ptrSumRef_e, in calcAvgGain()
2340 FIXP_DBL *ptrAvgGain, /*!< Resulting overall gain (mantissa) */ in calcAvgGain()
2343 FIXP_DBL *nrgRef = in calcAvgGain()
2348 FIXP_DBL *nrgEst = nrgs->nrgEst; /*!< Energy in transposed signal */ in calcAvgGain()
2352 FIXP_DBL sumRef = 1; in calcAvgGain()
2353 FIXP_DBL sumEst = 1; in calcAvgGain()
2376 FIXP_DBL *RESTRICT in adjustTimeSlot_EldGrid()
2388 FIXP_DBL signalReal, sbNoise; in adjustTimeSlot_EldGrid()
2391 FIXP_DBL *pGain = nrgs->nrgGain; /*!< Gains of current envelope */ in adjustTimeSlot_EldGrid()
2392 FIXP_DBL *RESTRICT pNoiseLevel = in adjustTimeSlot_EldGrid()
2394 FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */ in adjustTimeSlot_EldGrid()
2401 static const FIXP_DBL harmonicPhaseX[4][2] = { in adjustTimeSlot_EldGrid()
2411 const FIXP_DBL *p_harmonicPhaseX = &harmonicPhaseX[harmIndex][0]; in adjustTimeSlot_EldGrid()
2418 FIXP_DBL pSineLevel_prev = (FIXP_DBL)0; in adjustTimeSlot_EldGrid()
2423 FIXP_DBL sineLevel_curr = *pSineLevel++; in adjustTimeSlot_EldGrid()
2458 FIXP_DBL sineLevel_curr = *pSineLevel++; in adjustTimeSlot_EldGrid()
2482 FIXP_DBL *ptrReal, /*!< Subband samples to be adjusted, real part */ in adjustTimeSlotLC()
2490 FIXP_DBL *pGain = nrgs->nrgGain; /*!< Gains of current envelope */ in adjustTimeSlotLC()
2491 FIXP_DBL *pNoiseLevel = in adjustTimeSlotLC()
2493 FIXP_DBL *pSineLevel = nrgs->nrgSine; /*!< Sine levels */ in adjustTimeSlotLC()
2499 FIXP_DBL signalReal, sineLevel, sineLevelNext, sineLevelPrev; in adjustTimeSlotLC()
2540 FIXP_DBL tmp1 = (shift >= 0) ? (fMultDiv2(C1, sineLevel) >> shift) in adjustTimeSlotLC()
2542 FIXP_DBL tmp2 = fMultDiv2(C1, sineLevelNext); in adjustTimeSlotLC()
2567 FIXP_DBL sinelevel = *pSineLevel++; in adjustTimeSlotLC()
2609 FIXP_DBL addSine = fMultDiv2((pSineLevel[-2] - pSineLevel[0]), C1); in adjustTimeSlotLC()
2662 FIXP_DBL *RESTRICT in adjustTimeSlotHQ_GainAndNoise()
2664 FIXP_DBL *RESTRICT in adjustTimeSlotHQ_GainAndNoise()
2674 FIXP_DBL *RESTRICT gain = nrgs->nrgGain; /*!< Gains of current envelope */ in adjustTimeSlotHQ_GainAndNoise()
2675 FIXP_DBL *RESTRICT noiseLevel = in adjustTimeSlotHQ_GainAndNoise()
2677 FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */ in adjustTimeSlotHQ_GainAndNoise()
2679 FIXP_DBL *RESTRICT filtBuffer = in adjustTimeSlotHQ_GainAndNoise()
2681 FIXP_DBL *RESTRICT filtBufferNoise = in adjustTimeSlotHQ_GainAndNoise()
2687 FIXP_DBL signalReal, signalImag; in adjustTimeSlotHQ_GainAndNoise()
2688 FIXP_DBL noiseReal, noiseImag; in adjustTimeSlotHQ_GainAndNoise()
2689 FIXP_DBL smoothedGain, smoothedNoise; in adjustTimeSlotHQ_GainAndNoise()
2777 FIXP_DBL *RESTRICT in adjustTimeSlotHQ_AddHarmonics()
2779 FIXP_DBL *RESTRICT in adjustTimeSlotHQ_AddHarmonics()
2787 FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */ in adjustTimeSlotHQ_AddHarmonics()
2792 FIXP_DBL signalReal, signalImag; in adjustTimeSlotHQ_AddHarmonics()
2795 FIXP_DBL sineLevel; in adjustTimeSlotHQ_AddHarmonics()
2823 FIXP_DBL *RESTRICT in adjustTimeSlotHQ()
2825 FIXP_DBL *RESTRICT in adjustTimeSlotHQ()
2835 FIXP_DBL *RESTRICT gain = nrgs->nrgGain; /*!< Gains of current envelope */ in adjustTimeSlotHQ()
2836 FIXP_DBL *RESTRICT noiseLevel = in adjustTimeSlotHQ()
2838 FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */ in adjustTimeSlotHQ()
2840 FIXP_DBL *RESTRICT filtBuffer = in adjustTimeSlotHQ()
2842 FIXP_DBL *RESTRICT filtBufferNoise = in adjustTimeSlotHQ()
2850 FIXP_DBL signalReal, signalImag; in adjustTimeSlotHQ()
2851 FIXP_DBL noiseReal, noiseImag; in adjustTimeSlotHQ()
2852 FIXP_DBL smoothedGain, smoothedNoise; in adjustTimeSlotHQ()
2858 FIXP_DBL sineLevel; in adjustTimeSlotHQ()
3076 FIXP_DBL div_m, oct_m, temp; in ResetLimiterBands()