[FFmpeg-devel] [PATCH] libvpxenc: extend auto-alt-ref range

James Zern jzern at google.com
Tue Nov 6 02:57:02 EET 2018


On Mon, Nov 5, 2018 at 4:45 PM James Zern <jzern at google.com> wrote:
>
> On Sat, Nov 3, 2018 at 2:31 PM James Almer <jamrial at gmail.com> wrote:
> >
> > On 11/3/2018 6:04 PM, James Zern wrote:
> > > On Sat, Nov 3, 2018 at 2:02 PM James Zern <jzern at google.com> wrote:
> > >> [...]
> > >>  #define COMMON_OPTIONS \
> > >>      { "auto-alt-ref",    "Enable use of alternate reference " \
> > >> -                         "frames (2-pass only)",                   OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1},      -1,      2,       VE}, \
> > >> +                         "frames (2-pass only)",                   OFFSET(auto_alt_ref),    AV_OPT_TYPE_INT, {.i64 = -1},      -1,      6,       VE}, \
> > >
> > > This was extended earlier [1], but probably should have been made
> > > codec specific. I can do that, but we might want to keep the 0-2 range
> > > for vp8 now for compatibility. Any preferences?
> >
> > What happens when you use the higher values while encoding VP8? Does it
> > error out or silently clips it to 1 internally?
> >
> > If it errors out then yes, move it out of COMMON_OPTIONS and into each
> > encoder AVOption array.
> >
>
> VP8 is clipped in this file currently because the library will error
> out with values > 1:

More precisely the value will fail to be set and the error will be
logged, but encoding will continue and you'll get the library default.

>         codecctl_int(avctx, VP8E_SET_ENABLEAUTOALTREF,
>                      avctx->codec_id == AV_CODEC_ID_VP8 ?
> !!ctx->auto_alt_ref : ctx->auto_alt_ref);
>
> So moving it from COMMON_OPTIONS at this point will avoid any more
> drift in the reported range of '-h encoder=libvpx'.
>
> > >
> > > [1] 41da4f8cb3 lavc/libvpxenc: fix -auto-alt-ref option type
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list