A multiplication result doesn't fit in an int32_t type. This change
rewrites the code to avoid the overflowing multiplication.
Here y[0], y[1] are int16 numbers containing the (truncated) topmost
18 and (scaled Q2 to use the full int16) the least significant 13
bits of a 32-bit value. The change makes y[1] to be calculated
directly instead of using y[0] as an intermediate value.
TESTED=this change passes the bit exactness tests, and has also been
running on the audio_processing fuzzer with a CHECK comparing the
old and new value.
Bug: chromium:747202
Change-Id: Iafc69eb7391d494afdadf65f5b7f399a57bbe9a8
Reviewed-on: https://chromium-review.googlesource.com/580907
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19120}