diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-10 18:15:41 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-13 01:03:25 +0100 |
commit | 4aca716a531b0bc1f05c96209cf30577d6e48baa (patch) | |
tree | 7f7f6ea25c3c22ed1bfdad4fd21383d4a2da0cc4 /libavcodec/dca.h | |
parent | 1eb1f6f281eb6036d363e0317c1500be4a2708f2 (diff) | |
download | ffmpeg-4aca716a531b0bc1f05c96209cf30577d6e48baa.tar.gz |
g723.1: optimise scale_vector()
Firstly, nothing in this function can overflow 32 bits so the use
of a 64-bit type is completely unnecessary. Secondly, the scale
is either a power of two or 0x7fff. Doing separate loops for these
cases avoids using multiplications. Finally, since only the number
of bits, not the actual value, of the maximum value is needed, the
bitwise or of all the values serves the purpose while being faster.
It is worth noting that even if overflow could happen, it was not
handled correctly anyway.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/dca.h')
0 files changed, 0 insertions, 0 deletions