Lines Matching refs:sfb

360    INT ch, sfb, sfbGrp;  in FDKaacEnc_calcThreshExp()  local
365 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcThreshExp()
366 thrExpLdData = psyOutChannel[ch]->sfbThresholdLdData[sfbGrp+sfb]>>2 ; in FDKaacEnc_calcThreshExp()
367 thrExp[ch][sfbGrp+sfb] = CalcInvLdData(thrExpLdData); in FDKaacEnc_calcThreshExp()
383 INT ch, sfb, sfbGrp, nSfb; in FDKaacEnc_adaptMinSnr() local
395 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_adaptMinSnr()
396 accu += psyOutChannel[ch]->sfbEnergy[sfbGrp+sfb]>>6; in FDKaacEnc_adaptMinSnr()
412 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_adaptMinSnr()
413 if ( (msaParam->startRatio + qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]) < avgEnLD64 ) { in FDKaacEnc_adaptMinSnr()
414 …dbRatio = fMult((avgEnLD64 - qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]),FL2FXCONST_DBL(0.30102… in FDKaacEnc_adaptMinSnr()
417 …qcOutChannel[ch]->sfbMinSnrLdData[sfbGrp+sfb] = (fMult(qcOutChannel[ch]->sfbMinSnrLdData[sfbGrp+sf… in FDKaacEnc_adaptMinSnr()
418 …OutChannel[ch]->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(minSnrLimitLD64, qcOutChannel[ch]->sfbMinSnrL… in FDKaacEnc_adaptMinSnr()
438 INT ch, sfb, sfbGrp; in FDKaacEnc_initAvoidHoleFlag() local
446 INT sfbGrp, sfb; in FDKaacEnc_initAvoidHoleFlag() local
451 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) in FDKaacEnc_initAvoidHoleFlag()
452 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] >>= 1 ; in FDKaacEnc_initAvoidHoleFlag()
456 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) in FDKaacEnc_initAvoidHoleFlag()
457 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
459 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb]) ; in FDKaacEnc_initAvoidHoleFlag()
468 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
470 if (sfb > 0) in FDKaacEnc_initAvoidHoleFlag()
471 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp+sfb-1]; in FDKaacEnc_initAvoidHoleFlag()
473 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
475 if (sfb < psyOutChannel[ch]->maxSfbPerGroup-1) in FDKaacEnc_initAvoidHoleFlag()
476 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp+sfb+1]; in FDKaacEnc_initAvoidHoleFlag()
478 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
482 sfbEn = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
483 sfbEnLdData = qcOutChan->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
492 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
493 fixMin(qcOutChan->sfbMinSnrLdData[sfbGrp+sfb], tmpMinSnrLdData); in FDKaacEnc_initAvoidHoleFlag()
497 …nrLdData = avgEnLdData - sfbEnLdData -(FIXP_DBL)SnrLdMin4 + qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
499 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(tmpMinSnrLdData, in FDKaacEnc_initAvoidHoleFlag()
500 (FIXP_DBL)(qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + SnrLdMin2 )); in FDKaacEnc_initAvoidHoleFlag()
514 for (sfb=0; sfb<psyOutChanM->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
515 if (toolsInfo->msMask[sfbGrp+sfb]) { in FDKaacEnc_initAvoidHoleFlag()
516 …maxSfbEnLd = fixMax(qcOutChanM->sfbEnergyLdData[sfbGrp+sfb],qcOutChanS->sfbEnergyLdData[sfbGrp+sfb in FDKaacEnc_initAvoidHoleFlag()
519 …if ( ((SnrLdMin5>>1) + (maxSfbEnLd>>1) + (qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb]>>1)) <= FL2FXCON… in FDKaacEnc_initAvoidHoleFlag()
522 maxThrLd = SnrLdMin5 + maxSfbEnLd + qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
524 if (qcOutChanM->sfbEnergy[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
525 sfbMinSnrTmpLd = maxThrLd - qcOutChanM->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
529 …qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] = fixMax(qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb],sfbMinSnr… in FDKaacEnc_initAvoidHoleFlag()
531 if (qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
532 …qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb], (FIXP_DB… in FDKaacEnc_initAvoidHoleFlag()
534 if (qcOutChanS->sfbEnergy[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
535 sfbMinSnrTmpLd = maxThrLd - qcOutChanS->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
539 …qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] = fixMax(qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb],sfbMinSnr… in FDKaacEnc_initAvoidHoleFlag()
541 if (qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
542 …qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb],(FIXP_DBL… in FDKaacEnc_initAvoidHoleFlag()
544 if (qcOutChanM->sfbEnergy[sfbGrp+sfb]>qcOutChanM->sfbSpreadEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
545 qcOutChanS->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
546 fMult(qcOutChanS->sfbEnergy[sfbGrp+sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
548 if (qcOutChanS->sfbEnergy[sfbGrp+sfb]>qcOutChanS->sfbSpreadEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
549 qcOutChanM->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
550 fMult(qcOutChanM->sfbEnergy[sfbGrp+sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
561 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
562 if ((qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] > qcOutChan->sfbEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
563 || (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f))) { in FDKaacEnc_initAvoidHoleFlag()
564 ahFlag[ch][sfbGrp+sfb] = NO_AH; in FDKaacEnc_initAvoidHoleFlag()
567 ahFlag[ch][sfbGrp+sfb] = AH_INACTIVE; in FDKaacEnc_initAvoidHoleFlag()
657 int sfb, sfbGrp, nLinesSum = 0; in FDKaacEnc_calcWeighting() local
663 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcWeighting()
664 … FIXP_DBL nrgFac12 = CalcInvLdData(psyOutChan->sfbEnergyLdData[sfbGrp+sfb]>>1); /* nrg^(1/2) */ in FDKaacEnc_calcWeighting()
665 … FIXP_DBL nrgFac14 = CalcInvLdData(psyOutChan->sfbEnergyLdData[sfbGrp+sfb]>>2); /* nrg^(1/4) */ in FDKaacEnc_calcWeighting()
668 … nLinesSum += peData->peChannelData[ch].sfbNLines[sfbGrp+sfb]; /* relevant lines */ in FDKaacEnc_calcWeighting()
669 … nrgTotal += ( psyOutChan->sfbEnergy[sfbGrp+sfb] >> 6 ); /* sum up nrg */ in FDKaacEnc_calcWeighting()
688 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcWeighting()
693 if ((ch == 1) && (toolsInfo->msMask[sfbGrp+sfb])) { in FDKaacEnc_calcWeighting()
700 if ( (sfbExePatch) && (psyOutChan->sfbEnergy[sfbGrp+sfb]>FL2FXCONST_DBL(0.f)) ) in FDKaacEnc_calcWeighting()
704 …[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_14 + (psyOutChan->sfbEnergyLdData[sfbGrp+sfb]+(psyOutCh… in FDKaacEnc_calcWeighting()
707 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_12 + psyOutChan->sfbEnergyLdData[sfbGrp+sfb in FDKaacEnc_calcWeighting()
710 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_34 + (psyOutChan->sfbEnergyLdData[sfbGrp+sf… in FDKaacEnc_calcWeighting()
712 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = fixMin(qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb],(FIXP_D… in FDKaacEnc_calcWeighting()
784 int sfb, sfbGrp; in FDKaacEnc_peCalculation() local
788 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_peCalculation()
789 …pQcOutCh->sfbWeightedEnergyLdData[sfb+sfbGrp] = pQcOutCh->sfbEnergyLdData[sfb+sfbGrp] - pQcOutCh->… in FDKaacEnc_peCalculation()
790 pQcOutCh->sfbThresholdLdData[sfb+sfbGrp] -= pQcOutCh->sfbEnFacLd[sfb+sfbGrp]; in FDKaacEnc_peCalculation()
814 INT ch, sfb,sfbGrp; in FDKaacEnc_FDKaacEnc_calcPeNoAH() local
822 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_FDKaacEnc_calcPeNoAH()
823 if(ahFlag[ch][sfbGrp+sfb] < AH_ACTIVE) { in FDKaacEnc_FDKaacEnc_calcPeNoAH()
824 pe_tmp += peChanData->sfbPe[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
825 constPart_tmp += peChanData->sfbConstPart[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
826 nActiveLines_tmp += peChanData->sfbNActiveLines[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
853 INT ch, sfb, sfbGrp; in FDKaacEnc_reduceThresholdsCBR() local
860 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_reduceThresholdsCBR()
861 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
862 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
863 sfbThrExp = thrExp[ch][sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
864 if ((sfbEnLdData > sfbThrLdData) && (ahFlag[ch][sfbGrp+sfb] != AH_ACTIVE)) { in FDKaacEnc_reduceThresholdsCBR()
879 if ( ((sfbThrReducedLdData - sfbEnLdData) > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] ) in FDKaacEnc_reduceThresholdsCBR()
880 && (ahFlag[ch][sfbGrp+sfb] != NO_AH) ) in FDKaacEnc_reduceThresholdsCBR()
882 if (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > (FL2FXCONST_DBL(-1.0f) - sfbEnLdData) ){ in FDKaacEnc_reduceThresholdsCBR()
883 …sfbThrReducedLdData = fixMax((qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData), sfbThrLdData); in FDKaacEnc_reduceThresholdsCBR()
886 ahFlag[ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsCBR()
894 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsCBR()
911 INT sfbGrp, sfb; in FDKaacEnc_calcChaosMeasure() local
918 for (sfb=0; sfb<psyOutChannel->maxSfbPerGroup; sfb++){ in FDKaacEnc_calcChaosMeasure()
919 … if (psyOutChannel->sfbEnergyLdData[sfbGrp+sfb] > psyOutChannel->sfbThresholdLdData[sfbGrp+sfb]) { in FDKaacEnc_calcChaosMeasure()
920 frameFormFactor += (CalcInvLdData(sfbFormFactorLdData[sfbGrp+sfb])>>SCALE_FORM_FAC); in FDKaacEnc_calcChaosMeasure()
921 …frameNLines += (psyOutChannel->sfbOffsets[sfbGrp+sfb+1] - psyOutChannel->sfbOffsets[sfbGrp+sfb in FDKaacEnc_calcChaosMeasure()
922 frameEnergy += (psyOutChannel->sfbEnergy[sfbGrp+sfb]>>SCALE_NRGS); in FDKaacEnc_calcChaosMeasure()
955 INT ch, sfbGrp, sfb; in FDKaacEnc_reduceThresholdsVBR() local
986 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++){ in FDKaacEnc_reduceThresholdsVBR()
987 chGroupEnergy[groupCnt][ch] += (psyOutChan->sfbEnergy[sfbGrp+sfb]>>SCALE_GROUP_ENERGY); in FDKaacEnc_reduceThresholdsVBR()
1061 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++){ in FDKaacEnc_reduceThresholdsVBR()
1063 sfbEnLdData = (qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]); in FDKaacEnc_reduceThresholdsVBR()
1064 sfbThrLdData = (qcOutChan->sfbThresholdLdData[sfbGrp+sfb]); in FDKaacEnc_reduceThresholdsVBR()
1065 sfbThrExp = thrExp[ch][sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsVBR()
1067 …if ( (sfbThrLdData>=MIN_LDTHRESH) && (sfbEnLdData > sfbThrLdData) && (ahFlag[ch][sfbGrp+sfb] != AH… in FDKaacEnc_reduceThresholdsVBR()
1071 const int groupNumber = (int) sfb/psyOutChan->sfbPerGroup; in FDKaacEnc_reduceThresholdsVBR()
1106 if ( ((sfbThrReducedLdData - sfbEnLdData) > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] ) in FDKaacEnc_reduceThresholdsVBR()
1107 && (ahFlag[ch][sfbGrp+sfb] != NO_AH) ) in FDKaacEnc_reduceThresholdsVBR()
1109 if (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > (FL2FXCONST_DBL(-1.0f) - sfbEnLdData) ){ in FDKaacEnc_reduceThresholdsVBR()
1110 …sfbThrReducedLdData = fixMax((qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData), sfbThrLdData); in FDKaacEnc_reduceThresholdsVBR()
1113 ahFlag[ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsVBR()
1126 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsVBR()
1150 INT ch, sfb, sfbGrp; in FDKaacEnc_correctThresh() local
1185 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_correctThresh()
1187 if ( peChanData->sfbNActiveLines[sfbGrp+sfb] == 0 ) { in FDKaacEnc_correctThresh()
1188 sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_correctThresh()
1194 …sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] = CalcLdInt(peChanData->sfbNActiveLines[sfbGrp+sf… in FDKaacEnc_correctThresh()
1196 if ( ((ahFlag[elementId][ch][sfbGrp+sfb] < AH_ACTIVE) || (deltaPe > 0)) && in FDKaacEnc_correctThresh()
1197 peChanData->sfbNActiveLines[sfbGrp+sfb] != 0 ) in FDKaacEnc_correctThresh()
1199 if (thrExp[elementId][ch][sfbGrp+sfb] > -redVal[elementId]) { in FDKaacEnc_correctThresh()
1204 …int minScale = fixMin(CountLeadingBits(thrExp[elementId][ch][sfbGrp+sfb]), CountLeadingBits(redVal… in FDKaacEnc_correctThresh()
1207 …FIXP_DBL sumLd = CalcLdData(scaleValue(thrExp[elementId][ch][sfbGrp+sfb], minScale) + scaleValue(r… in FDKaacEnc_correctThresh()
1211 …sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] -… in FDKaacEnc_correctThresh()
1214 … if ( sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] > (FL2FXCONST_DBL(-1.f) + sumLd) ) { in FDKaacEnc_correctThresh()
1215 …sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] -… in FDKaacEnc_correctThresh()
1218 … sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1222 … normFactorInt += (INT)CalcInvLdData(sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb]); in FDKaacEnc_correctThresh()
1224 else sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(1.0f); in FDKaacEnc_correctThresh()
1226 else sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_correctThresh()
1247 for (sfb=0; sfb<psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_correctThresh()
1249 if (peChanData->sfbNActiveLines[sfbGrp+sfb] > 0) { in FDKaacEnc_correctThresh()
1252 if ( (sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb]==FL2FXCONST_DBL(-1.0f)) || in FDKaacEnc_correctThresh()
1259 …fbPeFactorsLdData[elementId][ch][sfbGrp+sfb] + normFactorLdData - sfbNActiveLinesLdData[elementId]… in FDKaacEnc_correctThresh()
1267 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1268 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1283 … if ( (sfbThrReducedLdData - sfbEnLdData > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]) && in FDKaacEnc_correctThresh()
1284 (ahFlag[elementId][ch][sfbGrp+sfb] == AH_INACTIVE) ) in FDKaacEnc_correctThresh()
1287 if ( sfbEnLdData > (sfbThrLdData-qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]) ) { in FDKaacEnc_correctThresh()
1288 sfbThrReducedLdData = qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData; in FDKaacEnc_correctThresh()
1293 ahFlag[elementId][ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_correctThresh()
1296 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_correctThresh()
1344 INT sfb, sfbGrp; in FDKaacEnc_reduceMinSnr() local
1350 sfb = maxSfbPerGroup[ch]--; in FDKaacEnc_reduceMinSnr()
1355 if (ahFlag[elementId][ch][sfbGrp+sfb] != NO_AH && in FDKaacEnc_reduceMinSnr()
1356 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] < SnrLdFac) in FDKaacEnc_reduceMinSnr()
1359 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = SnrLdFac; in FDKaacEnc_reduceMinSnr()
1362 …>sfbWeightedEnergyLdData[sfbGrp+sfb] >= qcOutChan->sfbThresholdLdData[sfbGrp+sfb] - qcOutChan->sfb… in FDKaacEnc_reduceMinSnr()
1364 …an->sfbThresholdLdData[sfbGrp+sfb] = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb] + qcOutChan->s… in FDKaacEnc_reduceMinSnr()
1368 deltaPe -= (peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT); in FDKaacEnc_reduceMinSnr()
1371 …peData->peChannelData[ch].sfbPe[sfbGrp+sfb] = (3*peData->peChannelData[ch].sfbNLines[sfbGrp+sfb]) … in FDKaacEnc_reduceMinSnr()
1372 deltaPe += (peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT); in FDKaacEnc_reduceMinSnr()
1433 INT ch, sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1448 for (sfb=psyOutChannel[ch]->maxSfbPerGroup; sfb<psyOutChannel[ch]->sfbPerGroup; sfb++) { in FDKaacEnc_allowMoreHoles()
1449 peData->peChannelData[ch].sfbPe[sfbGrp+sfb] = 0; in FDKaacEnc_allowMoreHoles()
1457 for (sfb=0; sfb<psyOutChannel[0]->maxSfbPerGroup; sfb++) { in FDKaacEnc_allowMoreHoles()
1459 if (psyOutElement[elementId]->toolsInfo.msMask[sfbGrp+sfb]) { in FDKaacEnc_allowMoreHoles()
1460 FIXP_DBL EnergyLd_L = qcOutChannel[0]->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_allowMoreHoles()
1461 FIXP_DBL EnergyLd_R = qcOutChannel[1]->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_allowMoreHoles()
1464 if ( (ahFlag[elementId][1][sfbGrp+sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1465 … (((FL2FXCONST_DBL(-0.02065512648f)>>1) + (qcOutChannel[0]->sfbMinSnrLdData[sfbGrp+sfb]>>1)) in FDKaacEnc_allowMoreHoles()
1468 ahFlag[elementId][1][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1469 … qcOutChannel[1]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + EnergyLd_R; in FDKaacEnc_allowMoreHoles()
1470 actPe -= peData->peChannelData[1].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1473 else if ( (ahFlag[elementId][0][sfbGrp+sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1474 … (((FL2FXCONST_DBL(-0.02065512648f)>>1) + (qcOutChannel[1]->sfbMinSnrLdData[sfbGrp+sfb]>>1)) in FDKaacEnc_allowMoreHoles()
1477 ahFlag[elementId][0][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1478 … qcOutChannel[0]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + EnergyLd_L; in FDKaacEnc_allowMoreHoles()
1479 actPe -= peData->peChannelData[0].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1515 sfb=startSfb[ch]; in FDKaacEnc_allowMoreHoles()
1518 for (; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_allowMoreHoles()
1519 if ((ahFlag[elementId][ch][sfbGrp+sfb]!=NO_AH) && in FDKaacEnc_allowMoreHoles()
1520 …qcOutChannel[ch]->sfbWeightedEnergyLdData[sfbGrp+sfb] > qcOutChannel[ch]->sfbThresholdLdData[sfbGr… in FDKaacEnc_allowMoreHoles()
1521 minEnLD64 = fixMin(minEnLD64,qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]); in FDKaacEnc_allowMoreHoles()
1522 avgEn += qcOutChannel[ch]->sfbEnergy[sfbGrp+sfb] >> 6; in FDKaacEnc_allowMoreHoles()
1528 sfb=0; in FDKaacEnc_allowMoreHoles()
1569 INT sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1573 sfb = maxSfbPerGroup[ch]--; in FDKaacEnc_allowMoreHoles()
1578 …if (ahFlag[elementId][ch][sfbGrp+sfb] != NO_AH && qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb] < … in FDKaacEnc_allowMoreHoles()
1580 ahFlag[elementId][ch][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1581 …l[ch]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + qcOutChannel[ch]->sfbWeightedE… in FDKaacEnc_allowMoreHoles()
1582 actPe -= peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1610 int ch, sfb, sfbGrp; in FDKaacEnc_resetAHFlags() local
1614 for (sfb=0; sfb<psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_resetAHFlags()
1615 if ( ahFlag[ch][sfbGrp+sfb] == AH_ACTIVE) { in FDKaacEnc_resetAHFlags()
1616 ahFlag[ch][sfbGrp+sfb] = AH_INACTIVE; in FDKaacEnc_resetAHFlags()
2603 int ch,sfb,sfbGrp; in FDKaacEnc_AdjustThresholds() local
2609 for (sfb=0; sfb<psyOutElement[i]->psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_AdjustThresholds()
2610 pQcOutCh->sfbThresholdLdData[sfb+sfbGrp] += pQcOutCh->sfbEnFacLd[sfb+sfbGrp]; in FDKaacEnc_AdjustThresholds()