diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-01-20 20:20:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-21 10:01:46 +0100 |
commit | 340e6b018596837db950e82b4d5232d993e23934 (patch) | |
tree | 3b936305c2241548fcad27ecce122987fb97b393 /doc/examples/hw_decode.c | |
parent | 59a9d65e0d790821f88527a82569f56eb2f8a9be (diff) | |
download | ffmpeg-340e6b018596837db950e82b4d5232d993e23934.tar.gz |
avcodec/adxdec: Remove unnecessary left-shift
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>
Diffstat (limited to 'doc/examples/hw_decode.c')
0 files changed, 0 insertions, 0 deletions