diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2019-08-09 17:09:18 +0200 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-10-14 15:06:23 -0700 |
commit | a65911cd2ef6a16878e88cd91818ef962950ceec (patch) | |
tree | c71cd447e94707b235177068435fadf3223b648e /libSBRdec | |
parent | bedfd82356dafa1f51f360af29f302a672d6866c (diff) | |
download | fdk-aac-a65911cd2ef6a16878e88cd91818ef962950ceec.tar.gz fdk-aac-a65911cd2ef6a16878e88cd91818ef962950ceec.tar.bz2 fdk-aac-a65911cd2ef6a16878e88cd91818ef962950ceec.zip |
Limit shift exponent in adjustTimeSlot_EldGrid().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I4000972d63d74e871d47f2db031308cd7ea285d6
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/env_calc.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp index 1242833..eaf739d 100644 --- a/libSBRdec/src/env_calc.cpp +++ b/libSBRdec/src/env_calc.cpp @@ -1576,12 +1576,13 @@ void calculateSbrEnvelope( FDK_ASSERT(!iTES_enable); /* not supported */ if (flags & SBRDEC_ELD_GRID) { /* FDKmemset(analysBufferReal[j], 0, 64 * sizeof(FIXP_DBL)); */ - adjustTimeSlot_EldGrid(&analysBufferReal[j][lowSubband], pNrgs, - &h_sbr_cal_env->harmIndex, lowSubband, - noSubbands, - fMin(scale_change, DFRACT_BITS - 1), - noNoiseFlag, &h_sbr_cal_env->phaseIndex, - EXP2SCALE(adj_e) - sbrScaleFactor->lb_scale); + adjustTimeSlot_EldGrid( + &analysBufferReal[j][lowSubband], pNrgs, + &h_sbr_cal_env->harmIndex, lowSubband, noSubbands, + fMin(scale_change, DFRACT_BITS - 1), noNoiseFlag, + &h_sbr_cal_env->phaseIndex, + fMax(EXP2SCALE(adj_e) - sbrScaleFactor->lb_scale, + -(DFRACT_BITS - 1))); } else { adjustTimeSlotLC(&analysBufferReal[j][lowSubband], pNrgs, &h_sbr_cal_env->harmIndex, lowSubband, noSubbands, |