[FFmpeg-devel] [PATCH] avfilter: add codecview filter

Clément Bœsch u at pkh.me
Sun Aug 24 15:04:03 CEST 2014


On Wed, Aug 20, 2014 at 01:37:23PM +0200, Stefano Sabatini wrote:
[...]
> > -{"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|D, "debug_mv"},
> > +#if FF_API_VISMV
> > +{"vismv", "visualize motion vectors (MVs) (deprecated)", OFFSET(debug_mv), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|D, "debug_mv"},
> >  {"pf", "forward predicted MVs of P-frames", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_MV_P_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"},
> >  {"bf", "forward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_MV_B_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"},
> >  {"bb", "backward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_MV_B_BACK }, INT_MIN, INT_MAX, V|D, "debug_mv"},
> > +#endif
> 
> Note: you may mention that the option is deprecated in ffmpeg-codecs.
> 

Good point, fixed.

> >  {"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
> >  {"subcmp", "sub-pel ME compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
> >  {"mbcmp", "macroblock compare function", OFFSET(mb_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
> > diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> > index 6a40a03..70f5734 100644
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -1435,6 +1435,12 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
> >          goto free_and_end;
> >      }
> >  
> 
> > +#if FF_API_VISMV
> > +    if (avctx->debug_mv)
> > +        av_log(avctx, AV_LOG_WARNING, "The 'vismv' option is deprecated, "
> > +               "see the codecview filter instead: http://ffmpeg.org/ffmpeg-filters.html#codecview\n");
> 
> Please don't use links in code, as we don't want to update them (and
> the user may have no Internet connectivity or no browser).
> 

Ah, right. Fixed.

> [...]
> > diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
> > new file mode 100644
> > index 0000000..5749631
> > --- /dev/null
> > +++ b/libavfilter/vf_codecview.c
> > @@ -0,0 +1,241 @@
> > +/*
> > + * Copyright (c) 2002-2004 Michael Niedermayer <michaelni at gmx.at>
> > + * Copyright (c) 2014 Clément Bœsch <u pkh me>
> > + *
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with FFmpeg; if not, write to the Free Software
> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > + */
> > +
> > +/**
> > + * @file
> > + * Codec debug viewer filter.
> 
> Please mention the file from which the code was taken
> (libavcodec/mpegvideo.c).
> 

Done.

> > + *
> > + * TODO: segmentation
> > + * TODO: quantization
> > + */
> > +
> [...]
> 
> LGTM, thanks.

Applied, thanks

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140824/3eec6cf9/attachment.asc>


More information about the ffmpeg-devel mailing list