Commit 14b74d38 authored by Michael Niedermayer's avatar Michael Niedermayer

cleanup

Originally committed as revision 1899 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d07f9043
...@@ -237,17 +237,15 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){ ...@@ -237,17 +237,15 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
uint32_t bits=0; uint32_t bits=0;
for(len=32; len>0; len--){ for(len=32; len>0; len--){
int bit= 1<<(32-len);
for(index=0; index<256; index++){ for(index=0; index<256; index++){
if(len_table[index]==len){ if(len_table[index]==len)
if(bits & (bit-1)){ dst[index]= bits++;
}
if(bits & 1){
fprintf(stderr, "Error generating huffman table\n"); fprintf(stderr, "Error generating huffman table\n");
return -1; return -1;
} }
dst[index]= bits>>(32-len); bits >>= 1;
bits+= bit;
}
}
} }
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment