Lines Matching refs:sfb
447 INT ch, sfb, sfbGrp; in FDKaacEnc_calcThreshExp() local
453 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcThreshExp()
454 thrExpLdData = psyOutChannel[ch]->sfbThresholdLdData[sfbGrp + sfb] >> 2; in FDKaacEnc_calcThreshExp()
455 thrExp[ch][sfbGrp + sfb] = CalcInvLdData(thrExpLdData); in FDKaacEnc_calcThreshExp()
470 INT ch, sfb, sfbGrp, nSfb; in FDKaacEnc_adaptMinSnr() local
494 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_adaptMinSnr()
495 accu += psyOutChannel[ch]->sfbEnergy[sfbGrp + sfb] >> 6; in FDKaacEnc_adaptMinSnr()
518 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_adaptMinSnr()
544 INT ch, sfb, sfbGrp; in FDKaacEnc_initAvoidHoleFlag() local
557 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) in FDKaacEnc_initAvoidHoleFlag()
558 qcOutChan->sfbSpreadEnergy[sfbGrp + sfb] >>= 1; in FDKaacEnc_initAvoidHoleFlag()
562 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) in FDKaacEnc_initAvoidHoleFlag()
563 qcOutChan->sfbSpreadEnergy[sfbGrp + sfb] = fMult( in FDKaacEnc_initAvoidHoleFlag()
564 FL2FXCONST_DBL(0.63f), qcOutChan->sfbSpreadEnergy[sfbGrp + sfb]); in FDKaacEnc_initAvoidHoleFlag()
574 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
576 if (sfb > 0) in FDKaacEnc_initAvoidHoleFlag()
577 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp + sfb - 1]; in FDKaacEnc_initAvoidHoleFlag()
579 sfbEnm1 = qcOutChan->sfbEnergy[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
581 if (sfb < psyOutChannel[ch]->maxSfbPerGroup - 1) in FDKaacEnc_initAvoidHoleFlag()
582 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp + sfb + 1]; in FDKaacEnc_initAvoidHoleFlag()
584 sfbEnp1 = qcOutChan->sfbEnergy[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
588 sfbEn = qcOutChan->sfbEnergy[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
589 sfbEnLdData = qcOutChan->sfbEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
600 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] = fixMin( in FDKaacEnc_initAvoidHoleFlag()
601 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb], tmpMinSnrLdData); in FDKaacEnc_initAvoidHoleFlag()
608 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
610 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] = in FDKaacEnc_initAvoidHoleFlag()
612 (FIXP_DBL)(qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] + in FDKaacEnc_initAvoidHoleFlag()
628 for (sfb = 0; sfb < psyOutChanM->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
629 if (toolsInfo->msMask[sfbGrp + sfb]) { in FDKaacEnc_initAvoidHoleFlag()
631 fixMax(qcOutChanM->sfbEnergyLdData[sfbGrp + sfb], in FDKaacEnc_initAvoidHoleFlag()
632 qcOutChanS->sfbEnergyLdData[sfbGrp + sfb]); in FDKaacEnc_initAvoidHoleFlag()
636 (qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb] >> 1)) <= in FDKaacEnc_initAvoidHoleFlag()
641 qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
643 if (qcOutChanM->sfbEnergy[sfbGrp + sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
645 maxThrLd - qcOutChanM->sfbEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
649 qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb] = in FDKaacEnc_initAvoidHoleFlag()
650 fixMax(qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb], sfbMinSnrTmpLd); in FDKaacEnc_initAvoidHoleFlag()
652 if (qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
653 qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb] = fixMin( in FDKaacEnc_initAvoidHoleFlag()
654 qcOutChanM->sfbMinSnrLdData[sfbGrp + sfb], (FIXP_DBL)SnrLdFac); in FDKaacEnc_initAvoidHoleFlag()
656 if (qcOutChanS->sfbEnergy[sfbGrp + sfb] > FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
658 maxThrLd - qcOutChanS->sfbEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_initAvoidHoleFlag()
662 qcOutChanS->sfbMinSnrLdData[sfbGrp + sfb] = in FDKaacEnc_initAvoidHoleFlag()
663 fixMax(qcOutChanS->sfbMinSnrLdData[sfbGrp + sfb], sfbMinSnrTmpLd); in FDKaacEnc_initAvoidHoleFlag()
665 if (qcOutChanS->sfbMinSnrLdData[sfbGrp + sfb] <= FL2FXCONST_DBL(0.0f)) in FDKaacEnc_initAvoidHoleFlag()
666 qcOutChanS->sfbMinSnrLdData[sfbGrp + sfb] = fixMin( in FDKaacEnc_initAvoidHoleFlag()
667 qcOutChanS->sfbMinSnrLdData[sfbGrp + sfb], (FIXP_DBL)SnrLdFac); in FDKaacEnc_initAvoidHoleFlag()
669 if (qcOutChanM->sfbEnergy[sfbGrp + sfb] > in FDKaacEnc_initAvoidHoleFlag()
670 qcOutChanM->sfbSpreadEnergy[sfbGrp + sfb]) in FDKaacEnc_initAvoidHoleFlag()
671 qcOutChanS->sfbSpreadEnergy[sfbGrp + sfb] = fMult( in FDKaacEnc_initAvoidHoleFlag()
672 qcOutChanS->sfbEnergy[sfbGrp + sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
674 if (qcOutChanS->sfbEnergy[sfbGrp + sfb] > in FDKaacEnc_initAvoidHoleFlag()
675 qcOutChanS->sfbSpreadEnergy[sfbGrp + sfb]) in FDKaacEnc_initAvoidHoleFlag()
676 qcOutChanM->sfbSpreadEnergy[sfbGrp + sfb] = fMult( in FDKaacEnc_initAvoidHoleFlag()
677 qcOutChanM->sfbEnergy[sfbGrp + sfb], FL2FXCONST_DBL(0.9f)); in FDKaacEnc_initAvoidHoleFlag()
690 for (sfb = 0; sfb < psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_initAvoidHoleFlag()
691 if ((qcOutChan->sfbSpreadEnergy[sfbGrp + sfb] > in FDKaacEnc_initAvoidHoleFlag()
692 qcOutChan->sfbEnergy[sfbGrp + sfb]) || in FDKaacEnc_initAvoidHoleFlag()
693 (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] > FL2FXCONST_DBL(0.0f))) { in FDKaacEnc_initAvoidHoleFlag()
694 ahFlag[ch][sfbGrp + sfb] = NO_AH; in FDKaacEnc_initAvoidHoleFlag()
696 ahFlag[ch][sfbGrp + sfb] = AH_INACTIVE; in FDKaacEnc_initAvoidHoleFlag()
786 int sfb, sfbGrp, nLinesSum = 0; in FDKaacEnc_calcWeighting() local
794 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcWeighting()
796 psyOutChan->sfbEnergyLdData[sfbGrp + sfb] >> 1); /* nrg^(1/2) */ in FDKaacEnc_calcWeighting()
798 psyOutChan->sfbEnergyLdData[sfbGrp + sfb] >> 2); /* nrg^(1/4) */ in FDKaacEnc_calcWeighting()
802 .sfbNLines[sfbGrp + sfb]; /* relevant lines */ in FDKaacEnc_calcWeighting()
804 (psyOutChan->sfbEnergy[sfbGrp + sfb] >> 6); /* sum up nrg */ in FDKaacEnc_calcWeighting()
832 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcWeighting()
836 if ((ch == 1) && (toolsInfo->msMask[sfbGrp + sfb])) { in FDKaacEnc_calcWeighting()
843 (psyOutChan->sfbEnergy[sfbGrp + sfb] > FL2FXCONST_DBL(0.f))) { in FDKaacEnc_calcWeighting()
847 qcOutChannel[ch]->sfbEnFacLd[sfbGrp + sfb] = in FDKaacEnc_calcWeighting()
849 (psyOutChan->sfbEnergyLdData[sfbGrp + sfb] + in FDKaacEnc_calcWeighting()
850 (psyOutChan->sfbEnergyLdData[sfbGrp + sfb] >> 1))) >> in FDKaacEnc_calcWeighting()
854 qcOutChannel[ch]->sfbEnFacLd[sfbGrp + sfb] = in FDKaacEnc_calcWeighting()
855 ((nrgFacLd_12 + psyOutChan->sfbEnergyLdData[sfbGrp + sfb]) >> in FDKaacEnc_calcWeighting()
858 qcOutChannel[ch]->sfbEnFacLd[sfbGrp + sfb] = in FDKaacEnc_calcWeighting()
860 (psyOutChan->sfbEnergyLdData[sfbGrp + sfb] >> 1)) >> in FDKaacEnc_calcWeighting()
863 qcOutChannel[ch]->sfbEnFacLd[sfbGrp + sfb] = in FDKaacEnc_calcWeighting()
864 fixMin(qcOutChannel[ch]->sfbEnFacLd[sfbGrp + sfb], (FIXP_DBL)0); in FDKaacEnc_calcWeighting()
926 int sfb, sfbGrp; in FDKaacEnc_peCalculation() local
931 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_peCalculation()
932 pQcOutCh->sfbWeightedEnergyLdData[sfb + sfbGrp] = in FDKaacEnc_peCalculation()
933 pQcOutCh->sfbEnergyLdData[sfb + sfbGrp] - in FDKaacEnc_peCalculation()
934 pQcOutCh->sfbEnFacLd[sfb + sfbGrp]; in FDKaacEnc_peCalculation()
935 pQcOutCh->sfbThresholdLdData[sfb + sfbGrp] -= in FDKaacEnc_peCalculation()
936 pQcOutCh->sfbEnFacLd[sfb + sfbGrp]; in FDKaacEnc_peCalculation()
955 INT ch, sfb, sfbGrp; in FDKaacEnc_FDKaacEnc_calcPeNoAH() local
964 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_FDKaacEnc_calcPeNoAH()
965 if (ahFlag[ch][sfbGrp + sfb] < AH_ACTIVE) { in FDKaacEnc_FDKaacEnc_calcPeNoAH()
966 pe_tmp += peChanData->sfbPe[sfbGrp + sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
968 peChanData->sfbConstPart[sfbGrp + sfb] >> CONSTPART_HEADROOM; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
969 nActiveLines_tmp += peChanData->sfbNActiveLines[sfbGrp + sfb]; in FDKaacEnc_FDKaacEnc_calcPeNoAH()
994 INT ch, sfb, sfbGrp; in FDKaacEnc_reduceThresholdsCBR() local
1002 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_reduceThresholdsCBR()
1003 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_reduceThresholdsCBR()
1004 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp + sfb]; in FDKaacEnc_reduceThresholdsCBR()
1005 sfbThrExp = thrExp[ch][sfbGrp + sfb]; in FDKaacEnc_reduceThresholdsCBR()
1007 (ahFlag[ch][sfbGrp + sfb] != AH_ACTIVE)) { in FDKaacEnc_reduceThresholdsCBR()
1026 (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] + sfbEnLdData)) && in FDKaacEnc_reduceThresholdsCBR()
1027 (ahFlag[ch][sfbGrp + sfb] != NO_AH)) { in FDKaacEnc_reduceThresholdsCBR()
1028 if (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] > in FDKaacEnc_reduceThresholdsCBR()
1031 (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] + sfbEnLdData), in FDKaacEnc_reduceThresholdsCBR()
1035 ahFlag[ch][sfbGrp + sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsCBR()
1046 qcOutChan->sfbThresholdLdData[sfbGrp + sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsCBR()
1064 INT sfbGrp, sfb; in FDKaacEnc_calcChaosMeasure() local
1072 for (sfb = 0; sfb < psyOutChannel->maxSfbPerGroup; sfb++) { in FDKaacEnc_calcChaosMeasure()
1073 if (psyOutChannel->sfbEnergyLdData[sfbGrp + sfb] > in FDKaacEnc_calcChaosMeasure()
1074 psyOutChannel->sfbThresholdLdData[sfbGrp + sfb]) { in FDKaacEnc_calcChaosMeasure()
1075 frameFormFactor += (CalcInvLdData(sfbFormFactorLdData[sfbGrp + sfb]) >> in FDKaacEnc_calcChaosMeasure()
1077 frameNLines += (psyOutChannel->sfbOffsets[sfbGrp + sfb + 1] - in FDKaacEnc_calcChaosMeasure()
1078 psyOutChannel->sfbOffsets[sfbGrp + sfb]); in FDKaacEnc_calcChaosMeasure()
1079 frameEnergy += (psyOutChannel->sfbEnergy[sfbGrp + sfb] >> SCALE_NRGS); in FDKaacEnc_calcChaosMeasure()
1114 INT ch, sfbGrp, sfb; in FDKaacEnc_reduceThresholdsVBR() local
1145 for (sfb = 0; sfb < psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_reduceThresholdsVBR()
1147 (psyOutChan->sfbEnergy[sfbGrp + sfb] >> SCALE_GROUP_ENERGY); in FDKaacEnc_reduceThresholdsVBR()
1240 for (sfb = 0; sfb < psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_reduceThresholdsVBR()
1241 sfbEnLdData = (qcOutChan->sfbWeightedEnergyLdData[sfbGrp + sfb]); in FDKaacEnc_reduceThresholdsVBR()
1242 sfbThrLdData = (qcOutChan->sfbThresholdLdData[sfbGrp + sfb]); in FDKaacEnc_reduceThresholdsVBR()
1243 sfbThrExp = thrExp[ch][sfbGrp + sfb]; in FDKaacEnc_reduceThresholdsVBR()
1246 (ahFlag[ch][sfbGrp + sfb] != AH_ACTIVE)) { in FDKaacEnc_reduceThresholdsVBR()
1249 const int groupNumber = (int)sfb / psyOutChan->sfbPerGroup; in FDKaacEnc_reduceThresholdsVBR()
1290 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb]) && in FDKaacEnc_reduceThresholdsVBR()
1291 (ahFlag[ch][sfbGrp + sfb] != NO_AH)) { in FDKaacEnc_reduceThresholdsVBR()
1292 if (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] > in FDKaacEnc_reduceThresholdsVBR()
1295 (qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] + sfbEnLdData), in FDKaacEnc_reduceThresholdsVBR()
1299 ahFlag[ch][sfbGrp + sfb] = AH_ACTIVE; in FDKaacEnc_reduceThresholdsVBR()
1315 qcOutChan->sfbThresholdLdData[sfbGrp + sfb] = sfbThrReducedLdData; in FDKaacEnc_reduceThresholdsVBR()
1335 INT ch, sfb, sfbGrp; in FDKaacEnc_correctThresh() local
1378 for (sfb = 0; sfb < psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_correctThresh()
1379 if (peChanData->sfbNActiveLines[sfbGrp + sfb] == 0) { in FDKaacEnc_correctThresh()
1380 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1386 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1387 CalcLdInt(peChanData->sfbNActiveLines[sfbGrp + sfb]); in FDKaacEnc_correctThresh()
1389 if (((ahFlag[elementId][ch][sfbGrp + sfb] < AH_ACTIVE) || in FDKaacEnc_correctThresh()
1391 peChanData->sfbNActiveLines[sfbGrp + sfb] != 0) { in FDKaacEnc_correctThresh()
1392 if (thrExp[elementId][ch][sfbGrp + sfb] > -redVal_m) { in FDKaacEnc_correctThresh()
1400 CountLeadingBits(thrExp[elementId][ch][sfbGrp + sfb]), in FDKaacEnc_correctThresh()
1406 CalcLdData(scaleValue(thrExp[elementId][ch][sfbGrp + sfb], in FDKaacEnc_correctThresh()
1412 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1413 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] - in FDKaacEnc_correctThresh()
1416 if (sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] > in FDKaacEnc_correctThresh()
1418 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1419 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] - in FDKaacEnc_correctThresh()
1422 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1423 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb]; in FDKaacEnc_correctThresh()
1428 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb]); in FDKaacEnc_correctThresh()
1430 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1433 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] = in FDKaacEnc_correctThresh()
1457 for (sfb = 0; sfb < psyOutChan->maxSfbPerGroup; sfb++) { in FDKaacEnc_correctThresh()
1458 if (peChanData->sfbNActiveLines[sfbGrp + sfb] > 0) { in FDKaacEnc_correctThresh()
1460 if ((sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] == in FDKaacEnc_correctThresh()
1467 sfbPeFactorsLdData[elementId][ch][sfbGrp + sfb] + in FDKaacEnc_correctThresh()
1469 sfbNActiveLinesLdData[elementId][ch][sfbGrp + sfb] - in FDKaacEnc_correctThresh()
1479 sfbThrLdData = qcOutChan->sfbThresholdLdData[sfbGrp + sfb]; in FDKaacEnc_correctThresh()
1480 sfbEnLdData = qcOutChan->sfbWeightedEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_correctThresh()
1494 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb]) && in FDKaacEnc_correctThresh()
1495 (ahFlag[elementId][ch][sfbGrp + sfb] == AH_INACTIVE)) { in FDKaacEnc_correctThresh()
1499 (sfbThrLdData - qcOutChan->sfbMinSnrLdData[sfbGrp + sfb])) { in FDKaacEnc_correctThresh()
1501 qcOutChan->sfbMinSnrLdData[sfbGrp + sfb] + sfbEnLdData; in FDKaacEnc_correctThresh()
1505 ahFlag[elementId][ch][sfbGrp + sfb] = AH_ACTIVE; in FDKaacEnc_correctThresh()
1508 qcOutChan->sfbThresholdLdData[sfbGrp + sfb] = sfbThrReducedLdData; in FDKaacEnc_correctThresh()
1562 INT sfb, deltaPe = 0; in FDKaacEnc_reduceMinSnr() local
1564 for (sfb = globalMaxSfb; sfb < psyOutChan->sfbCnt; in FDKaacEnc_reduceMinSnr()
1565 sfb += psyOutChan->sfbPerGroup) { in FDKaacEnc_reduceMinSnr()
1566 if (ahFlag[elementId][ch][sfb] != NO_AH && in FDKaacEnc_reduceMinSnr()
1567 qcOutChan->sfbMinSnrLdData[sfb] < SnrLdFac && in FDKaacEnc_reduceMinSnr()
1568 (qcOutChan->sfbWeightedEnergyLdData[sfb] > in FDKaacEnc_reduceMinSnr()
1569 qcOutChan->sfbThresholdLdData[sfb] - SnrLdFac)) { in FDKaacEnc_reduceMinSnr()
1571 qcOutChan->sfbMinSnrLdData[sfb] = SnrLdFac; in FDKaacEnc_reduceMinSnr()
1572 qcOutChan->sfbThresholdLdData[sfb] = in FDKaacEnc_reduceMinSnr()
1573 qcOutChan->sfbWeightedEnergyLdData[sfb] + SnrLdFac; in FDKaacEnc_reduceMinSnr()
1577 deltaPe -= peData->peChannelData[ch].sfbPe[sfb]; in FDKaacEnc_reduceMinSnr()
1580 peData->peChannelData[ch].sfbPe[sfb] = in FDKaacEnc_reduceMinSnr()
1581 (3 * peData->peChannelData[ch].sfbNLines[sfb]) in FDKaacEnc_reduceMinSnr()
1583 deltaPe += peData->peChannelData[ch].sfbPe[sfb]; in FDKaacEnc_reduceMinSnr()
1631 INT ch, sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1646 for (sfb = psyOutChannel[ch]->maxSfbPerGroup; in FDKaacEnc_allowMoreHoles()
1647 sfb < psyOutChannel[ch]->sfbPerGroup; sfb++) { in FDKaacEnc_allowMoreHoles()
1648 peData->peChannelData[ch].sfbPe[sfbGrp + sfb] = 0; in FDKaacEnc_allowMoreHoles()
1656 for (sfb = psyOutChannel[0]->maxSfbPerGroup - 1; sfb >= 0; sfb--) { in FDKaacEnc_allowMoreHoles()
1659 if (psyOutElement[elementId]->toolsInfo.msMask[sfbGrp + sfb]) { in FDKaacEnc_allowMoreHoles()
1661 qcOutChannel[0]->sfbWeightedEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_allowMoreHoles()
1663 qcOutChannel[1]->sfbWeightedEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_allowMoreHoles()
1666 if ((ahFlag[elementId][1][sfbGrp + sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1668 (qcOutChannel[0]->sfbMinSnrLdData[sfbGrp + sfb] >> 1)) > in FDKaacEnc_allowMoreHoles()
1670 ahFlag[elementId][1][sfbGrp + sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1671 qcOutChannel[1]->sfbThresholdLdData[sfbGrp + sfb] = in FDKaacEnc_allowMoreHoles()
1673 actPe -= peData->peChannelData[1].sfbPe[sfbGrp + sfb] >> in FDKaacEnc_allowMoreHoles()
1677 else if ((ahFlag[elementId][0][sfbGrp + sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1679 (qcOutChannel[1]->sfbMinSnrLdData[sfbGrp + sfb] >> in FDKaacEnc_allowMoreHoles()
1681 ahFlag[elementId][0][sfbGrp + sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1682 qcOutChannel[0]->sfbThresholdLdData[sfbGrp + sfb] = in FDKaacEnc_allowMoreHoles()
1684 actPe -= peData->peChannelData[0].sfbPe[sfbGrp + sfb] >> in FDKaacEnc_allowMoreHoles()
1701 INT ch, sfb, sfbGrp; in FDKaacEnc_allowMoreHoles() local
1761 sfb = startSfb[chIdx]; in FDKaacEnc_allowMoreHoles()
1764 for (; sfb < psyOutChannel->maxSfbPerGroup; sfb++) { in FDKaacEnc_allowMoreHoles()
1765 if ((ahFlag[elementId][ch][sfbGrp + sfb] != NO_AH) && in FDKaacEnc_allowMoreHoles()
1766 (qcOutChannel->sfbWeightedEnergyLdData[sfbGrp + sfb] > in FDKaacEnc_allowMoreHoles()
1767 qcOutChannel->sfbThresholdLdData[sfbGrp + sfb])) { in FDKaacEnc_allowMoreHoles()
1769 qcOutChannel->sfbEnergyLdData[sfbGrp + sfb]); in FDKaacEnc_allowMoreHoles()
1770 avgEn += qcOutChannel->sfbEnergy[sfbGrp + sfb] >> avgEn_e; in FDKaacEnc_allowMoreHoles()
1776 sfb = startSfb[chIdx]; in FDKaacEnc_allowMoreHoles()
1814 sfb = maxSfb - 1; in FDKaacEnc_allowMoreHoles()
1824 if (sfb >= startSfb[chIdx] && sfb < maxSfbPerGroup[chIdx]) { in FDKaacEnc_allowMoreHoles()
1828 if (ahFlag[elementId][ch][sfbGrp + sfb] != NO_AH && in FDKaacEnc_allowMoreHoles()
1829 qcOutChannel->sfbEnergyLdData[sfbGrp + sfb] < in FDKaacEnc_allowMoreHoles()
1832 ahFlag[elementId][ch][sfbGrp + sfb] = NO_AH; in FDKaacEnc_allowMoreHoles()
1833 qcOutChannel->sfbThresholdLdData[sfbGrp + sfb] = in FDKaacEnc_allowMoreHoles()
1835 qcOutChannel->sfbWeightedEnergyLdData[sfbGrp + sfb]; in FDKaacEnc_allowMoreHoles()
1836 actPe -= peData->peChannelData[ch].sfbPe[sfbGrp + sfb] >> in FDKaacEnc_allowMoreHoles()
1848 sfb--; in FDKaacEnc_allowMoreHoles()
1849 if (sfb < minSfb) { in FDKaacEnc_allowMoreHoles()
1851 sfb = maxSfb; in FDKaacEnc_allowMoreHoles()
1865 int ch, sfb, sfbGrp; in FDKaacEnc_resetAHFlags() local
1870 for (sfb = 0; sfb < psyOutChannel[ch]->maxSfbPerGroup; sfb++) { in FDKaacEnc_resetAHFlags()
1871 if (ahFlag[ch][sfbGrp + sfb] == AH_ACTIVE) { in FDKaacEnc_resetAHFlags()
1872 ahFlag[ch][sfbGrp + sfb] = AH_INACTIVE; in FDKaacEnc_resetAHFlags()
2893 int ch, sfb, sfbGrp; in FDKaacEnc_AdjustThresholds() local
2900 for (sfb = 0; sfb < psyOutElement[i]->psyOutChannel[ch]->maxSfbPerGroup; in FDKaacEnc_AdjustThresholds()
2901 sfb++) { in FDKaacEnc_AdjustThresholds()
2902 pQcOutCh->sfbThresholdLdData[sfb + sfbGrp] += in FDKaacEnc_AdjustThresholds()
2903 pQcOutCh->sfbEnFacLd[sfb + sfbGrp]; in FDKaacEnc_AdjustThresholds()