Lines Matching refs:sfb
200 int sfb; in FDKaacEnc_PnsDetect() local
208 for (sfb=0; sfb<MAX_GROUPED_SFB; sfb++) { in FDKaacEnc_PnsDetect()
209 … noiseNrg[sfb] = NO_NOISE_PNS; /* clear nrg's of previous frame */ in FDKaacEnc_PnsDetect()
221 for (sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_PnsDetect()
222 pnsData->pnsFlag[sfb] = 0; /* clear all pnsFlags */ in FDKaacEnc_PnsDetect()
246 for(sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_PnsDetect()
249 if(sfb < startNoiseSfb){ in FDKaacEnc_PnsDetect()
250 pnsData->pnsFlag[sfb] = 0; in FDKaacEnc_PnsDetect()
261 if((pnsData->noiseFuzzyMeasure[sfb] > FL2FXCONST_SGL(0.5)) && in FDKaacEnc_PnsDetect()
262 …( (sfbThresholdLdData[sfb] + FL2FXCONST_DBL(0.5849625f/64.0f)) /* thr * 1.5 = thrLd +ld(1.5)/64 */ in FDKaacEnc_PnsDetect()
263 < sfbEnergyLdData[sfb] ) ) in FDKaacEnc_PnsDetect()
269 pnsData->pnsFlag[sfb] = 1; /* PNS_ON */ in FDKaacEnc_PnsDetect()
272 pnsData->pnsFlag[sfb] = 0; /* PNS_OFF */ in FDKaacEnc_PnsDetect()
283 for(sfb=1; sfb<maxSfbPerGroup-1; sfb++) { in FDKaacEnc_PnsDetect()
284 if((pnsData->noiseFuzzyMeasure[sfb]>pnsConf->np.gapFillThr) && in FDKaacEnc_PnsDetect()
285 (pnsData->pnsFlag[sfb-1]) && (pnsData->pnsFlag[sfb+1])) { in FDKaacEnc_PnsDetect()
286 pnsData->pnsFlag[sfb] = 1; in FDKaacEnc_PnsDetect()
306 for(sfb=1; sfb<maxSfbPerGroup-1; sfb++) { in FDKaacEnc_PnsDetect()
307 if((pnsData->pnsFlag[sfb-1]==0)&&(pnsData->pnsFlag[sfb+1]==0)) { in FDKaacEnc_PnsDetect()
308 pnsData->pnsFlag[sfb] = 0; in FDKaacEnc_PnsDetect()
399 int sfb; in FDKaacEnc_CalcNoiseNrgs() local
402 for(sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CalcNoiseNrgs()
403 if(pnsFlag[sfb]) { in FDKaacEnc_CalcNoiseNrgs()
404 INT nrg = (-sfbEnergyLdData[sfb]+FL2FXCONST_DBL(0.5f/64.0f))>>(DFRACT_BITS-1-7); in FDKaacEnc_CalcNoiseNrgs()
405 noiseNrg[sfb] = tmp - nrg; in FDKaacEnc_CalcNoiseNrgs()
432 INT sfb; in FDKaacEnc_CodePnsChannel() local
438 for(sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CodePnsChannel()
440 noiseNrg[sfb] = NO_NOISE_PNS; in FDKaacEnc_CodePnsChannel()
446 for(sfb = 0; sfb < sfbActive; sfb++) { in FDKaacEnc_CodePnsChannel()
447 if(pnsFlag[sfb]) { in FDKaacEnc_CodePnsChannel()
449 if(noiseNrg[sfb] != NO_NOISE_PNS) in FDKaacEnc_CodePnsChannel()
450 sfbThresholdLdData[sfb] = sfbEnergyLdData[sfb] + FL2FXCONST_DBL(1.0f/LD_DATA_SCALING); in FDKaacEnc_CodePnsChannel()
454 INT deltaiNoiseEnergy = noiseNrg[sfb] - lastiNoiseEnergy; in FDKaacEnc_CodePnsChannel()
457 noiseNrg[sfb] -= deltaiNoiseEnergy - CODE_BOOK_PNS_LAV; in FDKaacEnc_CodePnsChannel()
459 noiseNrg[sfb] -= deltaiNoiseEnergy + CODE_BOOK_PNS_LAV; in FDKaacEnc_CodePnsChannel()
464 lastiNoiseEnergy = noiseNrg[sfb]; in FDKaacEnc_CodePnsChannel()
468 noiseNrg[sfb] = NO_NOISE_PNS; in FDKaacEnc_CodePnsChannel()
499 INT sfb; in FDKaacEnc_PreProcessPnsChannelPair() local
508 for(sfb=0;sfb< sfbActive;sfb++) { in FDKaacEnc_PreProcessPnsChannelPair()
509 FIXP_DBL quot = (sfbEnergyLeftLD[sfb]>>1) + (sfbEnergyRightLD[sfb]>>1); in FDKaacEnc_PreProcessPnsChannelPair()
514 FIXP_DBL accu = sfbEnergyMid[sfb]- (((sfbEnergyLeft[sfb]>>1)+(sfbEnergyRight[sfb]>>1))>>1); in FDKaacEnc_PreProcessPnsChannelPair()
522 pNoiseEnergyCorrelationL[sfb] = ccf; in FDKaacEnc_PreProcessPnsChannelPair()
523 pNoiseEnergyCorrelationR[sfb] = ccf; in FDKaacEnc_PreProcessPnsChannelPair()
552 INT sfb; in FDKaacEnc_PostProcessPnsChannelPair() local
557 for(sfb=0;sfb<sfbActive;sfb++) { in FDKaacEnc_PostProcessPnsChannelPair()
561 if( msMask[sfb] ) { in FDKaacEnc_PostProcessPnsChannelPair()
562 if( (pnsDataLeft->pnsFlag[sfb]) && in FDKaacEnc_PostProcessPnsChannelPair()
563 (pnsDataRight->pnsFlag[sfb]) ) { in FDKaacEnc_PostProcessPnsChannelPair()
566 if(pnsDataLeft->noiseEnergyCorrelation[sfb] <= pnsConf->noiseCorrelationThresh){ in FDKaacEnc_PostProcessPnsChannelPair()
567 msMask[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
575 pnsDataLeft->pnsFlag[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
576 pnsDataRight->pnsFlag[sfb] = 0; in FDKaacEnc_PostProcessPnsChannelPair()
584 if( (pnsDataLeft->pnsFlag[sfb]) && (pnsDataRight->pnsFlag[sfb]) ) { in FDKaacEnc_PostProcessPnsChannelPair()
585 if(pnsDataLeft->noiseEnergyCorrelation[sfb] > pnsConf->noiseCorrelationThresh) { in FDKaacEnc_PostProcessPnsChannelPair()
586 msMask[sfb] = 1; in FDKaacEnc_PostProcessPnsChannelPair()