summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libSBRdec/src/psdec.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-17 15:05:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-17 15:05:35 +0200
commit321a2c3eead634329cda904dbd38d986c3f22c11 (patch)
treec4339c85c03dd103e0e3ee7b8fb1445c1fc4ffa8 /fdk-aac/libSBRdec/src/psdec.cpp
parentb65cd1fe9d453365f0dec0c80d8737eda3d1c338 (diff)
parentac10ac25317d2027e21b1390054e47201e7aec98 (diff)
downloadODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.tar.gz
ODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.tar.bz2
ODR-AudioEnc-321a2c3eead634329cda904dbd38d986c3f22c11.zip
Merge branch 'next' into padsocket
Diffstat (limited to 'fdk-aac/libSBRdec/src/psdec.cpp')
-rw-r--r--fdk-aac/libSBRdec/src/psdec.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/fdk-aac/libSBRdec/src/psdec.cpp b/fdk-aac/libSBRdec/src/psdec.cpp
index b31b310..13a21bf 100644
--- a/fdk-aac/libSBRdec/src/psdec.cpp
+++ b/fdk-aac/libSBRdec/src/psdec.cpp
@@ -325,11 +325,11 @@ void initSlotBasedRotation(
int env, int usb) {
INT group = 0;
INT bin = 0;
- INT noIidSteps, noFactors;
+ INT noIidSteps;
FIXP_SGL invL;
FIXP_DBL ScaleL, ScaleR;
- FIXP_DBL Alpha, Beta, AlphasValue;
+ FIXP_DBL Alpha, Beta;
FIXP_DBL h11r, h12r, h21r, h22r;
const FIXP_DBL *PScaleFactors;
@@ -337,11 +337,9 @@ void initSlotBasedRotation(
if (h_ps_d->bsData[h_ps_d->processSlot].mpeg.bFineIidQ) {
PScaleFactors = ScaleFactorsFine; /* values are shiftet right by one */
noIidSteps = NO_IID_STEPS_FINE;
- noFactors = NO_IID_LEVELS_FINE;
} else {
PScaleFactors = ScaleFactors; /* values are shiftet right by one */
noIidSteps = NO_IID_STEPS;
- noFactors = NO_IID_LEVELS;
}
/* dequantize and decode */
@@ -360,23 +358,17 @@ void initSlotBasedRotation(
/* ScaleR and ScaleL are scaled by 1 shift right */
- ScaleL = ScaleR = 0;
- if (noIidSteps + h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] >= 0 && noIidSteps + h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] < noFactors)
- ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.pCoef
- ->aaIidIndexMapped[env][bin]];
- if (noIidSteps - h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] >= 0 && noIidSteps - h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][bin] < noFactors)
- ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef
- ->aaIidIndexMapped[env][bin]];
-
- AlphasValue = 0;
- if (h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin] >= 0)
- AlphasValue = Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]];
+ ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.pCoef
+ ->aaIidIndexMapped[env][bin]];
+ ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef
+ ->aaIidIndexMapped[env][bin]];
+
Beta = fMult(
- fMult(AlphasValue,
+ fMult(Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]],
(ScaleR - ScaleL)),
FIXP_SQRT05);
Alpha =
- AlphasValue >> 1;
+ Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]] >> 1;
/* Alpha and Beta are now both scaled by 2 shifts right */