[FFmpeg-devel] [PATCH] h264 CAVLC coeff_token decoder based on CLZ

Anatoliy Nenashev nenashev_as
Sat Jan 23 01:28:53 CET 2010

Hi all!
I have made some investigations in H264 CAVLC coeff_token decoder.
In attached patch you can see special implementation of VLC decoder for 
coeff_token which is based on CLZ (count leading zeros).
This method reduce size of VLC decoding tables for coeff_token from 
(520+332+280+256)*2 = 2776 byte to (2*4*16 + 64 + 67 + 63 + 63) = 385 byte.
The all reason is to reduce cache missing. Unfortunally, on my system 
(Intel Core 2 Duo P8700 Debian Linux 64-bit) it make no difference with 
original code performance. May be the bottleneck is implementation of 
CLZ. It would be interesting to see any tests on other systems. Any 
comments are welcome. If community will agree with this kind of 
optimization I will continue this work to implement total_zeros and 
run_before decoding.

Thank you for your answers,

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: h264_cavlc_coeff_token.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100123/78120c30/attachment.txt>

More information about the ffmpeg-devel mailing list