[FFmpeg-devel] [PATCH] libmpcodecs support
Aurelien Jacobs
aurel
Fri Jan 14 23:34:28 CET 2011
On Fri, Jan 14, 2011 at 05:37:45AM +0100, Michael Niedermayer wrote:
> Hi
>
> Attached patchset makes libavfilter support most libmpcodecs filters
> The libmpcodecs filters are practically unmodified and for keeping it
> maintainable id like to keep them unmodified.
>
> I will commit this soon but wont enable it yet. That way others can help
> cleanup the wraper (minus code that for maintainability should stay identical
> to the original), fix bugs, rename all global functions so they wont conflict
> with mplayers if they ever include this and generally help.
>
> Please dont bikeshed this to death.
>
> Ahh before i can commit this, libmpcodecs and subdirectories must not get
> blocked by the tab & trailing whitespace checkin scripts.
>
> From 34072e13989ebed5e76a425b886b5b17756e6d5d Mon Sep 17 00:00:00 2001
> From: Michael Niedermayer <michaelni at gmx.at>
> Date: Fri, 14 Jan 2011 05:07:39 +0100
> Subject: [PATCH 7/7] Enable libmpcodecs support.
>
> ---
> libavfilter/Makefile | 65 ++++++++++++++++++++++++++++++++++++++++++++++
> libavfilter/allfilters.c | 1 +
> 2 files changed, 66 insertions(+), 0 deletions(-)
>
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index fdb181e..0db4750 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -30,6 +30,7 @@ OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
> OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.o
> OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
> OBJS-$(CONFIG_HQDN3D_FILTER) += vf_hqdn3d.o
> +OBJS-$(CONFIG_MP_FILTER) += vf_mp.o
> OBJS-$(CONFIG_NOFORMAT_FILTER) += vf_format.o
> OBJS-$(CONFIG_NULL_FILTER) += vf_null.o
> OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o
> @@ -54,6 +55,70 @@ OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o
>
> OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
>
> +
> +OBJS += libmpcodecs/mp_image.o
> +OBJS += libmpcodecs/img_format.o
> +OBJS [...]
I guess all those libmpcodecs files should also be added to
OBJS-$(CONFIG_MP_FILTER). I don't think we want them compiled
unconditionally.
> +OBJS += libmpcodecs/vf_2xsai.o
> +OBJS += libmpcodecs/vf_blackframe.o
> +OBJS += libmpcodecs/vf_boxblur.o
> +OBJS += libmpcodecs/vf_cropdetect.o
> +OBJS += libmpcodecs/vf_decimate.o
> +OBJS += libmpcodecs/vf_delogo.o
> +OBJS += libmpcodecs/vf_denoise3d.o
> +OBJS += libmpcodecs/vf_detc.o
> +OBJS += libmpcodecs/vf_dint.o
> +OBJS += libmpcodecs/vf_divtc.o
> +OBJS += libmpcodecs/vf_down3dright.o
> +OBJS += libmpcodecs/vf_dsize.o
> +OBJS += libmpcodecs/vf_eq2.o
> +OBJS += libmpcodecs/vf_eq.o
> +OBJS += libmpcodecs/vf_field.o
> +OBJS += libmpcodecs/vf_fil.o
> +#OBJS += libmpcodecs/vf_filmdint.o
> +OBJS += libmpcodecs/vf_fixpts.o
> +OBJS += libmpcodecs/vf_framestep.o
> +OBJS += libmpcodecs/vf_fspp.o
> +OBJS += libmpcodecs/vf_geq.o
> +OBJS += libmpcodecs/vf_gradfun.o
> +OBJS += libmpcodecs/vf_harddup.o
> +OBJS += libmpcodecs/vf_hqdn3d.o
> +OBJS += libmpcodecs/vf_hue.o
> +OBJS += libmpcodecs/vf_il.o
> +OBJS += libmpcodecs/vf_ilpack.o
> +OBJS += libmpcodecs/vf_ivtc.o
> +OBJS += libmpcodecs/vf_kerndeint.o
> +OBJS += libmpcodecs/vf_mcdeint.o
> +OBJS += libmpcodecs/vf_mirror.o
> +OBJS += libmpcodecs/vf_noise.o
> +OBJS += libmpcodecs/vf_ow.o
> +OBJS += libmpcodecs/vf_palette.o
> +OBJS += libmpcodecs/vf_perspective.o
> +OBJS += libmpcodecs/vf_phase.o
> +OBJS += libmpcodecs/vf_pp7.o
> +OBJS += libmpcodecs/vf_pullup.o
> +OBJS += libmpcodecs/vf_qp.o
> +OBJS += libmpcodecs/vf_rectangle.o
> +OBJS += libmpcodecs/vf_remove_logo.o
> +OBJS += libmpcodecs/vf_rgbtest.o
> +OBJS += libmpcodecs/vf_rotate.o
> +OBJS += libmpcodecs/vf_sab.o
> +OBJS += libmpcodecs/vf_screenshot.o
> +OBJS += libmpcodecs/vf_smartblur.o
> +OBJS += libmpcodecs/vf_softpulldown.o
> +OBJS += libmpcodecs/vf_softskip.o
> +OBJS += libmpcodecs/vf_spp.o
> +OBJS += libmpcodecs/vf_swapuv.o
> +OBJS += libmpcodecs/vf_telecine.o
> +OBJS += libmpcodecs/vf_test.o
> +OBJS += libmpcodecs/vf_tile.o
> +OBJS += libmpcodecs/vf_tinterlace.o
> +OBJS += libmpcodecs/vf_unsharp.o
> +OBJS += libmpcodecs/vf_uspp.o
> +OBJS += libmpcodecs/vf_yuvcsp.o
> +OBJS += libmpcodecs/vf_yvu9.o
> +OBJS += libmpcodecs/pullup.o
IIUC you said that the ultimate goal is to have all those filters
converted to native libavfilter so that we can drop all the libmpcodecs
filters. If so, why does this libmpcodecs filter list includes some
filters which have already a native libavfilter version ?? Namely:
vf_blackframe.o
vf_cropdetect.o
vf_dsize.o
vf_mirror.o
vf_rectangle.o
vf_rotate.o
Also vf_yvu9 is documented as "Deprecated in favor of the software
scaler". So I doubt it is a good idea to keep it.
I also suspect vf_palette might already be handled by libavfilter.
It might also be worth double checking vf_yuvcsp but I guess this one
is not yet supported by libavfilter.
I didn't check the code carefully yet, but I wonder how did you handle
filters like vf_screenshot or vf_hue which require some external
control/command to trigger some actions ?
I don't think there is any clean API to handle this in libavfilter.
And I don't think vf_screenshot can have any kind of usefullness inside
libavfilter.
And how did you handle filters like vf_remove_logo which fopen()
an image file and decode it internally, totally ingnoring several layers
of abstraction ?
I guess it should be handled by simply having a second input pad
allowing the application to feed it with any kind of decoded picture.
Overall I don't think we should import a whole bunch of filters like
this, without even trying all of them to check if they actually work
and they actally make any sens at all in the libavfilter context.
Aurel
More information about the ffmpeg-devel
mailing list