diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-27 11:32:48 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-27 11:32:48 -0800 |
commit | 207025dc96dfa24027ed86bdce3bc99449e33716 (patch) | |
tree | 4aa588e58613c5e5890f1cb9967e1fc634dfdd19 /libSBRdec | |
parent | ceafe133b4088ff30c07678d1700611085af3bab (diff) | |
parent | cce1e2106d431a65c02e056839b6b0a6aff50085 (diff) | |
download | fdk-aac-207025dc96dfa24027ed86bdce3bc99449e33716.tar.gz fdk-aac-207025dc96dfa24027ed86bdce3bc99449e33716.tar.bz2 fdk-aac-207025dc96dfa24027ed86bdce3bc99449e33716.zip |
Merge "Limit too large shift exponent in apply_inter_tes()" am: f828d3e16a am: 2027969e1f
am: cce1e2106d
Change-Id: Ifeeb188cfd4bc57d7c40d102188614a3d61cc333
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/env_calc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp index 10c73ec..cb1474f 100644 --- a/libSBRdec/src/env_calc.cpp +++ b/libSBRdec/src/env_calc.cpp @@ -626,7 +626,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag, total_power_low >>= diff; total_power_low_sf = new_summand_sf; } else if (new_summand_sf < total_power_low_sf) { - new_summand >>= total_power_low_sf - new_summand_sf; + new_summand >>= + fMin(DFRACT_BITS - 1, total_power_low_sf - new_summand_sf); } total_power_low += (new_summand >> preShift2); @@ -638,7 +639,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag, fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_sf); total_power_high_sf = new_summand_sf; } else if (new_summand_sf < total_power_high_sf) { - new_summand >>= total_power_high_sf - new_summand_sf; + new_summand >>= + fMin(DFRACT_BITS - 1, total_power_high_sf - new_summand_sf); } total_power_high += (new_summand >> preShift2); |