[FFmpeg-devel] [PATCH] lavc/mpegvideo_enc: allow to force low_delay by increasing strict_std_compliance

Stefano Sabatini stefasab at gmail.com
Wed May 24 11:31:10 EEST 2017


On date Tuesday 2017-05-23 15:07:31 +0200, Moritz Barsnick encoded:
> On Tue, May 23, 2017 at 12:28:48 +0200, Stefano Sabatini wrote:
> > -        if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
> > +        if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
> > +            s->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
> >              av_log(avctx, AV_LOG_ERROR,
> > -                  "low delay forcing is only available for mpeg2\n");
> > +                  "low delay forcing is only available for mpeg2, increase strict_std_compliance to force it\n");
> 
> Mathematically speaking, you need to decrease, not increase it (so that
> it makes s->strict_std_compliance >= FF_COMPLIANCE_NORMAL false).
> 
> #define FF_COMPLIANCE_VERY_STRICT   2 ///< Strictly conform to an older more strict version of the spec or reference software.
> #define FF_COMPLIANCE_STRICT        1 ///< Strictly conform to all the things in the spec no matter what consequences.
> #define FF_COMPLIANCE_NORMAL        0
> #define FF_COMPLIANCE_UNOFFICIAL   -1 ///< Allow unofficial extensions
> #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
> 
> The text is also confusing (while correct) in that you'll be "forcing
> the forcing (of low delay)".
> 
> Perhaps something like:

> "[...] set strict_std_compliance to 'unofficial' or lower in order to
> allow it", or "enable it nevertheless". (I'm too lazy to check for
> other wordings.)

This sounds fine. Patch amended.

Thanks.
-- 
FFmpeg = Fabulous & Fascinating Maxi Power Elitist Gangster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lavc-mpegvideo_enc-allow-low_delay-for-non-MPEG2-cod.patch
Type: text/x-diff
Size: 1240 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170524/bbff4c0a/attachment.patch>


More information about the ffmpeg-devel mailing list