diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-27 19:14:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-12-27 19:14:22 +0000 |
commit | f828d3e16adfb4cb428b4f3a2c155f89853cebbe (patch) | |
tree | 8e32ae3bb3101c49774e7071aa541feda2ca89c6 /libSBRdec | |
parent | cfc66160486e9845df39278bdb0877f87f72bb27 (diff) | |
parent | 29b81acd78887b24c2995f89c7c34e1861afad69 (diff) | |
download | fdk-aac-f828d3e16adfb4cb428b4f3a2c155f89853cebbe.tar.gz fdk-aac-f828d3e16adfb4cb428b4f3a2c155f89853cebbe.tar.bz2 fdk-aac-f828d3e16adfb4cb428b4f3a2c155f89853cebbe.zip |
Merge "Limit too large shift exponent in apply_inter_tes()"
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); |