Log in

View Full Version : Pre-calculated Huffman codes


nabla101
28th February 2011, 12:13
Hi, where can I find a complete list (102 codes) of the pre-calculated Huffman codes (VLCs) for transform coefficients used in MPEG 4 visual, and also the pre-calculated codes for the motion vector differences (MVDs), of which I think there are about 60 codes. They are based on generic video data.

I have the book H.264 Advanced Video Coding by Iain Richardson, and he only list the tables partially in the book, and doesn't provide reference to a full list. I've searched the internet, and can't find them anywhere.

I'm designing an h.264 codec, and using this codes will be much simpler and more economic for my application than to calculate symbol probabilities and generate binary trees on the fly.

imcold
28th February 2011, 18:53
MPEG 4 Visual != h.264; mvd-s are stored as exp.golomb codes in h.264 (no idea where you got your numbers from). You can generate a table for such codes at initialization (5 lines of code). For coefficient coding there are several tables needed, you can find them in the standard. There's no need to generate any trees for vlc coding on the fly.