Hi,

I have written a CAVLC encoder and I am confused on exactly how to parse the bitstream at the decoder. I am referring to the H.264 spec and the tutorial on vcodex.com.

At present I have written an encoder and created a bitstream. At the decoder upon receiving this bitstream, how do I know how many bits account for the Total_Coeffs? i.e in a bitstream like 000101010001 or something like this -- how can the decoder know that the first 7 bits are for something and the next 6 bits represent the number of ones, etc.

Any advise on this concept will be greatly appreciated!

Thanks people