[Mp4-tech] H264 Please help me about the CAVLC of H.264
JK(Jeong Kwon) Kim
kjk mcubeworks.com
Wed Sep 28 15:17:54 ESTEDT 2005
It exactly follows the standard.
level_prefix = 2
suffixLength = 1
level_suffix =0
levelCode = (level_prefix << suffixLength) + level_suffix = 4
Because levelCode is even, level[i] = (levelCode + 2) >> 1 = 3
The table form of CAVLC can be easily understood,
so you had better read “JVT-F100d1.doc”
By reading through both the standard and “JVT-F100d1.doc”,
you can understand CAVLC concretely.
I wish that this mail give you a slight help.
JK Kim
_____
From: mp4-tech-bounces lists.mpegif.org [mailto:mp4-tech-bounces lists.mpegif.org] On Behalf Of Song
Sent: Tuesday, September 27, 2023 8:34 PM
To: mp4-tech lists.mpegif.org
Subject: [Mp4-tech] H264 Please help me about the CAVLC of H.264
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/20050928/2699b7b2/attachment-0001.html
More information about the Mp4-tech
mailing list