Lines Matching refs:sfb

258   INT j,sfb,sfboffs;  in FDKaacEnc_prepareIntensityDecision()  local
279 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_prepareIntensityDecision()
281 FIXP_DBL isValue = sfbEnergyLdDataLeft[sfb+sfboffs]-sfbEnergyLdDataRight[sfb+sfboffs]; in FDKaacEnc_prepareIntensityDecision()
284 …realScale[sfb + sfboffs] = fixMin(FL2FXCONST_DBL(60.f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT))), fixMax(… in FDKaacEnc_prepareIntensityDecision()
286 sL = fixMax(0,(CntLeadingZeros(sfbEnergyLeft[sfb + sfboffs])-1)); in FDKaacEnc_prepareIntensityDecision()
287 sR = fixMax(0,(CntLeadingZeros(sfbEnergyRight[sfb + sfboffs])-1)); in FDKaacEnc_prepareIntensityDecision()
289 …normSfbLoudness[sfb + sfboffs] = sqrtFixp(sqrtFixp(((sfbEnergyLeft[sfb + sfboffs]<<s) >> 1) + ((sf… in FDKaacEnc_prepareIntensityDecision()
291 overallLoudness[grpCounter] += normSfbLoudness[sfb + sfboffs] >> OVERALL_LOUDNESS_SF; in FDKaacEnc_prepareIntensityDecision()
296 …if( (sfbEnergyLeft[sfb + sfboffs] >= fMult(isParams->left_right_ratio_threshold,sfbEnergyRight[s… in FDKaacEnc_prepareIntensityDecision()
297 …(fMult(isParams->left_right_ratio_threshold,sfbEnergyLeft[sfb + sfboffs]) <= sfbEnergyRight[sfb + … in FDKaacEnc_prepareIntensityDecision()
300 hrrErr[sfb + sfboffs] = FL2FXCONST_DBL(1.0/8.0); in FDKaacEnc_prepareIntensityDecision()
319 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_prepareIntensityDecision()
322 …tmp = fMultDiv2((normSfbLoudness[sfb + sfboffs]>>OVERALL_LOUDNESS_SF)<<OVERALL_LOUDNESS_SF,invOver… in FDKaacEnc_prepareIntensityDecision()
324 normSfbLoudness[sfb + sfboffs] = scaleValue(tmp, invOverallLoudnessSF); in FDKaacEnc_prepareIntensityDecision()
326 channelCorr[sfb + sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_prepareIntensityDecision()
331 inv_n = GetInvInt((sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs])>>1); in FDKaacEnc_prepareIntensityDecision()
344 sL = calcSfbMaxScale(mdctSpectrumLeft,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_prepareIntensityDecision()
345 sR = calcSfbMaxScale(mdctSpectrumRight,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_prepareIntensityDecision()
348 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; j++) { in FDKaacEnc_prepareIntensityDecision()
355 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; j++) { in FDKaacEnc_prepareIntensityDecision()
383 channelCorr[sfb + sfboffs] = -(fDivNorm(-prod_lr,tmp,&channelCorrSF)); in FDKaacEnc_prepareIntensityDecision()
387 channelCorr[sfb + sfboffs] = (fDivNorm( prod_lr,tmp,&channelCorrSF)); in FDKaacEnc_prepareIntensityDecision()
392 channelCorr[sfb + sfboffs] = channelCorr[sfb + sfboffs] >> (-channelCorrSF); in FDKaacEnc_prepareIntensityDecision()
396 if ( fAbs(channelCorr[sfb + sfboffs]) > (((FIXP_DBL)MAXVAL_DBL)>>channelCorrSF) ) { in FDKaacEnc_prepareIntensityDecision()
397 if (channelCorr[sfb + sfboffs] < FL2FXCONST_DBL(0.0f)) in FDKaacEnc_prepareIntensityDecision()
398 channelCorr[sfb + sfboffs] = -(FIXP_DBL) MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
400 channelCorr[sfb + sfboffs] = (FIXP_DBL) MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
403 channelCorr[sfb + sfboffs] = channelCorr[sfb + sfboffs] << channelCorrSF; in FDKaacEnc_prepareIntensityDecision()
411 if (hrrErr[sfb + sfboffs] == FL2FXCONST_DBL(1.0/8.0)) { in FDKaacEnc_prepareIntensityDecision()
415 …hrrErr[sfb + sfboffs] = fMultDiv2((FL2FXCONST_DBL(0.25f)-(channelCorr[sfb + sfboffs]>>2)),normSfbL… in FDKaacEnc_prepareIntensityDecision()
418 if (fAbs(channelCorr[sfb + sfboffs]) >= isParams->corr_thresh) { in FDKaacEnc_prepareIntensityDecision()
419 isMask[sfb + sfboffs] = 1; in FDKaacEnc_prepareIntensityDecision()
452 INT sfb,sfboffs, j; in FDKaacEnc_finalizeIntensityDecision() local
463 for (sfb = 0; sfb < maxSfbPerGroup; sfb++) { in FDKaacEnc_finalizeIntensityDecision()
464 if (isMask[sfboffs + sfb] == 1) { in FDKaacEnc_finalizeIntensityDecision()
466 startIsSfb = sfboffs + sfb; in FDKaacEnc_finalizeIntensityDecision()
469 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
474 overallHrrError += hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF-3); in FDKaacEnc_finalizeIntensityDecision()
475 isRegionLoudness += normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
484 overallHrrError += hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF-3); in FDKaacEnc_finalizeIntensityDecision()
485 isRegionLoudness += normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
487 …if ( (hrrErr[sfboffs + sfb] < (isParams->local_error_thresh>>3)) && (overallHrrError < (isParams->… in FDKaacEnc_finalizeIntensityDecision()
490 isMask[sfboffs + sfb] = 1; in FDKaacEnc_finalizeIntensityDecision()
498 …if( fAbs(isScaleLast-realIsScale[sfboffs + sfb]) < (isParams->direction_deviation_thresh>>(REAL_SC… in FDKaacEnc_finalizeIntensityDecision()
499 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
502 isMask[sfboffs + sfb] = 0; in FDKaacEnc_finalizeIntensityDecision()
508 if (currentIsSfbCount > 0 && (!inIsBlock || sfb == maxSfbPerGroup - 1)) { in FDKaacEnc_finalizeIntensityDecision()
511 for(j = startIsSfb; j <= sfboffs + sfb; j++) { in FDKaacEnc_finalizeIntensityDecision()
588 INT sfb,sfboffs, j; in FDKaacEnc_IntensityStereoProcessing() local
640 for (sfb=0; sfb<sfbCnt; sfb+=sfbPerGroup) { in FDKaacEnc_IntensityStereoProcessing()
645 msMask[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
646 if (isMask[sfb+sfboffs] == 0) { in FDKaacEnc_IntensityStereoProcessing()
650 if ( (sfbEnergyLeft[sfb+sfboffs] < sfbThresholdLeft[sfb+sfboffs]) in FDKaacEnc_IntensityStereoProcessing()
651 …&&(fMult(FL2FXCONST_DBL(1.0f/1.5f),sfbEnergyRight[sfb+sfboffs]) > sfbThresholdRight[sfb+sfboffs]) … in FDKaacEnc_IntensityStereoProcessing()
656 if(pnsData[0]->pnsFlag[sfb+sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
657 pnsData[0]->pnsFlag[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
659 if(pnsData[1]->pnsFlag[sfb+sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
660 pnsData[1]->pnsFlag[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
664 …inv_n = GetInvInt((sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs])>>1); // scaled with 2… in FDKaacEnc_IntensityStereoProcessing()
665 sL = calcSfbMaxScale(mdctSpectrumLeft,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_IntensityStereoProcessing()
666 sR = calcSfbMaxScale(mdctSpectrumRight,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_IntensityStereoProcessing()
669 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) in FDKaacEnc_IntensityStereoProcessing()
679 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
683 msMask[sfb+sfboffs] = 1; in FDKaacEnc_IntensityStereoProcessing()
684 tmp = fDivNorm(sfbEnergyLeft[sfb+sfboffs],ed,&s1); in FDKaacEnc_IntensityStereoProcessing()
695 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { 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]; j++) { in FDKaacEnc_IntensityStereoProcessing()
717 msMask[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
718 tmp = fDivNorm(sfbEnergyLeft[sfb+sfboffs],es,&s1); in FDKaacEnc_IntensityStereoProcessing()
729 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
735 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
742 isBook[sfb+sfboffs] = CODE_BOOK_IS_IN_PHASE_NO; in FDKaacEnc_IntensityStereoProcessing()
744 if ( realIsScale[sfb+sfboffs] < FL2FXCONST_DBL(0.0f) ) { in FDKaacEnc_IntensityStereoProcessing()
745 …isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)-FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
748 …isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)+FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
751 sfbEnergyRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
752 sfbEnergyLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_IntensityStereoProcessing()
753 sfbThresholdRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
754 sfbThresholdLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-0.515625f); in FDKaacEnc_IntensityStereoProcessing()
755 sfbSpreadEnRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()