[Mp4-tech] H264 Please help me about the CAVLC of H.264
Song
sh upcsurpass.com
Tue Sep 27 19:33:38 ESTEDT 2005
Dear All,
Please help me on CAVLC of H.264.
I am reading the book, H.264 and MPEG-4 Video Compression Video Coding for Next-generation Multimedia,
by Iain E. G. Richardson, about the CAVLC parts of H.264 at page 204, the book shows the following example:
Reordered block:
0,3,0,1,-1,-1,0,1,0. . .
TotalCoeffs = 5 (indexed from highest frequency, 4, to lowest frequency, 0)
total zeros = 3
TrailingOnes = 3 (in fact there are four trailing ones but only three can be encoded as a ‘special
case’)
Encoding:
Element Value Code
-----------------------------------------------------------------------------------------
coeff token TotalCoeffs = 5, 0000100
TrailingOnes= 3 (use Table 1)
TrailingOne sign (4) + 0
TrailingOne sign (3) - 1
TrailingOne sign (2) - 1
Level (1) +1 (use suffixLength = 0) 1 (prefix)
Level (0) +3 (use suffixLength = 1) 001 (prefix) 0 (suffix)
total zeros 3 111
run before(4) ZerosLeft = 3; run before =1 10
run before(3) ZerosLeft = 2; run before =0 1
run before(2) ZerosLeft = 2; run before =0 1
run before(1) ZerosLeft = 2; run before =1 01
run before(0) ZerosLeft = 1; run before = 1 No code required;
last coefficient.
The transmitted bitstream for this block is 000010001110010111101101.
But I cannot understand the level(1) and level(0), how to get the prefix code value and suffix value? I look up the table of level_prefix, if value is 3, I can get the code of 0001, why does the example show me the 001 as code?
Why the suffix value is 0? why not 1? does that means 0 for +3, and 1 for -3?
Thanks
Regards.
Bill.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20050927/9d3e2e24/attachment.html
More information about the Mp4-tech
mailing list