diff options
author | Mike Melanson <mike@multimedia.cx> | 2009-09-23 05:38:12 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2009-09-23 05:38:12 +0000 |
commit | 428984b041092de3fb1bde07bf8d32383808a0e9 (patch) | |
tree | 20851dcf7a5119e3c017d762bf060ce0e97a3ddc /libavcodec | |
parent | 4c0dda2b3f45471faa233c62205e712fb072a76b (diff) | |
download | ffmpeg-428984b041092de3fb1bde07bf8d32383808a0e9.tar.gz |
Another micro-optimization for unpack_vlcs(): Eliminate a possible
branch and save around 45k-55k dezicycles per function run.
Originally committed as revision 19974 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index e2b17062dd..4d27a8a781 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1070,10 +1070,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb, coeff = zero_run = 0; } else { bits_to_get = coeff_get_bits[token]; - if (!bits_to_get) - coeff = coeff_tables[token][0]; - else - coeff = coeff_tables[token][get_bits(gb, bits_to_get)]; + if (bits_to_get) + bits_to_get = get_bits(gb, bits_to_get); + coeff = coeff_tables[token][bits_to_get]; zero_run = zero_run_base[token]; if (zero_run_get_bits[token]) |