[Mp4-tech] CAVLC limits
JK(Jeong Kwon) Kim
kjk mcubeworks.com
Mon Jan 31 18:39:42 ESTEDT 2005
Hi Mark,
The escape code of CAVLC in H.264 has the 11-bit level data and one sign bit.
But the escape code excludes smaller ones, so the range is extended by the number of smaller ones.
suffixLength = 0, level range is [16+0, 16+2047]
suffixLength = 1, level range is [16+0, 16+2047]
suffixLength = 2, level range is [31+0, 31+2047]
suffixLength = 3, level range is [61+0, 61+2047]
suffixLength = 4, level range is [121+0, 121+2047]
suffixLength = 5, level range is [241+0, 241+2047]
suffixLength = 6, level range is [481+0, 481+2047]
So, the common smallest level limit is "2047".
And the reason to limit intra 16x16 DC and chroma DC in the following cited in another mail:
=====================================================================
CAVLC is well-designed to encode coefficients.
Its maximum value is:
(+-255 * 16 * 13107 + rounding ) >> 15 = +-1632
[ in case of the largest prediction error and QP = 0]
So, all the coefficients but 16x16 DC and chroma DC can be encoded by CAVLC.
But, the maximum value of 16x16 DC transform coefficients
(+-255 * 16 * 8 * 13107 + rounding ) >> 16 = +-6528
[ in case of the largest prediction error and QP = 0. The DC hadamard gain is '4' ]
It is out of the range of CAVLC.
So, there is a NOTE at the end of 8.5.6, JVT-J010d7.doc.(previously discussed)
NOTE - When entropy_coding_mode_flag is equal to 0 and QPY is less than 10,
the range of values that can be represented for the elements cij of c is not sufficient
to represent the full range of values of the elements dcYij of dcY that could be
necessary to form a close approximation of the content of any possible source
picture by use of the Intra_16x16 macroblock type
Chroma DC is similar case.
=====================================================================
Regards,
JK Kim, MTS, McubeWorks inc.
-----Original Message-----
From: mp4-tech-bounces lists.mpegif.org [mailto:mp4-tech-bounces lists.mpegif.org]On Behalf Of Mark Dell'Agnese
Sent: Saturday, January 29, 2024 5:42 AM
To: mp4-tech lists.mpegif.org
Subject: [Mp4-tech] CAVLC limits
Hello,
I have a couple of questions regarding the level limits imposed on values that have been transformed and quantized for the INTRA 16x16 case. In the JM reference encoder, there is a term, CAVLC_LEVEL_LIMIT, which limits the absolute value of the transformed and quantized DC coeff's to 2063. What is the significance of 2063 (13-bits req'd)? Why not 2047 which uses a 12-bit signed number?
And why isn't this restriction imposed on other coeff's for both 4x4 and 16x16 cases?
Thanks,
Mark.
More information about the Mp4-tech
mailing list