Lines Matching refs:sfb
265 INT j, sfb, sfboffs; in FDKaacEnc_prepareIntensityDecision() local
287 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_prepareIntensityDecision()
289 FIXP_DBL isValue = sfbEnergyLdDataLeft[sfb + sfboffs] - in FDKaacEnc_prepareIntensityDecision()
290 sfbEnergyLdDataRight[sfb + sfboffs]; in FDKaacEnc_prepareIntensityDecision()
293 realScale[sfb + sfboffs] = fixMin( in FDKaacEnc_prepareIntensityDecision()
298 sL = fixMax(0, (CntLeadingZeros(sfbEnergyLeft[sfb + sfboffs]) - 1)); in FDKaacEnc_prepareIntensityDecision()
299 sR = fixMax(0, (CntLeadingZeros(sfbEnergyRight[sfb + sfboffs]) - 1)); in FDKaacEnc_prepareIntensityDecision()
301 normSfbLoudness[sfb + sfboffs] = in FDKaacEnc_prepareIntensityDecision()
302 sqrtFixp(sqrtFixp(((sfbEnergyLeft[sfb + sfboffs] << s) >> 1) + in FDKaacEnc_prepareIntensityDecision()
303 ((sfbEnergyRight[sfb + sfboffs] << s) >> 1))) >> in FDKaacEnc_prepareIntensityDecision()
307 normSfbLoudness[sfb + sfboffs] >> OVERALL_LOUDNESS_SF; in FDKaacEnc_prepareIntensityDecision()
312 if ((sfbEnergyLeft[sfb + sfboffs] >= in FDKaacEnc_prepareIntensityDecision()
314 sfbEnergyRight[sfb + sfboffs])) && in FDKaacEnc_prepareIntensityDecision()
316 sfbEnergyLeft[sfb + sfboffs]) <= in FDKaacEnc_prepareIntensityDecision()
317 sfbEnergyRight[sfb + sfboffs])) { in FDKaacEnc_prepareIntensityDecision()
320 hrrErr[sfb + sfboffs] = FL2FXCONST_DBL(1.0 / 8.0); in FDKaacEnc_prepareIntensityDecision()
344 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_prepareIntensityDecision()
347 tmp = fMultDiv2((normSfbLoudness[sfb + sfboffs] >> OVERALL_LOUDNESS_SF) in FDKaacEnc_prepareIntensityDecision()
351 normSfbLoudness[sfb + sfboffs] = scaleValue(tmp, invOverallLoudnessSF); in FDKaacEnc_prepareIntensityDecision()
353 channelCorr[sfb + sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_prepareIntensityDecision()
359 (sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs]) >> 1); in FDKaacEnc_prepareIntensityDecision()
373 sL = calcSfbMaxScale(mdctSpectrumLeft, sfbOffset[sfb + sfboffs], in FDKaacEnc_prepareIntensityDecision()
374 sfbOffset[sfb + sfboffs + 1]); in FDKaacEnc_prepareIntensityDecision()
375 sR = calcSfbMaxScale(mdctSpectrumRight, sfbOffset[sfb + sfboffs], in FDKaacEnc_prepareIntensityDecision()
376 sfbOffset[sfb + sfboffs + 1]); in FDKaacEnc_prepareIntensityDecision()
379 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_prepareIntensityDecision()
389 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_prepareIntensityDecision()
425 channelCorr[sfb + sfboffs] = in FDKaacEnc_prepareIntensityDecision()
429 channelCorr[sfb + sfboffs] = in FDKaacEnc_prepareIntensityDecision()
437 channelCorr[sfb + sfboffs] = in FDKaacEnc_prepareIntensityDecision()
438 channelCorr[sfb + sfboffs] >> (-channelCorrSF); in FDKaacEnc_prepareIntensityDecision()
441 if (fAbs(channelCorr[sfb + sfboffs]) > in FDKaacEnc_prepareIntensityDecision()
443 if (channelCorr[sfb + sfboffs] < FL2FXCONST_DBL(0.0f)) in FDKaacEnc_prepareIntensityDecision()
444 channelCorr[sfb + sfboffs] = -(FIXP_DBL)MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
446 channelCorr[sfb + sfboffs] = (FIXP_DBL)MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
448 channelCorr[sfb + sfboffs] = channelCorr[sfb + sfboffs] in FDKaacEnc_prepareIntensityDecision()
458 if (hrrErr[sfb + sfboffs] == FL2FXCONST_DBL(1.0 / 8.0)) { in FDKaacEnc_prepareIntensityDecision()
462 hrrErr[sfb + sfboffs] = in FDKaacEnc_prepareIntensityDecision()
463 fMultDiv2((FL2FXCONST_DBL(0.25f) - (channelCorr[sfb + sfboffs] >> 2)), in FDKaacEnc_prepareIntensityDecision()
464 normSfbLoudness[sfb + sfboffs]); in FDKaacEnc_prepareIntensityDecision()
467 if (fAbs(channelCorr[sfb + sfboffs]) >= isParams->corr_thresh) { in FDKaacEnc_prepareIntensityDecision()
468 isMask[sfb + sfboffs] = 1; in FDKaacEnc_prepareIntensityDecision()
494 INT sfb, sfboffs, j; in FDKaacEnc_finalizeIntensityDecision() local
505 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_finalizeIntensityDecision()
506 if (isMask[sfboffs + sfb] == 1) { in FDKaacEnc_finalizeIntensityDecision()
508 startIsSfb = sfboffs + sfb; in FDKaacEnc_finalizeIntensityDecision()
511 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
516 overallHrrError += hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF - 3); in FDKaacEnc_finalizeIntensityDecision()
518 normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
527 hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF - 3); in FDKaacEnc_finalizeIntensityDecision()
529 normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
531 if ((hrrErr[sfboffs + sfb] < (isParams->local_error_thresh >> 3)) && in FDKaacEnc_finalizeIntensityDecision()
536 isMask[sfboffs + sfb] = 1; in FDKaacEnc_finalizeIntensityDecision()
544 if (fAbs(isScaleLast - realIsScale[sfboffs + sfb]) < in FDKaacEnc_finalizeIntensityDecision()
548 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
550 isMask[sfboffs + sfb] = 0; in FDKaacEnc_finalizeIntensityDecision()
556 if (currentIsSfbCount > 0 && (!inIsBlock || sfb == maxSfbPerGroup - 1)) { in FDKaacEnc_finalizeIntensityDecision()
561 for (j = startIsSfb; j <= sfboffs + sfb; j++) { in FDKaacEnc_finalizeIntensityDecision()
624 INT sfb, sfboffs, j; in FDKaacEnc_IntensityStereoProcessing() local
660 for (sfb = 0; sfb < sfbCnt; sfb += sfbPerGroup) { in FDKaacEnc_IntensityStereoProcessing()
666 msMask[sfb + sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
667 if (isMask[sfb + sfboffs] == 0) { in FDKaacEnc_IntensityStereoProcessing()
671 if ((sfbEnergyLeft[sfb + sfboffs] < sfbThresholdLeft[sfb + sfboffs]) && in FDKaacEnc_IntensityStereoProcessing()
672 (fMult(FL2FXCONST_DBL(1.0f / 1.5f), sfbEnergyRight[sfb + sfboffs]) > in FDKaacEnc_IntensityStereoProcessing()
673 sfbThresholdRight[sfb + sfboffs])) { in FDKaacEnc_IntensityStereoProcessing()
678 if (pnsData[0]->pnsFlag[sfb + sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
679 pnsData[0]->pnsFlag[sfb + sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
681 if (pnsData[1]->pnsFlag[sfb + sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
682 pnsData[1]->pnsFlag[sfb + sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
686 if (sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs] > in FDKaacEnc_IntensityStereoProcessing()
693 (sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs]) >> in FDKaacEnc_IntensityStereoProcessing()
695 sL = calcSfbMaxScale(mdctSpectrumLeft, sfbOffset[sfb + sfboffs], in FDKaacEnc_IntensityStereoProcessing()
696 sfbOffset[sfb + sfboffs + 1]); in FDKaacEnc_IntensityStereoProcessing()
697 sR = calcSfbMaxScale(mdctSpectrumRight, sfbOffset[sfb + sfboffs], in FDKaacEnc_IntensityStereoProcessing()
698 sfbOffset[sfb + sfboffs + 1]); in FDKaacEnc_IntensityStereoProcessing()
701 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; j++) in FDKaacEnc_IntensityStereoProcessing()
713 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
719 msMask[sfb + sfboffs] = 1; in FDKaacEnc_IntensityStereoProcessing()
720 tmp = fDivNorm(sfbEnergyLeft[sfb + sfboffs], ed, &s1); in FDKaacEnc_IntensityStereoProcessing()
731 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
739 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
753 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
761 msMask[sfb + sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
762 tmp = fDivNorm(sfbEnergyLeft[sfb + sfboffs], es, &s1); in FDKaacEnc_IntensityStereoProcessing()
773 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
781 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; in FDKaacEnc_IntensityStereoProcessing()
791 isBook[sfb + sfboffs] = CODE_BOOK_IS_IN_PHASE_NO; in FDKaacEnc_IntensityStereoProcessing()
793 if (realIsScale[sfb + sfboffs] < FL2FXCONST_DBL(0.0f)) { in FDKaacEnc_IntensityStereoProcessing()
794 isScale[sfb + sfboffs] = in FDKaacEnc_IntensityStereoProcessing()
795 (INT)(((realIsScale[sfb + sfboffs] >> 1) - in FDKaacEnc_IntensityStereoProcessing()
801 isScale[sfb + sfboffs] = in FDKaacEnc_IntensityStereoProcessing()
802 (INT)(((realIsScale[sfb + sfboffs] >> 1) + in FDKaacEnc_IntensityStereoProcessing()
808 sfbEnergyRight[sfb + sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
809 sfbEnergyLdDataRight[sfb + sfboffs] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_IntensityStereoProcessing()
810 sfbThresholdRight[sfb + sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
811 sfbThresholdLdDataRight[sfb + sfboffs] = FL2FXCONST_DBL(-0.515625f); in FDKaacEnc_IntensityStereoProcessing()
812 sfbSpreadEnRight[sfb + sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()