Lines Matching refs:sfboffs

258   INT j,sfb,sfboffs;  in FDKaacEnc_prepareIntensityDecision()  local
277 for (grpCounter = 0, sfboffs = 0; sfboffs < sfbCnt; sfboffs += sfbPerGroup, grpCounter++) { 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 …sParams->left_right_ratio_threshold,sfbEnergyLeft[sfb + sfboffs]) <= sfbEnergyRight[sfb + sfboffs]… in FDKaacEnc_prepareIntensityDecision()
300 hrrErr[sfb + sfboffs] = FL2FXCONST_DBL(1.0/8.0); in FDKaacEnc_prepareIntensityDecision()
305 for (grpCounter = 0, sfboffs = 0; sfboffs < sfbCnt; sfboffs += sfbPerGroup, grpCounter++) { 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()
330 inv_n = GetInvInt((sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs])>>1); in FDKaacEnc_prepareIntensityDecision()
343 sL = calcSfbMaxScale(mdctSpectrumLeft,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_prepareIntensityDecision()
344 sR = calcSfbMaxScale(mdctSpectrumRight,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_prepareIntensityDecision()
347 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; j++) { in FDKaacEnc_prepareIntensityDecision()
354 for (j = sfbOffset[sfb + sfboffs]; j < sfbOffset[sfb + sfboffs + 1]; j++) { in FDKaacEnc_prepareIntensityDecision()
382 channelCorr[sfb + sfboffs] = -(fDivNorm(-prod_lr,tmp,&channelCorrSF)); in FDKaacEnc_prepareIntensityDecision()
386 channelCorr[sfb + sfboffs] = (fDivNorm( prod_lr,tmp,&channelCorrSF)); in FDKaacEnc_prepareIntensityDecision()
391 channelCorr[sfb + sfboffs] = channelCorr[sfb + sfboffs] >> (-channelCorrSF); in FDKaacEnc_prepareIntensityDecision()
395 if ( fAbs(channelCorr[sfb + sfboffs]) > (((FIXP_DBL)MAXVAL_DBL)>>channelCorrSF) ) { in FDKaacEnc_prepareIntensityDecision()
396 if (channelCorr[sfb + sfboffs] < FL2FXCONST_DBL(0.0f)) in FDKaacEnc_prepareIntensityDecision()
397 channelCorr[sfb + sfboffs] = -(FIXP_DBL) MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
399 channelCorr[sfb + sfboffs] = (FIXP_DBL) MAXVAL_DBL; in FDKaacEnc_prepareIntensityDecision()
402 channelCorr[sfb + sfboffs] = channelCorr[sfb + sfboffs] << channelCorrSF; in FDKaacEnc_prepareIntensityDecision()
410 if (hrrErr[sfb + sfboffs] == FL2FXCONST_DBL(1.0/8.0)) { in FDKaacEnc_prepareIntensityDecision()
414 …hrrErr[sfb + sfboffs] = fMultDiv2((FL2FXCONST_DBL(0.25f)-(channelCorr[sfb + sfboffs]>>2)),normSfbL… in FDKaacEnc_prepareIntensityDecision()
417 if (fAbs(channelCorr[sfb + sfboffs]) >= isParams->corr_thresh) { in FDKaacEnc_prepareIntensityDecision()
418 isMask[sfb + sfboffs] = 1; in FDKaacEnc_prepareIntensityDecision()
451 INT sfb,sfboffs, j; in FDKaacEnc_finalizeIntensityDecision() local
455 for (sfboffs = 0; sfboffs < sfbCnt; sfboffs += sfbPerGroup) { in FDKaacEnc_finalizeIntensityDecision()
463 if (isMask[sfboffs + sfb] == 1) { in FDKaacEnc_finalizeIntensityDecision()
465 startIsSfb = sfboffs + sfb; in FDKaacEnc_finalizeIntensityDecision()
468 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
473 overallHrrError += hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF-3); in FDKaacEnc_finalizeIntensityDecision()
474 isRegionLoudness += normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
483 overallHrrError += hrrErr[sfboffs + sfb] >> (MAX_SFB_PER_GROUP_SF-3); in FDKaacEnc_finalizeIntensityDecision()
484 isRegionLoudness += normSfbLoudness[sfboffs + sfb] >> MAX_SFB_PER_GROUP_SF; in FDKaacEnc_finalizeIntensityDecision()
486 …if ( (hrrErr[sfboffs + sfb] < (isParams->local_error_thresh>>3)) && (overallHrrError < (isParams->… in FDKaacEnc_finalizeIntensityDecision()
489 isMask[sfboffs + sfb] = 1; in FDKaacEnc_finalizeIntensityDecision()
497 …if( fAbs(isScaleLast-realIsScale[sfboffs + sfb]) < (isParams->direction_deviation_thresh>>(REAL_SC… in FDKaacEnc_finalizeIntensityDecision()
498 isScaleLast = realIsScale[sfboffs + sfb]; in FDKaacEnc_finalizeIntensityDecision()
501 isMask[sfboffs + sfb] = 0; in FDKaacEnc_finalizeIntensityDecision()
510 for(j = startIsSfb; j <= sfboffs + sfb; j++) { in FDKaacEnc_finalizeIntensityDecision()
587 INT sfb,sfboffs, j; in FDKaacEnc_IntensityStereoProcessing() local
640 for (sfboffs=0; sfboffs<maxSfbPerGroup; sfboffs++) { in FDKaacEnc_IntensityStereoProcessing()
644 msMask[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
645 if (isMask[sfb+sfboffs] == 0) { in FDKaacEnc_IntensityStereoProcessing()
649 if ( (sfbEnergyLeft[sfb+sfboffs] < sfbThresholdLeft[sfb+sfboffs]) in FDKaacEnc_IntensityStereoProcessing()
650 …&&(fMult(FL2FXCONST_DBL(1.0f/1.5f),sfbEnergyRight[sfb+sfboffs]) > sfbThresholdRight[sfb+sfboffs]) … in FDKaacEnc_IntensityStereoProcessing()
655 if(pnsData[0]->pnsFlag[sfb+sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
656 pnsData[0]->pnsFlag[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
658 if(pnsData[1]->pnsFlag[sfb+sfboffs]) { in FDKaacEnc_IntensityStereoProcessing()
659 pnsData[1]->pnsFlag[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
663 …inv_n = GetInvInt((sfbOffset[sfb + sfboffs + 1] - sfbOffset[sfb + sfboffs])>>1); // scaled with 2… in FDKaacEnc_IntensityStereoProcessing()
664 sL = calcSfbMaxScale(mdctSpectrumLeft,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_IntensityStereoProcessing()
665 sR = calcSfbMaxScale(mdctSpectrumRight,sfbOffset[sfb+sfboffs],sfbOffset[sfb+sfboffs+1]); in FDKaacEnc_IntensityStereoProcessing()
668 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) in FDKaacEnc_IntensityStereoProcessing()
678 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
682 msMask[sfb+sfboffs] = 1; in FDKaacEnc_IntensityStereoProcessing()
683 tmp = fDivNorm(sfbEnergyLeft[sfb+sfboffs],ed,&s1); in FDKaacEnc_IntensityStereoProcessing()
694 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
700 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
712 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
716 msMask[sfb+sfboffs] = 0; in FDKaacEnc_IntensityStereoProcessing()
717 tmp = fDivNorm(sfbEnergyLeft[sfb+sfboffs],es,&s1); in FDKaacEnc_IntensityStereoProcessing()
728 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
734 for (j=sfbOffset[sfb+sfboffs]; j<sfbOffset[sfb+sfboffs+1]; j++) { in FDKaacEnc_IntensityStereoProcessing()
741 isBook[sfb+sfboffs] = CODE_BOOK_IS_IN_PHASE_NO; in FDKaacEnc_IntensityStereoProcessing()
743 if ( realIsScale[sfb+sfboffs] < FL2FXCONST_DBL(0.0f) ) { in FDKaacEnc_IntensityStereoProcessing()
744 …isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)-FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
747 …isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)+FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF… in FDKaacEnc_IntensityStereoProcessing()
750 sfbEnergyRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
751 sfbEnergyLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-1.0f); in FDKaacEnc_IntensityStereoProcessing()
752 sfbThresholdRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()
753 sfbThresholdLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-0.515625f); in FDKaacEnc_IntensityStereoProcessing()
754 sfbSpreadEnRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); in FDKaacEnc_IntensityStereoProcessing()