[FFmpeg-cvslog] ac3enc: remove unneeded local variable in asym_quant()

Justin Ruggles git at videolan.org
Thu Jun 23 05:11:56 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Jun 21 16:49:16 2011 -0400| [684f4abfac6e007d3481e06e1c0777b826e3ba42] | committer: Justin Ruggles

ac3enc: remove unneeded local variable in asym_quant()

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

 libavcodec/ac3enc.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index db45c83..1f7d05e 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1123,14 +1123,14 @@ static inline int sym_quant(int c, int e, int levels)
  */
 static inline int asym_quant(int c, int e, int qbits)
 {
-    int m, v;
+    int m;
 
-    v = (((c << e) >> (24 - qbits)) + 1) >> 1;
+    c = (((c << e) >> (24 - qbits)) + 1) >> 1;
     m = (1 << (qbits-1));
-    if (v >= m)
-        v = m - 1;
-    av_assert2(v >= -m);
-    return v;
+    if (c >= m)
+        c = m - 1;
+    av_assert2(c >= -m);
+    return c;
 }
 
 



More information about the ffmpeg-cvslog mailing list