Skip to content
Snippets Groups Projects
Commit 090aaaf7 authored by Alex Converse's avatar Alex Converse
Browse files

mpeg12enc: Remove write-only variables.

parent 7c5dfc17
No related branches found
No related tags found
No related merge requests found
...@@ -77,10 +77,9 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){ ...@@ -77,10 +77,9 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
if (!level) if (!level)
continue; continue;
for(run=0; run<64; run++){ for(run=0; run<64; run++){
int len, bits, code; int len, code;
int alevel= FFABS(level); int alevel= FFABS(level);
int sign= (level>>31)&1;
if (alevel > rl->max_level[0][run]) if (alevel > rl->max_level[0][run])
code= 111; /*rl->n*/ code= 111; /*rl->n*/
...@@ -88,25 +87,15 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){ ...@@ -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; code= rl->index_run[0][run] + alevel - 1;
if (code < 111 /* rl->n */) { if (code < 111 /* rl->n */) {
/* store the vlc & sign at once */ /* length of vlc and sign */
len= rl->table_vlc[code][1]+1; len= rl->table_vlc[code][1]+1;
bits= (rl->table_vlc[code][0]<<1) + sign;
} else { } else {
len= rl->table_vlc[111/*rl->n*/][1]+6; len= rl->table_vlc[111/*rl->n*/][1]+6;
bits= rl->table_vlc[111/*rl->n*/][0]<<6;
bits|= run;
if (alevel < 128) { if (alevel < 128) {
bits<<=8; len+=8; len += 8;
bits|= level & 0xff;
} else { } else {
bits<<=16; len+=16; len += 16;
bits|= level & 0xff;
if (level < 0) {
bits|= 0x8001 + level + 255;
} else {
bits|= level & 0xffff;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment