Lines Matching refs:sfbGrp
386 INT ch, sfb, sfbGrp; in FDKaacEnc_calcThreshExp() local
390 for(sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt;sfbGrp+= psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_calcThreshExp()
392 thrExpLdData = psyOutChannel[ch]->sfbThresholdLdData[sfbGrp+sfb]>>2 ; in FDKaacEnc_calcThreshExp()
393 thrExp[ch][sfbGrp+sfb] = CalcInvLdData(thrExpLdData); in FDKaacEnc_calcThreshExp()
409 INT ch, sfb, sfbGrp, nSfb; in FDKaacEnc_adaptMinSnr() local
420 for (sfbGrp=0; sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_adaptMinSnr()
422 accu += psyOutChannel[ch]->sfbEnergy[sfbGrp+sfb]>>6; in FDKaacEnc_adaptMinSnr()
437 for (sfbGrp=0; sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_adaptMinSnr()
439 if ( (msaParam->startRatio + qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]) < avgEnLD64 ) { in FDKaacEnc_adaptMinSnr()
440 …dbRatio = fMult((avgEnLD64 - qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]),FL2FXCONST_DBL(0.30102… in FDKaacEnc_adaptMinSnr()
443 …qcOutChannel[ch]->sfbMinSnrLdData[sfbGrp+sfb] = (fMult(qcOutChannel[ch]->sfbMinSnrLdData[sfbGrp+sf… in FDKaacEnc_adaptMinSnr()
444 …qcOutChannel[ch]->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(minSnrLimitLD64, qcOutChannel[ch]->sfbMinSn… in FDKaacEnc_adaptMinSnr()
464 INT ch, sfb, sfbGrp; in FDKaacEnc_initAvoidHoleFlag() local
472 INT sfbGrp, sfb; in FDKaacEnc_initAvoidHoleFlag() local
476 for (sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt;sfbGrp+= psyOutChannel[ch]->sfbPerGroup) in FDKaacEnc_initAvoidHoleFlag()
478 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] >>= 1 ; in FDKaacEnc_initAvoidHoleFlag()
481 for (sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt;sfbGrp+= psyOutChannel[ch]->sfbPerGroup) in FDKaacEnc_initAvoidHoleFlag()
483 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
485 qcOutChan->sfbSpreadEnergy[sfbGrp+sfb]) ; in FDKaacEnc_initAvoidHoleFlag()
493 for(sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt;sfbGrp+= psyOutChannel[ch]->sfbPerGroup){ in FDKaacEnc_initAvoidHoleFlag()
497 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp+sfb-1]; in FDKaacEnc_initAvoidHoleFlag()
499 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
502 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp+sfb+1]; in FDKaacEnc_initAvoidHoleFlag()
504 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
508 sfbEn = qcOutChan->sfbEnergy[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
509 sfbEnLdData = qcOutChan->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
518 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
519 fixMin(qcOutChan->sfbMinSnrLdData[sfbGrp+sfb], tmpMinSnrLdData); in FDKaacEnc_initAvoidHoleFlag()
523 …nrLdData = avgEnLdData - sfbEnLdData -(FIXP_DBL)SnrLdMin4 + qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
525 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(tmpMinSnrLdData, in FDKaacEnc_initAvoidHoleFlag()
526 (FIXP_DBL)(qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + SnrLdMin2 )); in FDKaacEnc_initAvoidHoleFlag()
539 for(sfbGrp = 0;sfbGrp < psyOutChanM->sfbCnt;sfbGrp+= psyOutChanM->sfbPerGroup){ in FDKaacEnc_initAvoidHoleFlag()
541 if (toolsInfo->msMask[sfbGrp+sfb]) { in FDKaacEnc_initAvoidHoleFlag()
542 …_DBL maxSfbEnLd = fixMax(qcOutChanM->sfbEnergyLdData[sfbGrp+sfb],qcOutChanS->sfbEnergyLdData[sfbGr… in FDKaacEnc_initAvoidHoleFlag()
545 …if ( ((SnrLdMin5>>1) + (maxSfbEnLd>>1) + (qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb]>>1)) <= FL2FXCON… in FDKaacEnc_initAvoidHoleFlag()
548 maxThrLd = SnrLdMin5 + maxSfbEnLd + qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
550 if (qcOutChanM->sfbEnergy[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
551 sfbMinSnrTmpLd = maxThrLd - qcOutChanM->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
555 …qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] = fixMax(qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb],sfbMinSnr… in FDKaacEnc_initAvoidHoleFlag()
557 if (qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
558 …qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(qcOutChanM->sfbMinSnrLdData[sfbGrp+sfb], (FIXP_DB… in FDKaacEnc_initAvoidHoleFlag()
560 if (qcOutChanS->sfbEnergy[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
561 sfbMinSnrTmpLd = maxThrLd - qcOutChanS->sfbEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_initAvoidHoleFlag()
565 …qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] = fixMax(qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb],sfbMinSnr… in FDKaacEnc_initAvoidHoleFlag()
567 if (qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
568 …qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb] = fixMin(qcOutChanS->sfbMinSnrLdData[sfbGrp+sfb],(FIXP_DBL… in FDKaacEnc_initAvoidHoleFlag()
570 if (qcOutChanM->sfbEnergy[sfbGrp+sfb]>qcOutChanM->sfbSpreadEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
571 qcOutChanS->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
572 fMult(qcOutChanS->sfbEnergy[sfbGrp+sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
574 if (qcOutChanS->sfbEnergy[sfbGrp+sfb]>qcOutChanS->sfbSpreadEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
575 qcOutChanM->sfbSpreadEnergy[sfbGrp+sfb] = in FDKaacEnc_initAvoidHoleFlag()
576 fMult(qcOutChanM->sfbEnergy[sfbGrp+sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
586 for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){ in FDKaacEnc_initAvoidHoleFlag()
588 if ((qcOutChan->sfbSpreadEnergy[sfbGrp+sfb] > qcOutChan->sfbEnergy[sfbGrp+sfb]) in FDKaacEnc_initAvoidHoleFlag()
589 || (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > FL2FXCONST_DBL(0.0f))) { in FDKaacEnc_initAvoidHoleFlag()
590 ahFlag[ch][sfbGrp+sfb] = NO_AH; in FDKaacEnc_initAvoidHoleFlag()
593 ahFlag[ch][sfbGrp+sfb] = AH_INACTIVE; in FDKaacEnc_initAvoidHoleFlag()
683 int sfb, sfbGrp, nLinesSum = 0; in FDKaacEnc_calcWeighting() local
688 … for (sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_calcWeighting()
690 … FIXP_DBL nrgFac12 = CalcInvLdData(psyOutChan->sfbEnergyLdData[sfbGrp+sfb]>>1); /* nrg^(1/2) */ in FDKaacEnc_calcWeighting()
691 … FIXP_DBL nrgFac14 = CalcInvLdData(psyOutChan->sfbEnergyLdData[sfbGrp+sfb]>>2); /* nrg^(1/4) */ in FDKaacEnc_calcWeighting()
694 … nLinesSum += peData->peChannelData[ch].sfbNLines[sfbGrp+sfb]; /* relevant lines */ in FDKaacEnc_calcWeighting()
695 … nrgTotal += ( psyOutChan->sfbEnergy[sfbGrp+sfb] >> 6 ); /* sum up nrg */ in FDKaacEnc_calcWeighting()
713 … for (sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_calcWeighting()
719 if ((ch == 1) && (toolsInfo->msMask[sfbGrp+sfb])) { in FDKaacEnc_calcWeighting()
726 if ( (sfbExePatch) && (psyOutChan->sfbEnergy[sfbGrp+sfb]>FL2FXCONST_DBL(0.f)) ) in FDKaacEnc_calcWeighting()
730 …hannel[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_14 + (psyOutChan->sfbEnergyLdData[sfbGrp+sfb]+(ps… in FDKaacEnc_calcWeighting()
733 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_12 + psyOutChan->sfbEnergyLdData[sfbGrp+sfb… in FDKaacEnc_calcWeighting()
736 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = ( (nrgFacLd_34 + (psyOutChan->sfbEnergyLdData[sfbGrp+sf… in FDKaacEnc_calcWeighting()
738 …qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb] = fixMin(qcOutChannel[ch]->sfbEnFacLd[sfbGrp+sfb],(FIXP_D… in FDKaacEnc_calcWeighting()
810 int sfb, sfbGrp; in FDKaacEnc_peCalculation() local
813 … for (sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_peCalculation()
815 …cOutCh->sfbWeightedEnergyLdData[sfb+sfbGrp] = pQcOutCh->sfbEnergyLdData[sfb+sfbGrp] - pQcOutCh->sf… in FDKaacEnc_peCalculation()
816 pQcOutCh->sfbThresholdLdData[sfb+sfbGrp] -= pQcOutCh->sfbEnFacLd[sfb+sfbGrp]; in FDKaacEnc_peCalculation()
840 INT ch, sfb,sfbGrp; in FDKaacEnc_FDKaacEnc_calcPeNoAH() local
847 for(sfbGrp = 0;sfbGrp < psyOutChannel[ch]->sfbCnt;sfbGrp+= psyOutChannel[ch]->sfbPerGroup){ in FDKaacEnc_FDKaacEnc_calcPeNoAH()
849 if(ahFlag[ch][sfbGrp+sfb] < AH_ACTIVE) { in FDKaacEnc_FDKaacEnc_calcPeNoAH()
850 pe_tmp += peChanData->sfbPe[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
851 constPart_tmp += peChanData->sfbConstPart[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
852 nActiveLines_tmp += peChanData->sfbNActiveLines[sfbGrp+sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
879 INT ch, sfb, sfbGrp; in FDKaacEnc_reduceThresholdsCBR() local
885 for(sfbGrp = 0; sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+= psyOutChannel[ch]->sfbPerGroup){ in FDKaacEnc_reduceThresholdsCBR()
887 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
888 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
889 sfbThrExp = thrExp[ch][sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsCBR()
890 if ((sfbEnLdData > sfbThrLdData) && (ahFlag[ch][sfbGrp+sfb] != AH_ACTIVE)) { in FDKaacEnc_reduceThresholdsCBR()
905 if ( ((sfbThrReducedLdData - sfbEnLdData) > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] ) in FDKaacEnc_reduceThresholdsCBR()
906 && (ahFlag[ch][sfbGrp+sfb] != NO_AH) ) in FDKaacEnc_reduceThresholdsCBR()
908 if (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > (FL2FXCONST_DBL(-1.0f) - sfbEnLdData) ){ in FDKaacEnc_reduceThresholdsCBR()
909 …sfbThrReducedLdData = fixMax((qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData), sfbThrLdData); in FDKaacEnc_reduceThresholdsCBR()
912 ahFlag[ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsCBR()
920 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsCBR()
937 INT sfbGrp, sfb; in FDKaacEnc_calcChaosMeasure() local
943 for (sfbGrp=0; sfbGrp<psyOutChannel->sfbCnt; sfbGrp+=psyOutChannel->sfbPerGroup) { in FDKaacEnc_calcChaosMeasure()
945 … if (psyOutChannel->sfbEnergyLdData[sfbGrp+sfb] > psyOutChannel->sfbThresholdLdData[sfbGrp+sfb]) { in FDKaacEnc_calcChaosMeasure()
946 frameFormFactor += (CalcInvLdData(sfbFormFactorLdData[sfbGrp+sfb])>>SCALE_FORM_FAC); in FDKaacEnc_calcChaosMeasure()
947 …frameNLines += (psyOutChannel->sfbOffsets[sfbGrp+sfb+1] - psyOutChannel->sfbOffsets[sfbGrp+sfb… in FDKaacEnc_calcChaosMeasure()
948 frameEnergy += (psyOutChannel->sfbEnergy[sfbGrp+sfb]>>SCALE_NRGS); in FDKaacEnc_calcChaosMeasure()
981 INT ch, sfbGrp, sfb; in FDKaacEnc_reduceThresholdsVBR() local
1010 for (sfbGrp=0; sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup, groupCnt++) { in FDKaacEnc_reduceThresholdsVBR()
1013 chGroupEnergy[groupCnt][ch] += (psyOutChan->sfbEnergy[sfbGrp+sfb]>>SCALE_GROUP_ENERGY); in FDKaacEnc_reduceThresholdsVBR()
1055 INT sfbGrp, groupCnt=0; in FDKaacEnc_reduceThresholdsVBR() local
1056 for (sfbGrp=0; sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup,groupCnt++) { in FDKaacEnc_reduceThresholdsVBR()
1086 for (sfbGrp=0; sfbGrp<psyOutChan->sfbCnt; sfbGrp+=psyOutChan->sfbPerGroup) { in FDKaacEnc_reduceThresholdsVBR()
1089 sfbEnLdData = (qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]); in FDKaacEnc_reduceThresholdsVBR()
1090 sfbThrLdData = (qcOutChan->sfbThresholdLdData[sfbGrp+sfb]); in FDKaacEnc_reduceThresholdsVBR()
1091 sfbThrExp = thrExp[ch][sfbGrp+sfb]; in FDKaacEnc_reduceThresholdsVBR()
1093 …if ( (sfbThrLdData>=MIN_LDTHRESH) && (sfbEnLdData > sfbThrLdData) && (ahFlag[ch][sfbGrp+sfb] != AH… in FDKaacEnc_reduceThresholdsVBR()
1132 if ( ((sfbThrReducedLdData - sfbEnLdData) > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] ) in FDKaacEnc_reduceThresholdsVBR()
1133 && (ahFlag[ch][sfbGrp+sfb] != NO_AH) ) in FDKaacEnc_reduceThresholdsVBR()
1135 if (qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] > (FL2FXCONST_DBL(-1.0f) - sfbEnLdData) ){ in FDKaacEnc_reduceThresholdsVBR()
1136 …sfbThrReducedLdData = fixMax((qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData), sfbThrLdData); in FDKaacEnc_reduceThresholdsVBR()
1139 ahFlag[ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsVBR()
1152 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsVBR()
1176 INT ch, sfb, sfbGrp; in FDKaacEnc_correctThresh() local
1210 for(sfbGrp = 0; sfbGrp < psyOutChan->sfbCnt; sfbGrp+= psyOutChan->sfbPerGroup){ in FDKaacEnc_correctThresh()
1213 if ( peChanData->sfbNActiveLines[sfbGrp+sfb] == 0 ) { in FDKaacEnc_correctThresh()
1214 sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_correctThresh()
1220 …sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] = CalcLdInt(peChanData->sfbNActiveLines[sfbGrp+sf… in FDKaacEnc_correctThresh()
1222 if ( ((ahFlag[elementId][ch][sfbGrp+sfb] < AH_ACTIVE) || (deltaPe > 0)) && in FDKaacEnc_correctThresh()
1223 peChanData->sfbNActiveLines[sfbGrp+sfb] != 0 ) in FDKaacEnc_correctThresh()
1225 if (thrExp[elementId][ch][sfbGrp+sfb] > -redVal[elementId]) { in FDKaacEnc_correctThresh()
1230 …int minScale = fixMin(CountLeadingBits(thrExp[elementId][ch][sfbGrp+sfb]), CountLeadingBits(redVal… in FDKaacEnc_correctThresh()
1233 …FIXP_DBL sumLd = CalcLdData(scaleValue(thrExp[elementId][ch][sfbGrp+sfb], minScale) + scaleValue(r… in FDKaacEnc_correctThresh()
1237 …sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] -… in FDKaacEnc_correctThresh()
1240 … if ( sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] > (FL2FXCONST_DBL(-1.f) + sumLd) ) { in FDKaacEnc_correctThresh()
1241 …sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb] -… in FDKaacEnc_correctThresh()
1244 … sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = sfbNActiveLinesLdData[elementId][ch][sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1248 … normFactorInt += (INT)CalcInvLdData(sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb]); in FDKaacEnc_correctThresh()
1250 else sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(1.0f); in FDKaacEnc_correctThresh()
1252 else sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_correctThresh()
1272 for(sfbGrp = 0;sfbGrp < psyOutChan->sfbCnt;sfbGrp+= psyOutChan->sfbPerGroup){ in FDKaacEnc_correctThresh()
1275 if (peChanData->sfbNActiveLines[sfbGrp+sfb] > 0) { in FDKaacEnc_correctThresh()
1278 if ( (sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb]==FL2FXCONST_DBL(-1.0f)) || in FDKaacEnc_correctThresh()
1285 …ata(sfbPeFactorsLdData[elementId][ch][sfbGrp+sfb] + normFactorLdData - sfbNActiveLinesLdData[eleme… in FDKaacEnc_correctThresh()
1293 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1294 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_correctThresh()
1309 … if ( (sfbThrReducedLdData - sfbEnLdData > qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]) && in FDKaacEnc_correctThresh()
1310 (ahFlag[elementId][ch][sfbGrp+sfb] == AH_INACTIVE) ) in FDKaacEnc_correctThresh()
1313 if ( sfbEnLdData > (sfbThrLdData-qcOutChan->sfbMinSnrLdData[sfbGrp+sfb]) ) { in FDKaacEnc_correctThresh()
1314 sfbThrReducedLdData = qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] + sfbEnLdData; in FDKaacEnc_correctThresh()
1319 ahFlag[elementId][ch][sfbGrp+sfb] = AH_ACTIVE; in FDKaacEnc_correctThresh()
1322 qcOutChan->sfbThresholdLdData[sfbGrp+sfb] = sfbThrReducedLdData; in FDKaacEnc_correctThresh()
1370 INT sfb, sfbGrp; in FDKaacEnc_reduceMinSnr() local
1379 for (sfbGrp = 0; sfbGrp < sfbCnt[ch]; sfbGrp += sfbPerGroup[ch]) { in FDKaacEnc_reduceMinSnr()
1381 if (ahFlag[elementId][ch][sfbGrp+sfb] != NO_AH && in FDKaacEnc_reduceMinSnr()
1382 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] < SnrLdFac) in FDKaacEnc_reduceMinSnr()
1385 qcOutChan->sfbMinSnrLdData[sfbGrp+sfb] = SnrLdFac; in FDKaacEnc_reduceMinSnr()
1388 …Chan->sfbWeightedEnergyLdData[sfbGrp+sfb] >= qcOutChan->sfbThresholdLdData[sfbGrp+sfb] - qcOutChan… in FDKaacEnc_reduceMinSnr()
1390 …OutChan->sfbThresholdLdData[sfbGrp+sfb] = qcOutChan->sfbWeightedEnergyLdData[sfbGrp+sfb] + qcOutCh… in FDKaacEnc_reduceMinSnr()
1394 deltaPe -= (peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT); in FDKaacEnc_reduceMinSnr()
1397 …peData->peChannelData[ch].sfbPe[sfbGrp+sfb] = (3*peData->peChannelData[ch].sfbNLines[sfbGrp+sfb]) … in FDKaacEnc_reduceMinSnr()
1398 deltaPe += (peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT); in FDKaacEnc_reduceMinSnr()
1459 INT ch, sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1473 for(sfbGrp=0; sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+= psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_allowMoreHoles()
1475 peData->peChannelData[ch].sfbPe[sfbGrp+sfb] = 0; in FDKaacEnc_allowMoreHoles()
1484 for(sfbGrp=0; sfbGrp < psyOutChannel[0]->sfbCnt; sfbGrp+=psyOutChannel[0]->sfbPerGroup) { in FDKaacEnc_allowMoreHoles()
1485 if (psyOutElement[elementId]->toolsInfo.msMask[sfbGrp+sfb]) { in FDKaacEnc_allowMoreHoles()
1486 FIXP_DBL EnergyLd_L = qcOutChannel[0]->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_allowMoreHoles()
1487 FIXP_DBL EnergyLd_R = qcOutChannel[1]->sfbWeightedEnergyLdData[sfbGrp+sfb]; in FDKaacEnc_allowMoreHoles()
1490 if ( (ahFlag[elementId][1][sfbGrp+sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1491 … (((FL2FXCONST_DBL(-0.02065512648f)>>1) + (qcOutChannel[0]->sfbMinSnrLdData[sfbGrp+sfb]>>1)) in FDKaacEnc_allowMoreHoles()
1494 ahFlag[elementId][1][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1495 … qcOutChannel[1]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + EnergyLd_R; in FDKaacEnc_allowMoreHoles()
1496 actPe -= peData->peChannelData[1].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1499 else if ( (ahFlag[elementId][0][sfbGrp+sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1500 … (((FL2FXCONST_DBL(-0.02065512648f)>>1) + (qcOutChannel[1]->sfbMinSnrLdData[sfbGrp+sfb]>>1)) in FDKaacEnc_allowMoreHoles()
1503 ahFlag[elementId][0][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1504 … qcOutChannel[0]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + EnergyLd_L; in FDKaacEnc_allowMoreHoles()
1505 actPe -= peData->peChannelData[0].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1540 sfbGrp=0; in FDKaacEnc_allowMoreHoles()
1545 if ((ahFlag[elementId][ch][sfbGrp+sfb]!=NO_AH) && in FDKaacEnc_allowMoreHoles()
1546 …(qcOutChannel[ch]->sfbWeightedEnergyLdData[sfbGrp+sfb] > qcOutChannel[ch]->sfbThresholdLdData[sfbG… in FDKaacEnc_allowMoreHoles()
1547 minEnLD64 = fixMin(minEnLD64,qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb]); in FDKaacEnc_allowMoreHoles()
1548 avgEn += qcOutChannel[ch]->sfbEnergy[sfbGrp+sfb] >> 6; in FDKaacEnc_allowMoreHoles()
1553 sfbGrp += psyOutChannel[ch]->sfbPerGroup; in FDKaacEnc_allowMoreHoles()
1556 } while (sfbGrp < psyOutChannel[ch]->sfbCnt); in FDKaacEnc_allowMoreHoles()
1595 INT sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1602 for (sfbGrp = 0; sfbGrp < sfbCnt[ch]; sfbGrp += sfbPerGroup[ch]) { in FDKaacEnc_allowMoreHoles()
1604 …if (ahFlag[elementId][ch][sfbGrp+sfb] != NO_AH && qcOutChannel[ch]->sfbEnergyLdData[sfbGrp+sfb] < … in FDKaacEnc_allowMoreHoles()
1606 ahFlag[elementId][ch][sfbGrp+sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1607 …hannel[ch]->sfbThresholdLdData[sfbGrp+sfb] = FL2FXCONST_DBL(0.015625f) + qcOutChannel[ch]->sfbWeig… in FDKaacEnc_allowMoreHoles()
1608 actPe -= peData->peChannelData[ch].sfbPe[sfbGrp+sfb]>>PE_CONSTPART_SHIFT; in FDKaacEnc_allowMoreHoles()
1636 int ch, sfb, sfbGrp; in FDKaacEnc_resetAHFlags() local
1639 for (sfbGrp=0; sfbGrp < psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutChannel[ch]->sfbPerGroup) { in FDKaacEnc_resetAHFlags()
1641 if ( ahFlag[ch][sfbGrp+sfb] == AH_ACTIVE) { in FDKaacEnc_resetAHFlags()
1642 ahFlag[ch][sfbGrp+sfb] = AH_INACTIVE; in FDKaacEnc_resetAHFlags()
2638 int ch,sfb,sfbGrp; in FDKaacEnc_AdjustThresholds() local
2643 …for (sfbGrp = 0;sfbGrp < psyOutElement[i]->psyOutChannel[ch]->sfbCnt; sfbGrp+=psyOutElement[i]->ps… in FDKaacEnc_AdjustThresholds()
2645 pQcOutCh->sfbThresholdLdData[sfb+sfbGrp] += pQcOutCh->sfbEnFacLd[sfb+sfbGrp]; in FDKaacEnc_AdjustThresholds()