diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-27 11:24:20 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-27 11:24:20 -0800 |
commit | 2027969e1f72be4464e48f1bc0065b2bed1590b9 (patch) | |
tree | 8e32ae3bb3101c49774e7071aa541feda2ca89c6 | |
parent | 8b3ca08a7d3892c76f7153d8c4b84e7fae15ec9e (diff) | |
parent | f828d3e16adfb4cb428b4f3a2c155f89853cebbe (diff) | |
download | fdk-aac-2027969e1f72be4464e48f1bc0065b2bed1590b9.tar.gz fdk-aac-2027969e1f72be4464e48f1bc0065b2bed1590b9.tar.bz2 fdk-aac-2027969e1f72be4464e48f1bc0065b2bed1590b9.zip |
Merge "Limit too large shift exponent in apply_inter_tes()"
am: f828d3e16a
Change-Id: I09395e1536fc578de69e2bf365b6f344d41dda93
-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); |