-
Andreas Rheinhardt authored
Replace "(a * (1 << shift) * b + c) >> shift" by "a * b + (c >> shift)". It is equivalent to the old code because a is in the range of uint16_t, shift is 12 and b is effectively a signed 4-bit number, so that no overflow/truncation of high bits happens during the multiplication (overflow would be undefined anyway). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
340e6b01