[Mp4-tech] H264 Please help me about the CAVLC of H.264
tetsuo kosuge
kosuge td.idc.lsi.sanyo.co.jp
Wed Sep 28 19:41:08 ESTEDT 2005
Hallo Bill.
Level[i] derives as follows(detail shows H.264 standard 7.3.5.3.1).
Level (1) :
level_prefix = 0 (prefix-code 1);
levelCode = (Min(15,level_prefix)<<suffixLength) = 0;
....
if(levelCode%2 == 0)
Level(1) = (levelCode+2)>>1 = 1;
...
Level (0) :
level_prefix = 2(prefix-code 001);
levelCode = (Min(15,level_prefix)<<suffixLength) = 4;
level_suffix = 0 (level_suffix-code 0);
levelCode += level_suffix -> 4;
....
if(levelCode%2 == 0)
Level(0) = (levelCode+2)>>1 = 3;
...
Thanks
Regards.
>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 壮pecial
>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.
>______________________________________________________________________
>
>_______________________________________________
>NOTE: Please use clear subject lines for your posts. Include [audio, [video], [systems], [general] or another
apppropriate identifier to indicate the type of question you have.
>
>Note: Conduct on the mailing list is subject to the Antitrust guidelines found at
http://www.mpegif.org/public/documents/vault/mp-out-30042-Antitrust.php
-------------------------------------------
小菅 哲夫(こすげ てつお)
三洋電機(株) 半導体カンパニー
システムソリューション統括BU デジタルソリューション第一BU
デジタル映像開発部
TEL 048-529-7216(4734)
FAX 048-529-7229
More information about the Mp4-tech
mailing list