On Mon, Sep 24, 2012 at 07:22:38PM +0200, Anton Khirnov wrote:
> On Mon, 24 Sep 2012 19:05:38 +0200, Diego Biurrun <[email protected]> wrote:
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -152,7 +152,9 @@ enum AVCodecID {
> >      AV_CODEC_ID_MSZH,
> >      AV_CODEC_ID_ZLIB,
> >      AV_CODEC_ID_QTRLE,
> > +#if LIBAVCODEC_VERSION_MAJOR < 55
> 
> FF_API_SNOW? Same below.

Changed locally.

> > --- a/libavcodec/options_table.h
> > +++ b/libavcodec/options_table.h
> > @@ -91,7 +91,9 @@ static const AVOption options[]={
> >  {"umh", "umh motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_UMH }, 
> > INT_MIN, INT_MAX, V|E, "me_method" },
> > +#if LIBAVCODEC_VERSION_MAJOR < 55
> >  {"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ITER 
> > }, INT_MIN, INT_MAX, V|E, "me_method" },
> > +#endif
> >  {"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = 
> > DEFAULT }, INT_MIN, INT_MAX},

Only snowenc.c sets ME_ITER, I think this should be OK.

> > @@ -347,7 +345,9 @@ static const AVOption options[]={
> >  {"keyint_min", "minimum interval between IDR-frames (x264)", 
> > OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E},
> > +#if LIBAVCODEC_VERSION_MAJOR < 55
> >  {"refs", "reference frames to consider for motion compensation (Snow)", 
> > OFFSET(refs), AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX, V|E},
> 
> The comment lies, at least x264 also uses this option. Please check this
> also for other options.
> 
> If x264 is the only user (i'm not completely sure), we should probably
> make this a private option.

biurrun@passion:/opt/biurrun/libav $ git grep avctx..refs libavcodec/
libavcodec/h264.c:    s->avctx->refs    = h->sps.ref_frame_count;
libavcodec/libx264.c:    if (avctx->refs >= 0)
libavcodec/libx264.c:        x4->params.i_frame_reference    = avctx->refs;
libavcodec/libxavs.c:    x4->params.i_frame_reference    = avctx->refs;

So I guess we need to keep it.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to