Log in

View Full Version : Any optimized process in CABAC


vizzimani
15th March 2008, 09:50
I am using this "DRAFT ISO/IEC 14496-10 : 2002 (E)" to implement h264 decoder. is Any optimized CABAC process came after that draft?

akupenguin
15th March 2008, 13:51
The algorithm described in the standard hasn't changed since then, but it's not the most efficient algorithm.
ffh264 makes the following optimizations:
Merge valMPS and pStateIdx into a single variable. It doesn't matter how you merge them, since they're only used for table lookups, as long as you reorder the tables to match.
No bitwise i/o. Read a byte when you need a byte, and keep track of how many bits in the byte you've used up.
Renormalize with a variable shift instead of a loop.

No, I don't have an academic document describing these, only source code. If you understand arithcoding you should be able to make the optimizations based on just the 1 sentence description, and if not that's the place to start rather than something specific to h264 CABAC.

vizzimani
17th March 2008, 06:49
What ever optimization techniques u mentioned, i already implemented.
1. Merging
2. Getting Bytes
3. Fast Renormalization (avoiding loop)

you are guidance is very nice. Thank u very much.