The purpose of the parameter ‘max_bytes_per_pic_denom‘ (which is present in SPS VUI) is to signal to a decoder on the maximal frame size. The decoder can use this info by allocation of input buffer size without a risk to overflow the buffer. If the parameter max_bytes_per_pic_denom is not present its default value is 2, if it’s zero than maximal frame size is constrained by minCR (minimal compression ratio = uncompresssed_frame_size / compressed_frame_size, e.g. for level 4.0 minCR=4 and for level 4.1 minCR=2 ). The minCR is derived from the level value (see Table A-1 “Level Limits” of H.264/AVC spec.).
Formally the H.264/AVC spec. says:
max_bytes_per_pic_denom indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units (in case of slices the picture is composed from a number of NAL units) associated with any coded picture in the coded video sequence. The value of max_bytes_per_pic_denom shall be in the range of 0 to 16, inclusive.
Depending on max_bytes_per_pic_denom the following applies.
– If max_bytes_per_pic_denom is equal to 0, no limits are indicated. [My comment: it’s incorrect, actually the minimal compression ratio minCR]
– Otherwise, no coded picture shall be represented in the coded video sequence by more than the following number of bytes.
( PicSizeInMbs * RawMbBits ) / ( 8 * max_bytes_per_pic_denom )
When the max_bytes_per_pic_denom syntax element is not present, the value of max_bytes_per_pic_denom shall be inferred to be equal to 2.
By the way, x264 (at least the current version) puts max_bytes_per_pic_denom = 0 in the SPS VUI, this means that maximal frame size is constrained by ( PicSizeInMbs * RawMbBits )/minCR.
Let’s take the numeric example, max_bytes_per_pic_denom=1, PicSizeInMbs =240, RawMbBits =3072 (for 4:2:0, 8bpp) and hence the maximal frame size is 11520 bytes. It’s a violation if a stream would contain a frame exceeding the magnitude 11520 bytes.
Advice: if your encoder can’t control the size of individual frame than you need configure the encoder to put max_bytes_per_pic_denom = 0. But if your encoder does not send the segment bitstream_restriction (i.e. bitstream_restriction_flag=0) then a decoder would infer max_bytes_per_pic_denom = 2. Notice that most of decoder ignore max_bytes_per_pic_denom, but there always a stric decoder which would fail decoding your stream without notifying the reason of failure.
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
Some truly excellent info , Glad I noticed this.
I have recently started a website, the information you offer on this web site has helped me tremendously. Thanks for all of your time & work.
Some genuinely nice stuff on this internet site, I enjoy it.
Excellent blog! Do you have any hints for aspiring writers? I’m hoping to start my own website soon but I’m a little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m totally overwhelmed .. Any recommendations? Cheers!
you welcome to correspond with our web-designer Ivan Lukin vanyalukin007@gmail.com
Some genuinely nice and useful information on this web site, too I think the style holds great features.
It’s actually a nice and helpful piece of information. I’m glad that you shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.
Sweet internet site, super style and design, very clean and utilize genial.
Some truly good info , Gladiola I observed this.
I love your writing style truly loving this web site.
I’m not sure why but this web site is loading extremely slow for me. Is anyone else having this issue or is it a problem on my end? I’ll check back later and see if the problem still exists.
Great post. I am facing a couple of these problems.