diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-13 23:50:10 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-14 12:08:30 +0100 |
commit | 0d230e9312a676266bd6fa3478032db4860221a7 (patch) | |
tree | b26e240cfa0a3055479164b92a144ac0b8106ffe | |
parent | a4b8fc3a8a4ec8e704885d3097b6bfbdc7827b6e (diff) | |
download | ffmpeg-streaming-0d230e9312a676266bd6fa3478032db4860221a7.zip ffmpeg-streaming-0d230e9312a676266bd6fa3478032db4860221a7.tar.gz |
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>
-rw-r--r-- | libavcodec/g723_1.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index fd03ed9..793b2d3 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -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; } |