mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
g723.1: simplify scale_vector()
It is impossible for bits to be 15 here so the special case is not needed. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
a4b8fc3a8a
commit
0d230e9312
@ -283,12 +283,8 @@ static int scale_vector(int16_t *dst, const int16_t *vector, int length)
|
||||
max = FFMIN(max, 0x7FFF);
|
||||
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++)
|
||||
dst[i] = vector[i] << bits >> 3;
|
||||
for (i = 0; i < length; i++)
|
||||
dst[i] = vector[i] << bits >> 3;
|
||||
|
||||
return bits - 3;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user