[FFmpeg-cvslog] g723.1: simplify scale_vector()

Michael Niedermayer git at videolan.org
Thu Sep 29 22:09:48 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 29 21:40:42 2011 +0200| [cb58adaaa303d74e4c132454301cf347e4f0c364] | committer: Michael Niedermayer

g723.1: simplify scale_vector()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb58adaaa303d74e4c132454301cf347e4f0c364
---

 libavcodec/g723_1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 9c019a9..e3c3b52 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -242,7 +242,7 @@ static int scale_vector(int16_t *vector, int length)
     scale = shift_table[bits];
 
     for (i = 0; i < length; i++)
-        vector[i] = (int16_t)(av_clipl_int32(vector[i] * scale << 1) >> 4);
+        vector[i] = (vector[i] * scale) >> 3;
 
     return bits - 3;
 }



More information about the ffmpeg-cvslog mailing list