[FFmpeg-devel] [PATCH] Port gradfun to libavfilter (GCI)

Michael Niedermayer michaelni
Mon Nov 29 14:54:49 CET 2010


On Mon, Nov 29, 2010 at 07:18:14AM -0500, Nolan L wrote:
> As part of a GCI task, I've ported the gradfun debanding filter from mplayer
> to libavfilter.
> 
> The patch includes changes to the build system to account for CPU
> optimizations that weren't present previously.
> 
> There is a SSE2 method that remains unported due to lack of SSE2 detection
> in the configure script that I wasn't quite sure how to add.

>  Makefile            |    4 
>  allfilters.c        |    1 
>  gradfun.h           |   62 ++++++++++++
>  vf_gradfun.c        |  257 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  x86/Makefile        |    2 
>  x86/gradfun-mmx2.c  |   70 ++++++++++++++
>  x86/gradfun-sse2.c  |   66 +++++++++++++
>  x86/gradfun-ssse3.c |  115 +++++++++++++++++++++++
>  8 files changed, 577 insertions(+)
> d3c52fa681f698ed84d35e6e183dc16367ddc373  gradfun.patch
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index 210510f..f50c100 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -28,6 +28,7 @@ OBJS-$(CONFIG_FORMAT_FILTER)                 += vf_format.o
>  OBJS-$(CONFIG_FREI0R_FILTER)                 += vf_frei0r.o
>  OBJS-$(CONFIG_HFLIP_FILTER)                  += vf_hflip.o
>  OBJS-$(CONFIG_NOFORMAT_FILTER)               += vf_format.o
> +OBJS-$(CONFIG_GRADFUN_FILTER)                += vf_gradfun.o
>  OBJS-$(CONFIG_NULL_FILTER)                   += vf_null.o
>  OBJS-$(CONFIG_OCV_SMOOTH_FILTER)             += vf_libopencv.o
>  OBJS-$(CONFIG_OVERLAY_FILTER)                += vf_overlay.o
> @@ -52,6 +53,9 @@ OBJS-$(CONFIG_NULLSINK_FILTER)               += vsink_nullsink.o
>  
>  -include $(SUBDIR)$(ARCH)/Makefile
>  
> +OBJS-$(HAVE_MMX2)  += $(MMX2-OBJS-yes)
> +OBJS-$(HAVE_SSSE3) += $(SSSE3-OBJS-yes)
> +
>  DIRS = x86
>  
>  include $(SUBDIR)../subdir.mak
> diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
> index c3067b8..6ac517c 100644
> --- a/libavfilter/allfilters.c
> +++ b/libavfilter/allfilters.c
> @@ -48,6 +48,7 @@ void avfilter_register_all(void)
>      REGISTER_FILTER (FORMAT,      format,      vf);
>      REGISTER_FILTER (FREI0R,      frei0r,      vf);
>      REGISTER_FILTER (HFLIP,       hflip,       vf);
> +    REGISTER_FILTER (GRADFUN,     gradfun,     vf);
>      REGISTER_FILTER (NOFORMAT,    noformat,    vf);
>      REGISTER_FILTER (NULL,        null,        vf);
>      REGISTER_FILTER (OCV_SMOOTH,  ocv_smooth,  vf);

> diff --git a/libavfilter/gradfun.h b/libavfilter/gradfun.h
> new file mode 100644
> index 0000000..f67292b
> --- /dev/null
> +++ b/libavfilter/gradfun.h
[...]
> +#ifndef AVFILTER_YADIF_H
> +#define AVFILTER_YADIF_H

copy & paste typo


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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101129/1579f7da/attachment.pgp>



More information about the ffmpeg-devel mailing list