[FFmpeg-devel] [PATCH] cleanup yadif build
Aurelien Jacobs
aurel
Mon Sep 27 23:48:31 CEST 2010
On Sun, Sep 26, 2010 at 11:27:25PM +0100, M?ns Rullg?rd wrote:
> Aurelien Jacobs <aurel at gnuage.org> writes:
>
> > Hi,
> >
> > First patch is a trivial simplification to avoid a #if.
> >
> > The second patch is a cleanup of the build process of libavfiler/x86/*.
> > It uses the same include scheme as in libavcodec, so that the x86
> > directory has its own Makefile. That way, x86/yadif.o is only built when
> > yadif is enabled and that MMX is available.
> >
> > Aurel
> >
> > Index: libavfilter/vf_yadif.c
> > ===================================================================
> > --- libavfilter/vf_yadif.c (revision 25213)
> > +++ libavfilter/vf_yadif.c (working copy)
> > @@ -295,10 +295,8 @@
> > if (args) sscanf(args, "%d:%d", &yadif->mode, &yadif->parity);
> >
> > yadif->filter_line = filter_line_c;
> > -#if HAVE_MMX
> > - if (cpu_flags & AV_CPU_FLAG_MMX)
> > + if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
> > yadif->filter_line = ff_yadif_filter_line_mmx;
> > -#endif
> >
> > av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d\n", yadif->mode, yadif->parity);
>
> I don't mind.
Applied.
> > Index: libavfilter/Makefile
> > ===================================================================
> > --- libavfilter/Makefile (revision 25213)
> > +++ libavfilter/Makefile (working copy)
> > @@ -38,14 +38,14 @@
> > OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o
> > OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o
> >
> > -OBJS-$(ARCH_X86) += x86/yadif.o
> > -
> > OBJS-$(CONFIG_BUFFER_FILTER) += vsrc_buffer.o
> > OBJS-$(CONFIG_COLOR_FILTER) += vf_pad.o
> > OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o
> >
> > OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
> >
> > +-include $(SUBDIR)$(ARCH)/Makefile
> > +
> > DIRS = x86
> >
> > include $(SUBDIR)../subdir.mak
> > Index: libavfilter/x86/Makefile
> > ===================================================================
> > --- /dev/null 2010-09-21 01:41:16.696000002 +0200
> > +++ libavfilter/x86/Makefile 2010-09-26 23:39:14.408531495 +0200
> > @@ -0,0 +1 @@
> > +MMX-OBJS-$(CONFIG_YADIF_FILTER) += x86/yadif.o
> > Index: libavfilter/x86/yadif.c
> > ===================================================================
> > --- libavfilter/x86/yadif.c (revision 25213)
> > +++ libavfilter/x86/yadif.c (working copy)
> > @@ -22,8 +22,6 @@
> > #include "libavutil/x86_cpu.h"
> > #include "libavfilter/yadif.h"
> >
> > -#if HAVE_MMX
> > -
> > #define LOAD4(mem,dst) \
> > "movd "mem", "#dst" \n\t"\
> > "punpcklbw %%mm7, "#dst" \n\t"
> > @@ -236,5 +234,3 @@
> > #undef CHECK1
> > #undef CHECK2
> > #undef FILTER
> > -
> > -#endif /* HAVE_MMX */
>
> OK and thanks.
Applied.
Aurel
More information about the ffmpeg-devel
mailing list