aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-11-03 16:02:17 -0700
committerAlex Converse <alex.converse@gmail.com>2011-11-07 10:53:55 -0800
commit090aaaf75280ed42a5e5c7424c366d5b6bab8dde (patch)
tree4519785ca34906f2e1379fad1ab3343148c5f58c
parent7c5dfc174be59afa671a98ec85fe208c528ab64f (diff)
downloadffmpeg-090aaaf75280ed42a5e5c7424c366d5b6bab8dde.tar.gz
mpeg12enc: Remove write-only variables.
-rw-r--r--libavcodec/mpeg12enc.c19
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;
}
}