[FFmpeg-soc] libavfilter: port of Imlib2 vhook
Bobby Bingham
uhmmmm at gmail.com
Thu Dec 20 21:14:49 CET 2007
On Wed, 19 Dec 2007 16:09:08 +0100
"Víctor Paesa" <victorpaesa at googlemail.com> wrote:
> Hi,
>
> Here I attach a port of the Imlib2 vhook to the libavfilter API for
> your kind review/testing.
>
> I have not ported the -C option, as I favour the RGBA options.
> The vf_imlib2.c source is diff'ed from /dev/null, as diff'ing from
> vf_negate.c produces a less legible diff, IMHO.
>
> The source contains a few usage examples, usable too as test
> scenarios.
>
> Regards,
> Víctor
>
> Index: allfilters.h
> ===================================================================
> --- allfilters.h (revision 1447)
> +++ allfilters.h (working copy)
> @@ -27,6 +27,7 @@
> extern AVFilter avfilter_vf_graph;
> extern AVFilter avfilter_vf_graphdesc;
> extern AVFilter avfilter_vf_graphfile;
> +extern AVFilter avfilter_vf_imlib2;
> extern AVFilter avfilter_vf_negate;
> extern AVFilter avfilter_vf_overlay;
> extern AVFilter avfilter_vf_passthrough;
> Index: avfilter.c
> ===================================================================
> --- avfilter.c (revision 1447)
> +++ avfilter.c (working copy)
> @@ -340,6 +340,7 @@
> avfilter_register(&avfilter_vf_graph);
> avfilter_register(&avfilter_vf_graphdesc);
> avfilter_register(&avfilter_vf_graphfile);
> + avfilter_register(&avfilter_vf_imlib2);
> avfilter_register(&avfilter_vf_negate);
> avfilter_register(&avfilter_vf_overlay);
> avfilter_register(&avfilter_vf_passthrough);
Since the filter is compiled conditionally, shouldn't this also be
conditional?
Also, the rewritten colorspace negotiation code I just commit requires
a minor tweak to the filter. Attached patch should fix that for
vf_imlib2.
> Index: Makefile
> ===================================================================
> --- Makefile (revision 1447)
> +++ Makefile (working copy)
> @@ -23,6 +23,12 @@
>
> EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF)
> -L$(BUILD_ROOT)/libswscale -lswscale$(BUILDSUF)
> -L$(BUILD_ROOT)/libavcodec -lavcodec$(BUILDSUF) $(EXTRALIBS) +ifeq
> ($(HAVE_IMLIB2),yes)
> + OBJS-yes += vf_imlib2.o
> + CFLAGS += `imlib2-config --cflags`
> + EXTRALIBS += `imlib2-config --libs`
> +endif
> +
This seems to only work correctly with --enable-shared. I don't know
the build system well enough to suggest the right solution though.
--
Bobby Bingham
Never trust atoms. Or anything made of atoms.
このメールは再利用されたバイトでできている。
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imlib.colorspace.diff
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20071220/8ba0b04a/attachment.bin>
More information about the FFmpeg-soc
mailing list