huffyuvdec: implement trick
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Tue, 3 Jun 2014 14:38:36 +0000 (16:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Jun 2014 11:12:48 +0000 (13:12 +0200)
commit11b47038135442ec546dc348f2411e52e47549b8
treed87e3b4afcf50bcb3bc5191da6f3560fc51da09d
parentc7e54628e30acbe896f92c8b8d89ae63901834ff
huffyuvdec: implement trick

When the joint table does not contain a valid entry, the decoding restarts
from scratch. By implementing the trick of jumping to the 2nd level of the
individual table (and inlining the whole), a speed improvement of 5-10%
is possible.

On a 1000-frames YUV4:2:0 video, before:
362851 decicycles in 422, 262094 runs, 50 skips
182488 decicycles in gray, 262087 runs, 57 skips
Object size: 23584
Overall time: 8.377

After:
346800 decicycles in 422, 262079 runs, 65 skips
168197 decicycles in gray, 262077 runs, 67 skips
Object size: 23188
Overall time: 7.878

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/huffyuvdec.c