[x264-devel] Levels

Eric Viscito eric at ev-consulting.com
Mon Jan 7 17:55:37 CET 2008


Loren and everyone else,

This is a very good initiative.  I believe you can make x264 work better
in the real world without intentionally generating possibly non-compliant
streams.

The level concept (and the related profile concept) is the means H.264
manufacturers use to communicate with each other about implied decoding
capabilities.  I would not interpret the conservatism of hardware
manufacturers as anything other than a desire to ensure maximum
interoperability in the field in order to prevent undesirable user
experiences and lots of expense rectifying them.  And know that the
decoders are built to handle non-compliant streams, but they cannot a
priori assume that a stream labeled with a level outside their range is
decodable.

One important principle is that a stream should not state a level, unless
it complies with it.  Several people already responded with a comment
along those lines.

I believe you want it to be easy for x264 to create level-compliant
streams; in fact I would argue you want to make it hard not to, unless the
user knows what she is doing.  I can appreciate that some x264 users may
have environments that do not require strict level compliance, and may
wish to disable it.

I did expect to see someone suggest that you go just one step further than
your original proposal for new default behavior - once the resolution,
framerate, and DPB are used to determine a level, if no rate control is
specified, nonetheless still enforce the maximum bit rate and CPB buffer
size for that level.  This is just peak rate limitation, and to a rather
high rate for most levels.

The idea is that this would be the default behavior, if the user does not
specify a level.  If someone wanted to knowingly avoid the VBV
restrictions, create a flag that they must explicit use to do that.  But
then I question what the value of specifying a level is.

And I think that *certainly* if user actually specifies a level, the
stream should not exceed the maximum bitrate.  Specifying a level implies
specifying peak rate control.  x264 should definitely adhere to the level
that the user specified.

I don't want to open a can of worms, but why do you ignore what you called
the "minor constraints"?  Which ones?  While it may be true that some -
even most - decoders will play your stream if you fail to adhere to a
given minor constraint such as the number of motion vectors per two
consecutive macroblocks, you are taking a chance.

Regards,
Eric

On Sat, January 5, 2008 9:37 pm, Loren Merritt wrote:
> On Sat, 5 Jan 2008, Måns Rullgård wrote:
>> How are bitrate restrictions handled now when a profile/level is
explicitly specified?
>
> If you specify a level and enable VBV ratecontrol, x264 will warn
immediately if your requested VBV doesn't fit in your requested level.
x264 will also warn during the encode if it failed to respect your
requested VBV. It doesn't compare actual bitrate to the level's max VBV if
> that differs from your requested VBV.
> If you specify a level but don't enable VBV ratecontrol, x264 doesn't
check whether the level's implied VBV was respected.
>
> --Loren Merritt_______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>











More information about the x264-devel mailing list