[x264-devel] Re: [PATCH] set constraint_set[01]_flag when possible

Loïc Le Loarer lll+vlc at m4x.org
Fri May 12 08:36:34 CEST 2006


Le Thursday 11 May 2006 à 16:24:26 -0700, Loren Merritt a écrit:
> On Thu, 11 May 2006, Loïc Le Loarer wrote:
> 
> >Here is a patch which set the flags constraint_set0_flag and
> >constraint_set1_flag when possible. This has the advandage of giving
> >more information on the stream which may help decoders.
> >
> >I have included the text from the H.264 norm so that in case of
> >improvement in x264 supported feature, the flags can be corrected
> >accordingly easily.
> >
> >+ Set constraint_set0_flag if the BASELINE constraint are fulfilled
> >+ even if the profile is not BASELINE, this allows a BASELINE only 
> >+ decoder to decode the stream
> 
> Why? x264 selects profile based on which features are enabled. It will 
> never generate a Baseline-compatible stream that isn't actually marked as 
> Baseline.

Sure, so it is not necessary to set constraint_set0_flag. I added it for
completeness but it is not important. You can let it to 0 if you prefer.

> I suppose you could argue that there is some value in setting 
> constraint_set1_flag for Baseline files, because there are decoders that 
> support Main but not all of Baseline.

This is what I wanted to add. Because of this and because it is faster
to do deblocking on the fly as it is possible in MAIN.

> If you still think constraint_set[01]_flag should be set, then I'll set 
> them based on the value of sps->i_profile, not duplicate all the 
> parameter checks.

This is the case for constraint_set1_flag as the only test is
(sps->i_profile_idc < PROFILE_HIGH), all the other lines are here to
quote the norm so that it is easy to understand what and why is done,
and to complete the tests when the features supported by x264 are
increased.

Best regards.

-- 
Loïc

"heaven is not a place, it's a feeling"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20060512/035f46a6/attachment.pgp 


More information about the x264-devel mailing list