Lines Matching refs:sfb
182 int sfb; in FDKaacEnc_PnsDetect() local
187 for (sfb = 0; sfb < MAX_GROUPED_SFB; sfb++) { in FDKaacEnc_PnsDetect()
188 noiseNrg[sfb] = NO_NOISE_PNS; in FDKaacEnc_PnsDetect()
219 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_PnsDetect()
221 if (sfb < startNoiseSfb) { in FDKaacEnc_PnsDetect()
222 pnsData->pnsFlag[sfb] = 0; in FDKaacEnc_PnsDetect()
233 if ((pnsData->noiseFuzzyMeasure[sfb] > FL2FXCONST_SGL(0.5)) && in FDKaacEnc_PnsDetect()
234 ((sfbThresholdLdData[sfb] + in FDKaacEnc_PnsDetect()
237 < sfbEnergyLdData[sfb])) { in FDKaacEnc_PnsDetect()
242 pnsData->pnsFlag[sfb] = 1; /* PNS_ON */ in FDKaacEnc_PnsDetect()
244 pnsData->pnsFlag[sfb] = 0; /* PNS_OFF */ in FDKaacEnc_PnsDetect()
256 for (sfb = 1; sfb < maxSfbPerGroup - 1; sfb++) { in FDKaacEnc_PnsDetect()
257 if ((pnsData->noiseFuzzyMeasure[sfb] > pnsConf->np.gapFillThr) && in FDKaacEnc_PnsDetect()
258 (pnsData->pnsFlag[sfb - 1]) && (pnsData->pnsFlag[sfb + 1])) { in FDKaacEnc_PnsDetect()
259 pnsData->pnsFlag[sfb] = 1; in FDKaacEnc_PnsDetect()
281 for (sfb = 1; sfb < maxSfbPerGroup - 1; sfb++) { in FDKaacEnc_PnsDetect()
282 if ((pnsData->pnsFlag[sfb - 1] == 0) && (pnsData->pnsFlag[sfb + 1] == 0)) { in FDKaacEnc_PnsDetect()
283 pnsData->pnsFlag[sfb] = 0; in FDKaacEnc_PnsDetect()
355 int sfb; in FDKaacEnc_CalcNoiseNrgs() local
358 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CalcNoiseNrgs()
359 if (pnsFlag[sfb]) { in FDKaacEnc_CalcNoiseNrgs()
360 INT nrg = (-sfbEnergyLdData[sfb] + FL2FXCONST_DBL(0.5f / 64.0f)) >> in FDKaacEnc_CalcNoiseNrgs()
362 noiseNrg[sfb] = tmp - nrg; in FDKaacEnc_CalcNoiseNrgs()
386 INT sfb; in FDKaacEnc_CodePnsChannel() local
392 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CodePnsChannel()
394 noiseNrg[sfb] = NO_NOISE_PNS; in FDKaacEnc_CodePnsChannel()
400 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CodePnsChannel()
401 if (pnsFlag[sfb]) { in FDKaacEnc_CodePnsChannel()
403 if (noiseNrg[sfb] != NO_NOISE_PNS) in FDKaacEnc_CodePnsChannel()
404 sfbThresholdLdData[sfb] = in FDKaacEnc_CodePnsChannel()
405 sfbEnergyLdData[sfb] + FL2FXCONST_DBL(1.0f / LD_DATA_SCALING); in FDKaacEnc_CodePnsChannel()
409 INT deltaiNoiseEnergy = noiseNrg[sfb] - lastiNoiseEnergy; in FDKaacEnc_CodePnsChannel()
412 noiseNrg[sfb] -= deltaiNoiseEnergy - CODE_BOOK_PNS_LAV; in FDKaacEnc_CodePnsChannel()
414 noiseNrg[sfb] -= deltaiNoiseEnergy + CODE_BOOK_PNS_LAV; in FDKaacEnc_CodePnsChannel()
418 lastiNoiseEnergy = noiseNrg[sfb]; in FDKaacEnc_CodePnsChannel()
421 noiseNrg[sfb] = NO_NOISE_PNS; in FDKaacEnc_CodePnsChannel()
447 INT sfb; in FDKaacEnc_PreProcessPnsChannelPair() local
457 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_PreProcessPnsChannelPair()
458 FIXP_DBL quot = (sfbEnergyLeftLD[sfb] >> 1) + (sfbEnergyRightLD[sfb] >> 1); in FDKaacEnc_PreProcessPnsChannelPair()
464 sfbEnergyMid[sfb] - in FDKaacEnc_PreProcessPnsChannelPair()
465 (((sfbEnergyLeft[sfb] >> 1) + (sfbEnergyRight[sfb] >> 1)) >> 1); in FDKaacEnc_PreProcessPnsChannelPair()
477 pNoiseEnergyCorrelationL[sfb] = ccf; in FDKaacEnc_PreProcessPnsChannelPair()
478 pNoiseEnergyCorrelationR[sfb] = ccf; in FDKaacEnc_PreProcessPnsChannelPair()
503 INT sfb; in FDKaacEnc_PostProcessPnsChannelPair() local
507 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_PostProcessPnsChannelPair()
511 if (msMask[sfb]) { in FDKaacEnc_PostProcessPnsChannelPair()
512 if ((pnsDataLeft->pnsFlag[sfb]) && (pnsDataRight->pnsFlag[sfb])) { in FDKaacEnc_PostProcessPnsChannelPair()
515 if (pnsDataLeft->noiseEnergyCorrelation[sfb] <= in FDKaacEnc_PostProcessPnsChannelPair()
517 msMask[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
524 pnsDataLeft->pnsFlag[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
525 pnsDataRight->pnsFlag[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
533 if ((pnsDataLeft->pnsFlag[sfb]) && (pnsDataRight->pnsFlag[sfb])) { in FDKaacEnc_PostProcessPnsChannelPair()
534 if (pnsDataLeft->noiseEnergyCorrelation[sfb] > in FDKaacEnc_PostProcessPnsChannelPair()
536 msMask[sfb] = 1; in FDKaacEnc_PostProcessPnsChannelPair()