Commit 0d230e93 authored by Mans Rullgard's avatar Mans Rullgard

g723.1: simplify scale_vector()

It is impossible for bits to be 15 here so the special case is
not needed.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent a4b8fc3a
...@@ -283,10 +283,6 @@ static int scale_vector(int16_t *dst, const int16_t *vector, int length) ...@@ -283,10 +283,6 @@ static int scale_vector(int16_t *dst, const int16_t *vector, int length)
max = FFMIN(max, 0x7FFF); max = FFMIN(max, 0x7FFF);
bits = normalize_bits(max, 15); bits = normalize_bits(max, 15);
if (bits == 15)
for (i = 0; i < length; i++)
dst[i] = vector[i] * 0x7fff >> 3;
else
for (i = 0; i < length; i++) for (i = 0; i < length; i++)
dst[i] = vector[i] << bits >> 3; dst[i] = vector[i] << bits >> 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment