Commit 7baea658 authored by melanson's avatar melanson

Another micro-optimization for unpack_vlcs(): Eliminate a possible

branch and save around 45k-55k dezicycles per function run.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19974 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4b66e1cc
...@@ -1070,10 +1070,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, ...@@ -1070,10 +1070,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
coeff = zero_run = 0; coeff = zero_run = 0;
} else { } else {
bits_to_get = coeff_get_bits[token]; bits_to_get = coeff_get_bits[token];
if (!bits_to_get) if (bits_to_get)
coeff = coeff_tables[token][0]; bits_to_get = get_bits(gb, bits_to_get);
else coeff = coeff_tables[token][bits_to_get];
coeff = coeff_tables[token][get_bits(gb, bits_to_get)];
zero_run = zero_run_base[token]; zero_run = zero_run_base[token];
if (zero_run_get_bits[token]) if (zero_run_get_bits[token])
......
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