View Full Version : [H.264 CAVLC] Residual coef level prefix?
davyzhu
2nd June 2006, 10:44
Hi all,
I am reading H.264 spec and confused with its CAVLC.
The spec said: the code for each level is made up of a level_prefix and a level_suffix. The length of the suffix is adapted depending on the magnitude of each successive coded level.
But why use the level_suffix, I think it's useless, the level_prefix can represent a level enough?
Best regards,
Davy
Sulik
2nd June 2006, 20:44
level_suffix is needed for escape coding.
davyzhu
5th June 2006, 02:55
Hi Sulik,
If level is 5, the level prefix is 00001. When I encounter 1, I know the level syntax is end. But why I need level_suffix?
Best regards,
Davy
Sulik
5th June 2006, 18:52
If level_prefix is less than 15, level_suffix is not present in the bitstream (ie size=0 bits).
If would be very inefficient to use level_prefix to code large levels (ie: a level of 1000 would require 1Kbit!). The goal here is to code small levels with a small number of bits, and large levels are basically uncompressed (because their probability is much lower).
davyzhu
6th June 2006, 02:54
Hi Sulik,
Thank you!
I understand the probability of large level is more than small level. But you said "If level_prefix is less than 15, level_suffix is not present in the bit stream". In another word, when level_prefix is larger, level_suffix is present. So larger level lead to more bits? Maybe I don't understand your sentence, sorry.
And my question is why use level_suffix?
Best regards,
Davy
Sulik
6th June 2006, 20:12
It's the reverse: the probability of large level is small.
ie: a small level will be coded using only level_prefix (1..14), and a large level will be coded as 15+level_suffix (with level_prefix=15).
This way, small levels (high probability) will be coded with very few bits, and large levels (low probability) with more bits.
What you're suggesting is similar to coding the level as a single exp-golomb syntax element (se(v)), but this wouldn't be as good in terms of compression.
davyzhu
7th June 2006, 11:56
Hi Sulik,
I understand.
I have read a book "H.264.And.MPEG-4.Video.Compression.Video.Coding.
For.Next.Generation.Multimedia" by Iain Richardson.
The book have three examples on CAVLC, but the code is write like:
Level Value: 3(suffixLength=1)
Code:001(prefix)0(suffix)
... ...
I am confused with the book and your understand. If you are interested in the book, I'd like to send you a copy.
Best regards,
Davy
mahesh438
16th July 2007, 05:48
If u r clear why suffix length was used plz tell me about it. Even I went through this Ian Richardson and confused at the same point.
with best regards,
mahesh.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.