diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-11-03 16:02:17 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-11-07 10:53:55 -0800 |
commit | 090aaaf75280ed42a5e5c7424c366d5b6bab8dde (patch) | |
tree | 4519785ca34906f2e1379fad1ab3343148c5f58c /libavcodec/mpeg12enc.c | |
parent | 7c5dfc174be59afa671a98ec85fe208c528ab64f (diff) | |
download | ffmpeg-090aaaf75280ed42a5e5c7424c366d5b6bab8dde.tar.gz |
mpeg12enc: Remove write-only variables.
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r-- | libavcodec/mpeg12enc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 26d26c7217..17097db909 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; } } |