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

Michael Niedermayer michaelni at gmx.at
Wed Aug 20 22:54:55 CEST 2014


On Mon, Aug 18, 2014 at 06:03:39PM +0200, Clément Bœsch wrote:
> From: Clément Bœsch <clement at stupeflix.com>
> 
> ---
> Note: I didn't use FF_API_DEBUG_MV because it seems to overlap with all
> kind of other things and I couldn't test properly the conditional
> compilation.
> 

> BTW, I could add a FATE test easily, but I didn't find any relevant
> samples available.

hmm?
totally random pick:
fate-suite/real/spygames-2MB.rmvb

but anything mpeg/h263 based should work


> 
> TODO: minor bump avfilter, micro bump avcodec
[...]
> diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
> index 7000531..ad3d52e 100644
> --- a/libavcodec/options_table.h
> +++ b/libavcodec/options_table.h
> @@ -262,10 +262,12 @@ static const AVOption avcodec_options[] = {
>  {"buffers", "picture buffer allocations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"},
>  {"thread_ops", "threading operations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|A|D, "debug"},
>  {"nomc", "skip motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_NOMC }, INT_MIN, INT_MAX, V|A|D, "debug"},
> -{"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
>  {"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");
> +#endif

ffmpeg could enable the filter automatically if vismv is used
similarly it could set the export flags if the filter is detected
these would simplify usage
of cousre thats not related to this patch


patch looks nice

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140820/f9b37ee7/attachment.asc>


More information about the ffmpeg-devel mailing list