[FFmpeg-devel] [PATCH] lavc: add missing flags in codec context flags

Stefano Sabatini stefasab at gmail.com
Tue Sep 17 12:43:45 CEST 2013


On date Tuesday 2013-09-17 00:40:29 +0200, Michael Niedermayer encoded:
> On Mon, Sep 16, 2013 at 11:58:20PM +0200, Stefano Sabatini wrote:
> > On date Monday 2013-09-16 23:56:13 +0200, Stefano Sabatini encoded:
> > > In particular: allow to show the options when dumping help.
> > > ---
> > >  libavcodec/options_table.h | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
> > > index e9cdfc4..4cebd57 100644
> > > --- a/libavcodec/options_table.h
> > > +++ b/libavcodec/options_table.h
> > > @@ -52,14 +52,14 @@ static const AVOption avcodec_options[] = {
> > >  {"mv4", "use four motion vectors per macroblock (MPEG-4)", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"},
> > >  {"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"},
> > >  {"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"},
> 
> > > -{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
> > > +{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, V|E, "flags"},
> 
> this is set when the user specifies a qscale to the user application
> if the user does not specify a qscale and this flag is set behavior
> is undefined
> 
> 
> > >  {"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"},
> > >  {"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"},
> > >  {"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"},
> 
> > > -{"pass1", "use internal 2-pass ratecontrol in first  pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
> > > -{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
> > > +{"pass1", "use internal 2-pass ratecontrol in first  pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, V|E, "flags"},
> > > +{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, V|E, "flags"},
> 
> pass1 / pass2 are set by the user application when 2pass mode is used.
> the user application in this case also has to make sure that the
> 2pass statistics are brought from the first to the 2nd run.
> Thus this flags cannot be set by the user without the user application
> having specific code to handle 2pass mode

Not sure if you're suggesting to keep the constants flags non marked
(so they are not shown in the output), or you suggest to extend the
manual documentation for them after they are marked (I'm for this
second option).

I'll extend the documentation in a separate patch.
-- 
FFmpeg = Fostering and Fiendish Mastering Powerful Ecletic Gigant


More information about the ffmpeg-devel mailing list