Merge "Limit too large shift exponent in apply_inter_tes()" am: f828d3e16a am: 2027969e1f

am: cce1e2106d

Change-Id: Ifeeb188cfd4bc57d7c40d102188614a3d61cc333
This commit is contained in:
Jean-Michel Trivi 2018-12-27 11:32:48 -08:00 committed by android-build-merger
commit 207025dc96
1 changed files with 4 additions and 2 deletions

View File

@ -626,7 +626,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag,
total_power_low >>= diff; total_power_low >>= diff;
total_power_low_sf = new_summand_sf; total_power_low_sf = new_summand_sf;
} else if (new_summand_sf < total_power_low_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); 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); fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_sf);
total_power_high_sf = new_summand_sf; total_power_high_sf = new_summand_sf;
} else if (new_summand_sf < total_power_high_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); total_power_high += (new_summand >> preShift2);