[FFmpeg-cvslog] mpeg12enc: Remove write-only variables.

Alex Converse git at videolan.org
Tue Nov 8 02:22:02 CET 2011


ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Thu Nov  3 16:02:17 2011 -0700| [090aaaf75280ed42a5e5c7424c366d5b6bab8dde] | committer: Alex Converse

mpeg12enc: Remove write-only variables.

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

 libavcodec/mpeg12enc.c |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 26d26c7..17097db 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -77,10 +77,9 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
         if (!level)
             continue;
         for(run=0; run<64; run++){
-            int len, bits, code;
+            int len, code;
 
             int alevel= FFABS(level);
-            int sign= (level>>31)&1;
 
             if (alevel > rl->max_level[0][run])
                 code= 111; /*rl->n*/
@@ -88,25 +87,15 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
                 code= rl->index_run[0][run] + alevel - 1;
 
             if (code < 111 /* rl->n */) {
-                /* store the vlc & sign at once */
+                /* length of vlc and sign */
                 len=   rl->table_vlc[code][1]+1;
-                bits= (rl->table_vlc[code][0]<<1) + sign;
             } else {
                 len=  rl->table_vlc[111/*rl->n*/][1]+6;
-                bits= rl->table_vlc[111/*rl->n*/][0]<<6;
 
-                bits|= run;
                 if (alevel < 128) {
-                    bits<<=8; len+=8;
-                    bits|= level & 0xff;
+                    len += 8;
                 } else {
-                    bits<<=16; len+=16;
-                    bits|= level & 0xff;
-                    if (level < 0) {
-                        bits|= 0x8001 + level + 255;
-                    } else {
-                        bits|= level & 0xffff;
-                    }
+                    len += 16;
                 }
             }
 



More information about the ffmpeg-cvslog mailing list