summaryrefslogtreecommitdiff
path: root/gst/effectv
diff options
context:
space:
mode:
Diffstat (limited to 'gst/effectv')
-rw-r--r--gst/effectv/Makefile.am36
-rwxr-xr-xgst/effectv/Makefile.in1026
-rw-r--r--gst/effectv/gstaging.c402
-rw-r--r--gst/effectv/gstaging.h89
-rw-r--r--gst/effectv/gstdice.c315
-rw-r--r--gst/effectv/gstdice.h75
-rw-r--r--gst/effectv/gstedge.c254
-rw-r--r--gst/effectv/gstedge.h70
-rw-r--r--gst/effectv/gsteffectv.c83
-rw-r--r--gst/effectv/gsteffectv.h33
-rw-r--r--gst/effectv/gstop.c422
-rw-r--r--gst/effectv/gstop.h74
-rw-r--r--gst/effectv/gstquark.c299
-rw-r--r--gst/effectv/gstquark.h71
-rw-r--r--gst/effectv/gstradioac.c634
-rw-r--r--gst/effectv/gstradioac.h87
-rwxr-xr-xgst/effectv/gstrev.c249
-rw-r--r--gst/effectv/gstrev.h87
-rw-r--r--gst/effectv/gstripple.c619
-rw-r--r--gst/effectv/gstripple.h86
-rw-r--r--gst/effectv/gstshagadelic.c258
-rw-r--r--gst/effectv/gstshagadelic.h72
-rw-r--r--gst/effectv/gststreak.c266
-rw-r--r--gst/effectv/gststreak.h74
-rw-r--r--gst/effectv/gstvertigo.c327
-rw-r--r--gst/effectv/gstvertigo.h71
-rw-r--r--gst/effectv/gstwarp.c266
-rw-r--r--gst/effectv/gstwarp.h67
28 files changed, 6412 insertions, 0 deletions
diff --git a/gst/effectv/Makefile.am b/gst/effectv/Makefile.am
new file mode 100644
index 0000000..d09111d
--- /dev/null
+++ b/gst/effectv/Makefile.am
@@ -0,0 +1,36 @@
+plugin_LTLIBRARIES = libgsteffectv.la
+
+libgsteffectv_la_SOURCES = \
+ gsteffectv.c gstedge.c gstaging.c gstdice.c gstwarp.c \
+ gstshagadelic.c gstvertigo.c gstrev.c gstquark.c gstop.c \
+ gstradioac.c gststreak.c gstripple.c
+libgsteffectv_la_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_BASE_CFLAGS) \
+ $(GST_CFLAGS) \
+ -I$(top_srcdir)/gst/videofilter
+libgsteffectv_la_LIBADD = \
+ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ \
+ $(GST_BASE_LIBS) \
+ $(GST_LIBS) \
+ $(LIBM)
+libgsteffectv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgsteffectv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+noinst_HEADERS = gsteffectv.h gstaging.h gstdice.h gstedge.h \
+ gstquark.h gstrev.h gstshagadelic.h gstvertigo.h gstwarp.h gstop.h \
+ gstradioac.h gststreak.h gstripple.h
+
+Android.mk: Makefile.am $(BUILT_SOURCES)
+ androgenizer \
+ -:PROJECT libgsteffectv -:SHARED libgsteffectv \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libgsteffectv_la_SOURCES) \
+ -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \
+ -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \
+ $(libgsteffectv_la_LIBADD) \
+ -ldl \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
+ > $@
diff --git a/gst/effectv/Makefile.in b/gst/effectv/Makefile.in
new file mode 100755
index 0000000..c21ddb0
--- /dev/null
+++ b/gst/effectv/Makefile.in
@@ -0,0 +1,1026 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = gst/effectv
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-libtool.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(plugindir)"
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libgsteffectv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_libgsteffectv_la_OBJECTS = libgsteffectv_la-gsteffectv.lo \
+ libgsteffectv_la-gstedge.lo libgsteffectv_la-gstaging.lo \
+ libgsteffectv_la-gstdice.lo libgsteffectv_la-gstwarp.lo \
+ libgsteffectv_la-gstshagadelic.lo \
+ libgsteffectv_la-gstvertigo.lo libgsteffectv_la-gstrev.lo \
+ libgsteffectv_la-gstquark.lo libgsteffectv_la-gstop.lo \
+ libgsteffectv_la-gstradioac.lo libgsteffectv_la-gststreak.lo \
+ libgsteffectv_la-gstripple.lo
+libgsteffectv_la_OBJECTS = $(am_libgsteffectv_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libgsteffectv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+ $(CCLD) $(libgsteffectv_la_CFLAGS) $(CFLAGS) \
+ $(libgsteffectv_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libgsteffectv_la_SOURCES)
+DIST_SOURCES = $(libgsteffectv_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LDFLAGS = @GIO_LDFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_AGE = @GST_AGE@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_API_VERSION = @GST_API_VERSION@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CURRENT = @GST_CURRENT@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LIBVERSION = @GST_LIBVERSION@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_NET_CFLAGS = @GST_NET_CFLAGS@
+GST_NET_LIBS = @GST_NET_LIBS@
+GST_OBJCFLAGS = @GST_OBJCFLAGS@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_REVISION = @GST_REVISION@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBRT = @LIBRT@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+VPX_130_CFLAGS = @VPX_130_CFLAGS@
+VPX_130_LIBS = @VPX_130_LIBS@
+VPX_CFLAGS = @VPX_CFLAGS@
+VPX_LIBS = @VPX_LIBS@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+plugin_LTLIBRARIES = libgsteffectv.la
+libgsteffectv_la_SOURCES = \
+ gsteffectv.c gstedge.c gstaging.c gstdice.c gstwarp.c \
+ gstshagadelic.c gstvertigo.c gstrev.c gstquark.c gstop.c \
+ gstradioac.c gststreak.c gstripple.c
+
+libgsteffectv_la_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_BASE_CFLAGS) \
+ $(GST_CFLAGS) \
+ -I$(top_srcdir)/gst/videofilter
+
+libgsteffectv_la_LIBADD = \
+ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ \
+ $(GST_BASE_LIBS) \
+ $(GST_LIBS) \
+ $(LIBM)
+
+libgsteffectv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgsteffectv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+noinst_HEADERS = gsteffectv.h gstaging.h gstdice.h gstedge.h \
+ gstquark.h gstrev.h gstshagadelic.h gstvertigo.h gstwarp.h gstop.h \
+ gstradioac.h gststreak.h gstripple.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/effectv/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu gst/effectv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
+ }
+
+uninstall-pluginLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
+ done
+
+clean-pluginLTLIBRARIES:
+ -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+ @list='$(plugin_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libgsteffectv.la: $(libgsteffectv_la_OBJECTS) $(libgsteffectv_la_DEPENDENCIES) $(EXTRA_libgsteffectv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libgsteffectv_la_LINK) -rpath $(plugindir) $(libgsteffectv_la_OBJECTS) $(libgsteffectv_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstaging.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstdice.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstedge.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gsteffectv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstquark.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstradioac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstrev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstripple.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstshagadelic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gststreak.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstvertigo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsteffectv_la-gstwarp.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libgsteffectv_la-gsteffectv.lo: gsteffectv.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gsteffectv.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gsteffectv.Tpo -c -o libgsteffectv_la-gsteffectv.lo `test -f 'gsteffectv.c' || echo '$(srcdir)/'`gsteffectv.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gsteffectv.Tpo $(DEPDIR)/libgsteffectv_la-gsteffectv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsteffectv.c' object='libgsteffectv_la-gsteffectv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gsteffectv.lo `test -f 'gsteffectv.c' || echo '$(srcdir)/'`gsteffectv.c
+
+libgsteffectv_la-gstedge.lo: gstedge.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstedge.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstedge.Tpo -c -o libgsteffectv_la-gstedge.lo `test -f 'gstedge.c' || echo '$(srcdir)/'`gstedge.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstedge.Tpo $(DEPDIR)/libgsteffectv_la-gstedge.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstedge.c' object='libgsteffectv_la-gstedge.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstedge.lo `test -f 'gstedge.c' || echo '$(srcdir)/'`gstedge.c
+
+libgsteffectv_la-gstaging.lo: gstaging.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstaging.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstaging.Tpo -c -o libgsteffectv_la-gstaging.lo `test -f 'gstaging.c' || echo '$(srcdir)/'`gstaging.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstaging.Tpo $(DEPDIR)/libgsteffectv_la-gstaging.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstaging.c' object='libgsteffectv_la-gstaging.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstaging.lo `test -f 'gstaging.c' || echo '$(srcdir)/'`gstaging.c
+
+libgsteffectv_la-gstdice.lo: gstdice.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstdice.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstdice.Tpo -c -o libgsteffectv_la-gstdice.lo `test -f 'gstdice.c' || echo '$(srcdir)/'`gstdice.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstdice.Tpo $(DEPDIR)/libgsteffectv_la-gstdice.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstdice.c' object='libgsteffectv_la-gstdice.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstdice.lo `test -f 'gstdice.c' || echo '$(srcdir)/'`gstdice.c
+
+libgsteffectv_la-gstwarp.lo: gstwarp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstwarp.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstwarp.Tpo -c -o libgsteffectv_la-gstwarp.lo `test -f 'gstwarp.c' || echo '$(srcdir)/'`gstwarp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstwarp.Tpo $(DEPDIR)/libgsteffectv_la-gstwarp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstwarp.c' object='libgsteffectv_la-gstwarp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstwarp.lo `test -f 'gstwarp.c' || echo '$(srcdir)/'`gstwarp.c
+
+libgsteffectv_la-gstshagadelic.lo: gstshagadelic.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstshagadelic.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstshagadelic.Tpo -c -o libgsteffectv_la-gstshagadelic.lo `test -f 'gstshagadelic.c' || echo '$(srcdir)/'`gstshagadelic.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstshagadelic.Tpo $(DEPDIR)/libgsteffectv_la-gstshagadelic.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstshagadelic.c' object='libgsteffectv_la-gstshagadelic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstshagadelic.lo `test -f 'gstshagadelic.c' || echo '$(srcdir)/'`gstshagadelic.c
+
+libgsteffectv_la-gstvertigo.lo: gstvertigo.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstvertigo.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstvertigo.Tpo -c -o libgsteffectv_la-gstvertigo.lo `test -f 'gstvertigo.c' || echo '$(srcdir)/'`gstvertigo.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstvertigo.Tpo $(DEPDIR)/libgsteffectv_la-gstvertigo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstvertigo.c' object='libgsteffectv_la-gstvertigo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstvertigo.lo `test -f 'gstvertigo.c' || echo '$(srcdir)/'`gstvertigo.c
+
+libgsteffectv_la-gstrev.lo: gstrev.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstrev.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstrev.Tpo -c -o libgsteffectv_la-gstrev.lo `test -f 'gstrev.c' || echo '$(srcdir)/'`gstrev.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstrev.Tpo $(DEPDIR)/libgsteffectv_la-gstrev.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstrev.c' object='libgsteffectv_la-gstrev.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstrev.lo `test -f 'gstrev.c' || echo '$(srcdir)/'`gstrev.c
+
+libgsteffectv_la-gstquark.lo: gstquark.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstquark.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstquark.Tpo -c -o libgsteffectv_la-gstquark.lo `test -f 'gstquark.c' || echo '$(srcdir)/'`gstquark.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstquark.Tpo $(DEPDIR)/libgsteffectv_la-gstquark.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstquark.c' object='libgsteffectv_la-gstquark.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstquark.lo `test -f 'gstquark.c' || echo '$(srcdir)/'`gstquark.c
+
+libgsteffectv_la-gstop.lo: gstop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstop.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstop.Tpo -c -o libgsteffectv_la-gstop.lo `test -f 'gstop.c' || echo '$(srcdir)/'`gstop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstop.Tpo $(DEPDIR)/libgsteffectv_la-gstop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstop.c' object='libgsteffectv_la-gstop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstop.lo `test -f 'gstop.c' || echo '$(srcdir)/'`gstop.c
+
+libgsteffectv_la-gstradioac.lo: gstradioac.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstradioac.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstradioac.Tpo -c -o libgsteffectv_la-gstradioac.lo `test -f 'gstradioac.c' || echo '$(srcdir)/'`gstradioac.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstradioac.Tpo $(DEPDIR)/libgsteffectv_la-gstradioac.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstradioac.c' object='libgsteffectv_la-gstradioac.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstradioac.lo `test -f 'gstradioac.c' || echo '$(srcdir)/'`gstradioac.c
+
+libgsteffectv_la-gststreak.lo: gststreak.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gststreak.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gststreak.Tpo -c -o libgsteffectv_la-gststreak.lo `test -f 'gststreak.c' || echo '$(srcdir)/'`gststreak.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gststreak.Tpo $(DEPDIR)/libgsteffectv_la-gststreak.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gststreak.c' object='libgsteffectv_la-gststreak.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gststreak.lo `test -f 'gststreak.c' || echo '$(srcdir)/'`gststreak.c
+
+libgsteffectv_la-gstripple.lo: gstripple.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -MT libgsteffectv_la-gstripple.lo -MD -MP -MF $(DEPDIR)/libgsteffectv_la-gstripple.Tpo -c -o libgsteffectv_la-gstripple.lo `test -f 'gstripple.c' || echo '$(srcdir)/'`gstripple.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsteffectv_la-gstripple.Tpo $(DEPDIR)/libgsteffectv_la-gstripple.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstripple.c' object='libgsteffectv_la-gstripple.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgsteffectv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsteffectv_la_CFLAGS) $(CFLAGS) -c -o libgsteffectv_la-gstripple.lo `test -f 'gstripple.c' || echo '$(srcdir)/'`gstripple.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(plugindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pluginLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pluginLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-pluginLTLIBRARIES install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-pluginLTLIBRARIES
+
+
+Android.mk: Makefile.am $(BUILT_SOURCES)
+ androgenizer \
+ -:PROJECT libgsteffectv -:SHARED libgsteffectv \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libgsteffectv_la_SOURCES) \
+ -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \
+ -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \
+ $(libgsteffectv_la_LIBADD) \
+ -ldl \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
+ > $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
new file mode 100644
index 0000000..c6bfa11
--- /dev/null
+++ b/gst/effectv/gstaging.c
@@ -0,0 +1,402 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * AgingTV - film-aging effect.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-agingtv
+ *
+ * AgingTV ages a video stream in realtime, changes the colors and adds
+ * scratches and dust.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! agingtv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of agingtv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <math.h>
+
+#include "gstaging.h"
+#include "gsteffectv.h"
+
+static const gint dx[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
+static const gint dy[8] = { 0, -1, -1, -1, 0, 1, 1, 1 };
+
+enum
+{
+ PROP_0 = 0,
+ PROP_SCRATCH_LINES,
+ PROP_COLOR_AGING,
+ PROP_PITS,
+ PROP_DUSTS
+};
+
+#define DEFAULT_SCRATCH_LINES 7
+#define DEFAULT_COLOR_AGING TRUE
+#define DEFAULT_PITS TRUE
+#define DEFAULT_DUSTS TRUE
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xRGB, xBGR }")
+#endif
+
+static GstStaticPadTemplate gst_agingtv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_agingtv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+G_DEFINE_TYPE (GstAgingTV, gst_agingtv, GST_TYPE_VIDEO_FILTER);
+
+static void
+coloraging (guint32 * src, guint32 * dest, gint video_area, gint * c)
+{
+ guint32 a, b;
+ gint i;
+ gint c_tmp = *c;
+
+ c_tmp -= (gint) (fastrand ()) >> 28;
+ if (c_tmp < 0)
+ c_tmp = 0;
+ if (c_tmp > 0x18)
+ c_tmp = 0x18;
+
+ for (i = 0; i < video_area; i++) {
+ a = *src++;
+ b = (a & 0xfcfcfc) >> 2;
+ *dest++ =
+ a - b + (c_tmp | (c_tmp << 8) | (c_tmp << 16)) +
+ ((fastrand () >> 8) & 0x101010);
+ }
+ *c = c_tmp;
+}
+
+
+static void
+scratching (scratch * scratches, gint scratch_lines, guint32 * dest, gint width,
+ gint height)
+{
+ gint i, y, y1, y2;
+ guint32 *p, a, b;
+ scratch *scratch;
+
+ for (i = 0; i < scratch_lines; i++) {
+ scratch = &scratches[i];
+
+ if (scratch->life) {
+ scratch->x = scratch->x + scratch->dx;
+
+ if (scratch->x < 0 || scratch->x > width * 256) {
+ scratch->life = 0;
+ break;
+ }
+ p = dest + (scratch->x >> 8);
+ if (scratch->init) {
+ y1 = scratch->init;
+ scratch->init = 0;
+ } else {
+ y1 = 0;
+ }
+ scratch->life--;
+ if (scratch->life) {
+ y2 = height;
+ } else {
+ y2 = fastrand () % height;
+ }
+ for (y = y1; y < y2; y++) {
+ a = *p & 0xfefeff;
+ a += 0x202020;
+ b = a & 0x1010100;
+ *p = a | (b - (b >> 8));
+ p += width;
+ }
+ } else {
+ if ((fastrand () & 0xf0000000) == 0) {
+ scratch->life = 2 + (fastrand () >> 27);
+ scratch->x = fastrand () % (width * 256);
+ scratch->dx = ((int) fastrand ()) >> 23;
+ scratch->init = (fastrand () % (height - 1)) + 1;
+ }
+ }
+ }
+}
+
+static void
+dusts (guint32 * dest, gint width, gint height, gint * dust_interval,
+ gint area_scale)
+{
+ gint i, j;
+ gint dnum;
+ gint d, len;
+ guint x, y;
+
+ if (*dust_interval == 0) {
+ if ((fastrand () & 0xf0000000) == 0) {
+ *dust_interval = fastrand () >> 29;
+ }
+ return;
+ }
+ dnum = area_scale * 4 + (fastrand () >> 27);
+
+ for (i = 0; i < dnum; i++) {
+ x = fastrand () % width;
+ y = fastrand () % height;
+ d = fastrand () >> 29;
+ len = fastrand () % area_scale + 5;
+ for (j = 0; j < len; j++) {
+ dest[y * width + x] = 0x101010;
+ y += dy[d];
+ x += dx[d];
+
+ if (y >= height || x >= width)
+ break;
+
+ d = (d + fastrand () % 3 - 1) & 7;
+ }
+ }
+ *dust_interval = *dust_interval - 1;
+}
+
+static void
+pits (guint32 * dest, gint width, gint height, gint area_scale,
+ gint * pits_interval)
+{
+ gint i, j;
+ gint pnum, size, pnumscale;
+ guint x, y;
+
+ pnumscale = area_scale * 2;
+ if (*pits_interval) {
+ pnum = pnumscale + (fastrand () % pnumscale);
+
+ *pits_interval = *pits_interval - 1;
+ } else {
+ pnum = fastrand () % pnumscale;
+
+ if ((fastrand () & 0xf8000000) == 0) {
+ *pits_interval = (fastrand () >> 28) + 20;
+ }
+ }
+ for (i = 0; i < pnum; i++) {
+ x = fastrand () % (width - 1);
+ y = fastrand () % (height - 1);
+
+ size = fastrand () >> 28;
+
+ for (j = 0; j < size; j++) {
+ x = x + fastrand () % 3 - 1;
+ y = y + fastrand () % 3 - 1;
+
+ if (y >= height || x >= width)
+ break;
+
+ dest[y * width + x] = 0xc0c0c0;
+ }
+ }
+}
+
+static void
+gst_agingtv_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec)
+{
+ GstAgingTV *agingtv = GST_AGINGTV (object);
+
+ GST_OBJECT_LOCK (agingtv);
+ switch (prop_id) {
+ case PROP_SCRATCH_LINES:
+ g_value_set_uint (value, agingtv->scratch_lines);
+ break;
+ case PROP_COLOR_AGING:
+ g_value_set_boolean (value, agingtv->color_aging);
+ break;
+ case PROP_PITS:
+ g_value_set_boolean (value, agingtv->pits);
+ break;
+ case PROP_DUSTS:
+ g_value_set_boolean (value, agingtv->dusts);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+ GST_OBJECT_UNLOCK (agingtv);
+}
+
+static void
+gst_agingtv_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstAgingTV *agingtv = GST_AGINGTV (object);
+
+ switch (prop_id) {
+ case PROP_SCRATCH_LINES:
+ agingtv->scratch_lines = g_value_get_uint (value);
+ break;
+ case PROP_COLOR_AGING:
+ agingtv->color_aging = g_value_get_boolean (value);
+ break;
+ case PROP_PITS:
+ agingtv->pits = g_value_get_boolean (value);
+ break;
+ case PROP_DUSTS:
+ agingtv->dusts = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static gboolean
+gst_agingtv_start (GstBaseTransform * trans)
+{
+ GstAgingTV *agingtv = GST_AGINGTV (trans);
+
+ agingtv->coloraging_state = 0x18;
+ agingtv->dust_interval = 0;
+ agingtv->pits_interval = 0;
+
+ memset (agingtv->scratches, 0, sizeof (agingtv->scratches));
+
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_agingtv_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstAgingTV *agingtv = GST_AGINGTV (filter);
+ gint area_scale;
+ GstClockTime timestamp, stream_time;
+ gint width, height, stride, video_size;
+ guint32 *src, *dest;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (filter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (agingtv, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (agingtv), stream_time);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+ stride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
+ video_size = stride * height / 4;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ area_scale = width * height / 64 / 480;
+ if (area_scale <= 0)
+ area_scale = 1;
+
+ if (agingtv->color_aging)
+ coloraging (src, dest, video_size, &agingtv->coloraging_state);
+ else
+ memcpy (dest, src, video_size);
+
+ scratching (agingtv->scratches, agingtv->scratch_lines, dest, width, height);
+ if (agingtv->pits)
+ pits (dest, width, height, area_scale, &agingtv->pits_interval);
+ if (area_scale > 1 && agingtv->dusts)
+ dusts (dest, width, height, &agingtv->dust_interval, area_scale);
+
+ return GST_FLOW_OK;
+}
+
+static void
+gst_agingtv_class_init (GstAgingTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_agingtv_set_property;
+ gobject_class->get_property = gst_agingtv_get_property;
+
+ g_object_class_install_property (gobject_class, PROP_SCRATCH_LINES,
+ g_param_spec_uint ("scratch-lines", "Scratch Lines",
+ "Number of scratch lines", 0, SCRATCH_MAX, DEFAULT_SCRATCH_LINES,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ g_object_class_install_property (gobject_class, PROP_COLOR_AGING,
+ g_param_spec_boolean ("color-aging", "Color Aging",
+ "Color Aging", DEFAULT_COLOR_AGING,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ g_object_class_install_property (gobject_class, PROP_PITS,
+ g_param_spec_boolean ("pits", "Pits",
+ "Pits", DEFAULT_PITS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ g_object_class_install_property (gobject_class, PROP_DUSTS,
+ g_param_spec_boolean ("dusts", "Dusts",
+ "Dusts", DEFAULT_DUSTS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ gst_element_class_set_static_metadata (gstelement_class, "AgingTV effect",
+ "Filter/Effect/Video",
+ "AgingTV adds age to video input using scratches and dust",
+ "Sam Lantinga <slouken@devolution.com>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_agingtv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_agingtv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_agingtv_start);
+
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_agingtv_transform_frame);
+}
+
+static void
+gst_agingtv_init (GstAgingTV * agingtv)
+{
+ agingtv->scratch_lines = DEFAULT_SCRATCH_LINES;
+ agingtv->color_aging = DEFAULT_COLOR_AGING;
+ agingtv->pits = DEFAULT_PITS;
+ agingtv->dusts = DEFAULT_DUSTS;
+}
diff --git a/gst/effectv/gstaging.h b/gst/effectv/gstaging.h
new file mode 100644
index 0000000..52466d1
--- /dev/null
+++ b/gst/effectv/gstaging.h
@@ -0,0 +1,89 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * AgingTV - film-aging effect.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_AGING_H__
+#define __GST_AGING_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_AGINGTV \
+ (gst_agingtv_get_type())
+#define GST_AGINGTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AGINGTV,GstAgingTV))
+#define GST_AGINGTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AGINGTV,GstAgingTVClass))
+#define GST_IS_AGINGTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AGINGTV))
+#define GST_IS_AGINGTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGINGTV))
+
+typedef struct _scratch
+{
+ gint life;
+ gint x;
+ gint dx;
+ gint init;
+} scratch;
+#define SCRATCH_MAX 20
+
+typedef struct _GstAgingTV GstAgingTV;
+typedef struct _GstAgingTVClass GstAgingTVClass;
+
+struct _GstAgingTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ gboolean color_aging;
+ gboolean pits;
+ gboolean dusts;
+
+ gint coloraging_state;
+
+ scratch scratches[SCRATCH_MAX];
+ gint scratch_lines;
+
+ gint dust_interval;
+ gint pits_interval;
+
+};
+
+struct _GstAgingTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_agingtv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_AGING_H__ */
+
diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c
new file mode 100644
index 0000000..7c90b66
--- /dev/null
+++ b/gst/effectv/gstdice.c
@@ -0,0 +1,315 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * dice.c: a 'dicing' effect
+ * copyright (c) 2001 Sam Mertens. This code is subject to the provisions of
+ * the GNU Library Public License.
+ *
+ * I suppose this looks similar to PuzzleTV, but it's not. The screen is
+ * divided into small squares, each of which is rotated either 0, 90, 180 or
+ * 270 degrees. The amount of rotation for each square is chosen at random.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-dicetv
+ *
+ * DiceTV 'dices' the screen up into many small squares, each defaulting
+ * to a size of 16 pixels by 16 pixels.. Each square is rotated randomly
+ * in one of four directions: up (no change), down (180 degrees, or
+ * upside down), right (90 degrees clockwise), or left (90 degrees
+ * counterclockwise). The direction of each square normally remains
+ * consistent between each frame.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! dicetv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of dicetv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+
+#include "gstdice.h"
+#include "gsteffectv.h"
+
+#define DEFAULT_CUBE_BITS 4
+#define MAX_CUBE_BITS 5
+#define MIN_CUBE_BITS 0
+
+typedef enum _dice_dir
+{
+ DICE_UP = 0,
+ DICE_RIGHT = 1,
+ DICE_DOWN = 2,
+ DICE_LEFT = 3
+} DiceDir;
+
+#define gst_dicetv_parent_class parent_class
+G_DEFINE_TYPE (GstDiceTV, gst_dicetv, GST_TYPE_VIDEO_FILTER);
+
+static void gst_dicetv_create_map (GstDiceTV * filter, GstVideoInfo * info);
+
+static GstStaticPadTemplate gst_dicetv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR }"))
+ );
+
+static GstStaticPadTemplate gst_dicetv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR }"))
+ );
+
+enum
+{
+ PROP_0,
+ PROP_CUBE_BITS
+};
+
+static gboolean
+gst_dicetv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstDiceTV *filter = GST_DICETV (vfilter);
+
+ g_free (filter->dicemap);
+ filter->dicemap =
+ (guint8 *) g_malloc (GST_VIDEO_INFO_WIDTH (in_info) *
+ GST_VIDEO_INFO_WIDTH (in_info));
+ gst_dicetv_create_map (filter, in_info);
+
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_dicetv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstDiceTV *filter = GST_DICETV (vfilter);
+ guint32 *src, *dest;
+ gint i, map_x, map_y, map_i, base, dx, dy, di;
+ gint video_stride, g_cube_bits, g_cube_size;
+ gint g_map_height, g_map_width;
+ GstClockTime timestamp, stream_time;
+ const guint8 *dicemap;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (vfilter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ src = (guint32 *) GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = (guint32 *) GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+ video_stride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
+
+ GST_OBJECT_LOCK (filter);
+ g_cube_bits = filter->g_cube_bits;
+ g_cube_size = filter->g_cube_size;
+ g_map_height = filter->g_map_height;
+ g_map_width = filter->g_map_width;
+
+ dicemap = filter->dicemap;
+ video_stride /= 4;
+
+ map_i = 0;
+ for (map_y = 0; map_y < g_map_height; map_y++) {
+ for (map_x = 0; map_x < g_map_width; map_x++) {
+ base = (map_y << g_cube_bits) * video_stride + (map_x << g_cube_bits);
+
+ switch (dicemap[map_i]) {
+ case DICE_UP:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + dy * video_stride;
+ for (dx = 0; dx < g_cube_size; dx++) {
+ dest[i] = src[i];
+ i++;
+ }
+ }
+ break;
+ case DICE_LEFT:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + dy * video_stride;
+
+ for (dx = 0; dx < g_cube_size; dx++) {
+ di = base + (dx * video_stride) + (g_cube_size - dy - 1);
+ dest[di] = src[i];
+ i++;
+ }
+ }
+ break;
+ case DICE_DOWN:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ di = base + dy * video_stride;
+ i = base + (g_cube_size - dy - 1) * video_stride + g_cube_size;
+ for (dx = 0; dx < g_cube_size; dx++) {
+ i--;
+ dest[di] = src[i];
+ di++;
+ }
+ }
+ break;
+ case DICE_RIGHT:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + (dy * video_stride);
+ for (dx = 0; dx < g_cube_size; dx++) {
+ di = base + dy + (g_cube_size - dx - 1) * video_stride;
+ dest[di] = src[i];
+ i++;
+ }
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+ map_i++;
+ }
+ }
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static void
+gst_dicetv_create_map (GstDiceTV * filter, GstVideoInfo * info)
+{
+ gint x, y, i;
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (info);
+ height = GST_VIDEO_INFO_HEIGHT (info);
+
+ if (width <= 0 || height <= 0)
+ return;
+
+ filter->g_map_height = height >> filter->g_cube_bits;
+ filter->g_map_width = width >> filter->g_cube_bits;
+ filter->g_cube_size = 1 << filter->g_cube_bits;
+
+ i = 0;
+
+ for (y = 0; y < filter->g_map_height; y++) {
+ for (x = 0; x < filter->g_map_width; x++) {
+ // dicemap[i] = ((i + y) & 0x3); /* Up, Down, Left or Right */
+ filter->dicemap[i] = (fastrand () >> 24) & 0x03;
+ i++;
+ }
+ }
+}
+
+static void
+gst_dicetv_set_property (GObject * object, guint prop_id, const GValue * value,
+ GParamSpec * pspec)
+{
+ GstDiceTV *filter = GST_DICETV (object);
+
+ switch (prop_id) {
+ case PROP_CUBE_BITS:
+ GST_OBJECT_LOCK (filter);
+ filter->g_cube_bits = g_value_get_int (value);
+ gst_dicetv_create_map (filter, &GST_VIDEO_FILTER (filter)->in_info);
+ GST_OBJECT_UNLOCK (filter);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_dicetv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstDiceTV *filter = GST_DICETV (object);
+
+ switch (prop_id) {
+ case PROP_CUBE_BITS:
+ g_value_set_int (value, filter->g_cube_bits);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_dicetv_finalize (GObject * object)
+{
+ GstDiceTV *filter = GST_DICETV (object);
+
+ g_free (filter->dicemap);
+ filter->dicemap = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_dicetv_class_init (GstDiceTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_dicetv_set_property;
+ gobject_class->get_property = gst_dicetv_get_property;
+ gobject_class->finalize = gst_dicetv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_CUBE_BITS,
+ g_param_spec_int ("square-bits", "Square Bits", "The size of the Squares",
+ MIN_CUBE_BITS, MAX_CUBE_BITS, DEFAULT_CUBE_BITS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ gst_element_class_set_static_metadata (gstelement_class, "DiceTV effect",
+ "Filter/Effect/Video",
+ "'Dices' the screen up into many small squares",
+ "Wim Taymans <wim.taymans@gmail.be>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_dicetv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_dicetv_src_template));
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_dicetv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_dicetv_transform_frame);
+}
+
+static void
+gst_dicetv_init (GstDiceTV * filter)
+{
+ filter->dicemap = NULL;
+ filter->g_cube_bits = DEFAULT_CUBE_BITS;
+ filter->g_cube_size = 0;
+ filter->g_map_height = 0;
+ filter->g_map_width = 0;
+}
diff --git a/gst/effectv/gstdice.h b/gst/effectv/gstdice.h
new file mode 100644
index 0000000..4c14c97
--- /dev/null
+++ b/gst/effectv/gstdice.h
@@ -0,0 +1,75 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * dice.c: a 'dicing' effect
+ * copyright (c) 2001 Sam Mertens. This code is subject to the provisions of
+ * the GNU Library Public License.
+ *
+ * I suppose this looks similar to PuzzleTV, but it's not. The screen is
+ * divided into small squares, each of which is rotated either 0, 90, 180 or
+ * 270 degrees. The amount of rotation for each square is chosen at random.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_DICE_H__
+#define __GST_DICE_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_DICETV \
+ (gst_dicetv_get_type())
+#define GST_DICETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DICETV,GstDiceTV))
+#define GST_DICETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DICETV,GstDiceTVClass))
+#define GST_IS_DICETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DICETV))
+#define GST_IS_DICETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DICETV))
+
+typedef struct _GstDiceTV GstDiceTV;
+typedef struct _GstDiceTVClass GstDiceTVClass;
+
+struct _GstDiceTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ guint8 *dicemap;
+
+ gint g_cube_bits;
+ gint g_cube_size;
+ gint g_map_height;
+ gint g_map_width;
+};
+
+struct _GstDiceTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_dicetv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_DICE_H__ */
diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c
new file mode 100644
index 0000000..d7fe89b
--- /dev/null
+++ b/gst/effectv/gstedge.c
@@ -0,0 +1,254 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV:
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * EdgeTV - detects edge and display it in good old computer way
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-edgetv
+ *
+ * EdgeTV detects edges and display it in good old low resolution
+ * computer way.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! edgetv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of edgetv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+
+#include "gstedge.h"
+
+#define gst_edgetv_parent_class parent_class
+G_DEFINE_TYPE (GstEdgeTV, gst_edgetv, GST_TYPE_VIDEO_FILTER);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xBGR, xRGB }")
+#endif
+
+static GstStaticPadTemplate gst_edgetv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_edgetv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static gboolean
+gst_edgetv_set_info (GstVideoFilter * filter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstEdgeTV *edgetv = GST_EDGETV (filter);
+ guint map_size;
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ edgetv->map_width = width / 4;
+ edgetv->map_height = height / 4;
+ edgetv->video_width_margin = width % 4;
+
+ map_size = edgetv->map_width * edgetv->map_height * sizeof (guint32) * 2;
+
+ g_free (edgetv->map);
+ edgetv->map = (guint32 *) g_malloc0 (map_size);
+
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_edgetv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstEdgeTV *filter = GST_EDGETV (vfilter);
+ gint x, y, r, g, b;
+ guint32 *src, *dest;
+ guint32 p, q;
+ guint32 v0, v1, v2, v3;
+ gint width, map_height, map_width;
+ gint video_width_margin;
+ guint32 *map;
+ GstFlowReturn ret = GST_FLOW_OK;
+
+ map = filter->map;
+ map_height = filter->map_height;
+ map_width = filter->map_width;
+ video_width_margin = filter->video_width_margin;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+
+ src += width * 4 + 4;
+ dest += width * 4 + 4;
+
+ for (y = 1; y < map_height - 1; y++) {
+ for (x = 1; x < map_width - 1; x++) {
+ p = *src;
+ q = *(src - 4);
+
+ /* difference between the current pixel and left neighbor. */
+ r = ((p & 0xff0000) - (q & 0xff0000)) >> 16;
+ g = ((p & 0xff00) - (q & 0xff00)) >> 8;
+ b = (p & 0xff) - (q & 0xff);
+ r *= r;
+ g *= g;
+ b *= b;
+ r = r >> 5; /* To lack the lower bit for saturated addition, */
+ g = g >> 5; /* devide the value with 32, instead of 16. It is */
+ b = b >> 4; /* same as `v2 &= 0xfefeff' */
+ if (r > 127)
+ r = 127;
+ if (g > 127)
+ g = 127;
+ if (b > 255)
+ b = 255;
+ v2 = (r << 17) | (g << 9) | b;
+
+ /* difference between the current pixel and upper neighbor. */
+ q = *(src - width * 4);
+ r = ((p & 0xff0000) - (q & 0xff0000)) >> 16;
+ g = ((p & 0xff00) - (q & 0xff00)) >> 8;
+ b = (p & 0xff) - (q & 0xff);
+ r *= r;
+ g *= g;
+ b *= b;
+ r = r >> 5;
+ g = g >> 5;
+ b = b >> 4;
+ if (r > 127)
+ r = 127;
+ if (g > 127)
+ g = 127;
+ if (b > 255)
+ b = 255;
+ v3 = (r << 17) | (g << 9) | b;
+
+ v0 = map[(y - 1) * map_width * 2 + x * 2];
+ v1 = map[y * map_width * 2 + (x - 1) * 2 + 1];
+ map[y * map_width * 2 + x * 2] = v2;
+ map[y * map_width * 2 + x * 2 + 1] = v3;
+ r = v0 + v1;
+ g = r & 0x01010100;
+ dest[0] = r | (g - (g >> 8));
+ r = v0 + v3;
+ g = r & 0x01010100;
+ dest[1] = r | (g - (g >> 8));
+ dest[2] = v3;
+ dest[3] = v3;
+ r = v2 + v1;
+ g = r & 0x01010100;
+ dest[width] = r | (g - (g >> 8));
+ r = v2 + v3;
+ g = r & 0x01010100;
+ dest[width + 1] = r | (g - (g >> 8));
+ dest[width + 2] = v3;
+ dest[width + 3] = v3;
+ dest[width * 2] = v2;
+ dest[width * 2 + 1] = v2;
+ dest[width * 2 + 2] = 0;
+ dest[width * 2 + 3] = 0;
+ dest[width * 3] = v2;
+ dest[width * 3 + 1] = v2;
+ dest[width * 3 + 2] = 0;
+ dest[width * 3 + 3] = 0;
+
+ src += 4;
+ dest += 4;
+ }
+ src += width * 3 + 8 + video_width_margin;
+ dest += width * 3 + 8 + video_width_margin;
+ }
+
+ return ret;
+}
+
+static gboolean
+gst_edgetv_start (GstBaseTransform * trans)
+{
+ GstEdgeTV *edgetv = GST_EDGETV (trans);
+
+ if (edgetv->map)
+ memset (edgetv->map, 0,
+ edgetv->map_width * edgetv->map_height * sizeof (guint32) * 2);
+ return TRUE;
+}
+
+static void
+gst_edgetv_finalize (GObject * object)
+{
+ GstEdgeTV *edgetv = GST_EDGETV (object);
+
+ g_free (edgetv->map);
+ edgetv->map = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_edgetv_class_init (GstEdgeTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->finalize = gst_edgetv_finalize;
+
+ gst_element_class_set_static_metadata (gstelement_class, "EdgeTV effect",
+ "Filter/Effect/Video",
+ "Apply edge detect on video", "Wim Taymans <wim.taymans@chello.be>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_edgetv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_edgetv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_edgetv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_edgetv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_edgetv_transform_frame);
+}
+
+static void
+gst_edgetv_init (GstEdgeTV * edgetv)
+{
+}
diff --git a/gst/effectv/gstedge.h b/gst/effectv/gstedge.h
new file mode 100644
index 0000000..290c312
--- /dev/null
+++ b/gst/effectv/gstedge.h
@@ -0,0 +1,70 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV:
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * EdgeTV - detects edge and display it in good old computer way
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_EDGE_H__
+#define __GST_EDGE_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_EDGETV \
+ (gst_edgetv_get_type())
+#define GST_EDGETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EDGETV,GstEdgeTV))
+#define GST_EDGETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EDGETV,GstEdgeTVClass))
+#define GST_IS_EDGETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EDGETV))
+#define GST_IS_EDGETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EDGETV))
+
+typedef struct _GstEdgeTV GstEdgeTV;
+typedef struct _GstEdgeTVClass GstEdgeTVClass;
+
+struct _GstEdgeTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ gint map_width, map_height;
+ guint32 *map;
+ gint video_width_margin;
+};
+
+struct _GstEdgeTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_edgetv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_EDGE_H__ */
diff --git a/gst/effectv/gsteffectv.c b/gst/effectv/gsteffectv.c
new file mode 100644
index 0000000..0e9ffc0
--- /dev/null
+++ b/gst/effectv/gsteffectv.c
@@ -0,0 +1,83 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gsteffectv.h"
+#include "gstaging.h"
+#include "gstdice.h"
+#include "gstedge.h"
+#include "gstquark.h"
+#include "gstrev.h"
+#include "gstshagadelic.h"
+#include "gstvertigo.h"
+#include "gstwarp.h"
+#include "gstop.h"
+#include "gstradioac.h"
+#include "gststreak.h"
+#include "gstripple.h"
+
+struct _elements_entry
+{
+ const gchar *name;
+ GType (*type) (void);
+};
+
+static const struct _elements_entry _elements[] = {
+ {"edgetv", gst_edgetv_get_type},
+ {"agingtv", gst_agingtv_get_type},
+ {"dicetv", gst_dicetv_get_type},
+ {"warptv", gst_warptv_get_type},
+ {"shagadelictv", gst_shagadelictv_get_type},
+ {"vertigotv", gst_vertigotv_get_type},
+ {"revtv", gst_revtv_get_type},
+ {"quarktv", gst_quarktv_get_type},
+ {"optv", gst_optv_get_type},
+ {"radioactv", gst_radioactv_get_type},
+ {"streaktv", gst_streaktv_get_type},
+ {"rippletv", gst_rippletv_get_type},
+ {NULL, 0},
+};
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ gint i = 0;
+
+ while (_elements[i].name) {
+ if (!gst_element_register (plugin, _elements[i].name,
+ GST_RANK_NONE, (_elements[i].type) ()))
+ return FALSE;
+ i++;
+ }
+
+ return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ effectv,
+ "effect plugins from the effectv project",
+ plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gst/effectv/gsteffectv.h b/gst/effectv/gsteffectv.h
new file mode 100644
index 0000000..0f00799
--- /dev/null
+++ b/gst/effectv/gsteffectv.h
@@ -0,0 +1,33 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/gst.h>
+
+static inline guint
+fastrand (void)
+{
+ static guint fastrand_val;
+
+ return (fastrand_val = fastrand_val * 1103515245 + 12345);
+}
+
diff --git a/gst/effectv/gstop.c b/gst/effectv/gstop.c
new file mode 100644
index 0000000..d91a375
--- /dev/null
+++ b/gst/effectv/gstop.c
@@ -0,0 +1,422 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * OpTV - Optical art meets real-time video effect.
+ * Copyright (C) 2004-2005 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-optv
+ *
+ * Traditional black-white optical animation is now resurrected as a
+ * real-time video effect. Input images are binarized and combined with
+ * various optical pattern.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! optv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of optv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstop.h"
+#include "gsteffectv.h"
+
+#include <gst/video/video.h>
+
+enum
+{
+ OP_SPIRAL1 = 0,
+ OP_SPIRAL2,
+ OP_PARABOLA,
+ OP_HSTRIPE
+};
+
+#define GST_TYPE_OPTV_MODE (gst_optv_mode_get_type())
+static GType
+gst_optv_mode_get_type (void)
+{
+ static GType type = 0;
+
+ static const GEnumValue enumvalue[] = {
+ {OP_SPIRAL1, "Maelstrom", "maelstrom"},
+ {OP_SPIRAL2, "Radiation", "radiation"},
+ {OP_PARABOLA, "Horizontal Stripes",
+ "horizontal-stripes"},
+ {OP_HSTRIPE, "Vertical Stripes", "vertical-stripes"},
+ {0, NULL, NULL},
+ };
+
+ if (!type) {
+ type = g_enum_register_static ("GstOpTVMode", enumvalue);
+ }
+ return type;
+}
+
+#define DEFAULT_MODE OP_SPIRAL1
+#define DEFAULT_SPEED 16
+#define DEFAULT_THRESHOLD 60
+
+enum
+{
+ PROP_0,
+ PROP_MODE,
+ PROP_SPEED,
+ PROP_THRESHOLD
+};
+
+static guint32 palette[256];
+
+#define gst_optv_parent_class parent_class
+G_DEFINE_TYPE (GstOpTV, gst_optv, GST_TYPE_VIDEO_FILTER);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xBGR, xRGB }")
+#endif
+
+static GstStaticPadTemplate gst_optv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_optv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static void
+initPalette (void)
+{
+ gint i;
+ guint8 v;
+
+ for (i = 0; i < 112; i++) {
+ palette[i] = 0;
+ palette[i + 128] = 0xffffff;
+ }
+ for (i = 0; i < 16; i++) {
+ v = 16 * (i + 1) - 1;
+ palette[i + 112] = (v << 16) | (v << 8) | v;
+ v = 255 - v;
+ palette[i + 240] = (v << 16) | (v << 8) | v;
+ }
+}
+
+static void
+setOpmap (gint8 * opmap[4], gint width, gint height)
+{
+ gint i, j, x, y;
+#ifndef PS2
+ gdouble xx, yy, r, at, rr;
+#else
+ gfloat xx, yy, r, at, rr;
+#endif
+ gint sci;
+
+ sci = 640 / width;
+ i = 0;
+ for (y = 0; y < height; y++) {
+ yy = (gdouble) (y - height / 2) / width;
+ for (x = 0; x < width; x++) {
+ xx = (gdouble) x / width - 0.5;
+#ifndef PS2
+ r = sqrt (xx * xx + yy * yy);
+ at = atan2 (xx, yy);
+#else
+ r = sqrtf (xx * xx + yy * yy);
+ at = atan2f (xx, yy);
+#endif
+
+ opmap[OP_SPIRAL1][i] = ((guint)
+ ((at / G_PI * 256) + (r * 4000))) & 255;
+
+ j = r * 300 / 32;
+ rr = r * 300 - j * 32;
+ j *= 64;
+ j += (rr > 28) ? (rr - 28) * 16 : 0;
+ opmap[OP_SPIRAL2][i] = ((guint)
+ ((at / G_PI * 4096) + (r * 1600) - j)) & 255;
+
+ opmap[OP_PARABOLA][i] =
+ ((guint) (yy / (xx * xx * 0.3 + 0.1) * 400)) & 255;
+ opmap[OP_HSTRIPE][i] = x * 8 * sci;
+ i++;
+ }
+ }
+}
+
+/* Taken from effectv/image.c */
+/* Y value filters */
+static void
+image_y_over (guint32 * src, guint8 * diff, gint y_threshold, gint video_area)
+{
+ gint i;
+ gint R, G, B, v;
+ guint8 *p = diff;
+
+ for (i = video_area; i > 0; i--) {
+ R = ((*src) & 0xff0000) >> (16 - 1);
+ G = ((*src) & 0xff00) >> (8 - 2);
+ B = (*src) & 0xff;
+ v = y_threshold * 7 - (R + G + B);
+ *p = (guint8) (v >> 24);
+ src++;
+ p++;
+ }
+}
+
+static GstFlowReturn
+gst_optv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstOpTV *filter = GST_OPTV (vfilter);
+ guint32 *src, *dest;
+ gint8 *p;
+ guint8 *diff;
+ gint x, y, width, height;
+ GstClockTime timestamp, stream_time;
+ guint8 phase;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (vfilter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ if (G_UNLIKELY (filter->opmap[0] == NULL))
+ return GST_FLOW_NOT_NEGOTIATED;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ GST_OBJECT_LOCK (filter);
+ switch (filter->mode) {
+ default:
+ case 0:
+ p = filter->opmap[OP_SPIRAL1];
+ break;
+ case 1:
+ p = filter->opmap[OP_SPIRAL2];
+ break;
+ case 2:
+ p = filter->opmap[OP_PARABOLA];
+ break;
+ case 3:
+ p = filter->opmap[OP_HSTRIPE];
+ break;
+ }
+
+ filter->phase -= filter->speed;
+
+ diff = filter->diff;
+ image_y_over (src, diff, filter->threshold, width * height);
+ phase = filter->phase;
+
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ *dest++ = palette[(((guint8) (*p + phase)) ^ *diff++) & 255];
+ p++;
+ }
+ }
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_optv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstOpTV *filter = GST_OPTV (vfilter);
+ gint i, width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ for (i = 0; i < 4; i++) {
+ if (filter->opmap[i])
+ g_free (filter->opmap[i]);
+ filter->opmap[i] = g_new (gint8, width * height);
+ }
+ setOpmap (filter->opmap, width, height);
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = g_new (guint8, width * height);
+
+ return TRUE;
+}
+
+static gboolean
+gst_optv_start (GstBaseTransform * trans)
+{
+ GstOpTV *filter = GST_OPTV (trans);
+
+ filter->phase = 0;
+
+ return TRUE;
+}
+
+static void
+gst_optv_finalize (GObject * object)
+{
+ GstOpTV *filter = GST_OPTV (object);
+
+ if (filter->opmap[0]) {
+ gint i;
+
+ for (i = 0; i < 4; i++) {
+ if (filter->opmap[i])
+ g_free (filter->opmap[i]);
+ filter->opmap[i] = NULL;
+ }
+ }
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_optv_set_property (GObject * object, guint prop_id, const GValue * value,
+ GParamSpec * pspec)
+{
+ GstOpTV *filter = GST_OPTV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_MODE:
+ filter->mode = g_value_get_enum (value);
+ break;
+ case PROP_SPEED:
+ filter->speed = g_value_get_int (value);
+ break;
+ case PROP_THRESHOLD:
+ filter->threshold = g_value_get_uint (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_optv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstOpTV *filter = GST_OPTV (object);
+
+ switch (prop_id) {
+ case PROP_MODE:
+ g_value_set_enum (value, filter->mode);
+ break;
+ case PROP_SPEED:
+ g_value_set_int (value, filter->speed);
+ break;
+ case PROP_THRESHOLD:
+ g_value_set_uint (value, filter->threshold);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_optv_class_init (GstOpTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_optv_set_property;
+ gobject_class->get_property = gst_optv_get_property;
+
+ gobject_class->finalize = gst_optv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_MODE,
+ g_param_spec_enum ("mode", "Mode",
+ "Mode", GST_TYPE_OPTV_MODE, DEFAULT_MODE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class, PROP_SPEED,
+ g_param_spec_int ("speed", "Speed",
+ "Effect speed", G_MININT, G_MAXINT, DEFAULT_SPEED,
+ GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class, PROP_THRESHOLD,
+ g_param_spec_uint ("threshold", "Threshold",
+ "Luma threshold", 0, G_MAXINT, DEFAULT_THRESHOLD,
+ GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gst_element_class_set_static_metadata (gstelement_class, "OpTV effect",
+ "Filter/Effect/Video",
+ "Optical art meets real-time video effect",
+ "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>, "
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_optv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_optv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_optv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_optv_set_info);
+ vfilter_class->transform_frame = GST_DEBUG_FUNCPTR (gst_optv_transform_frame);
+
+ initPalette ();
+}
+
+static void
+gst_optv_init (GstOpTV * filter)
+{
+ filter->speed = DEFAULT_SPEED;
+ filter->mode = DEFAULT_MODE;
+ filter->threshold = DEFAULT_THRESHOLD;
+}
diff --git a/gst/effectv/gstop.h b/gst/effectv/gstop.h
new file mode 100644
index 0000000..5572402
--- /dev/null
+++ b/gst/effectv/gstop.h
@@ -0,0 +1,74 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * OpTV - Optical art meets real-time video effect.
+ * Copyright (C) 2004-2005 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_OP_H__
+#define __GST_OP_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_OPTV \
+ (gst_optv_get_type())
+#define GST_OPTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OPTV,GstOpTV))
+#define GST_OPTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OPTV,GstOpTVClass))
+#define GST_IS_OPTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OPTV))
+#define GST_IS_OPTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPTV))
+
+typedef struct _GstOpTV GstOpTV;
+typedef struct _GstOpTVClass GstOpTVClass;
+
+struct _GstOpTV
+{
+ GstVideoFilter element;
+
+ /* < private > */
+ gint mode;
+ gint speed;
+ guint threshold;
+
+ gint8 *opmap[4];
+ guint8 *diff;
+ guint8 phase;
+};
+
+struct _GstOpTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_optv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_OP_H__ */
diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c
new file mode 100644
index 0000000..cb02643
--- /dev/null
+++ b/gst/effectv/gstquark.c
@@ -0,0 +1,299 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV:
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * QuarkTV - motion disolver.
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-quarktv
+ *
+ * QuarkTV disolves moving objects. It picks up pixels from
+ * the last frames randomly.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! quarktv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of quarktv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstquark.h"
+#include "gsteffectv.h"
+
+/* number of frames of time-buffer. It should be as a configurable paramater */
+/* This number also must be 2^n just for the speed. */
+#define PLANES 16
+
+enum
+{
+ PROP_0,
+ PROP_PLANES
+};
+
+#define gst_quarktv_parent_class parent_class
+G_DEFINE_TYPE (GstQuarkTV, gst_quarktv, GST_TYPE_VIDEO_FILTER);
+
+static void gst_quarktv_planetable_clear (GstQuarkTV * filter);
+
+static GstStaticPadTemplate gst_quarktv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ xRGB, xBGR, BGRx, RGBx }"))
+ );
+
+static GstStaticPadTemplate gst_quarktv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ xRGB, xBGR, BGRx, RGBx }"))
+ );
+
+static gboolean
+gst_quarktv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstQuarkTV *filter = GST_QUARKTV (vfilter);
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ gst_quarktv_planetable_clear (filter);
+ filter->area = width * height;
+
+ return TRUE;
+}
+
+static GstFlowReturn
+gst_quarktv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstQuarkTV *filter = GST_QUARKTV (vfilter);
+ gint area;
+ guint32 *src, *dest;
+ GstClockTime timestamp;
+ GstBuffer **planetable;
+ gint planes, current_plane;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ timestamp =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (vfilter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (timestamp))
+ gst_object_sync_values (GST_OBJECT (filter), timestamp);
+
+ if (G_UNLIKELY (filter->planetable == NULL))
+ return GST_FLOW_FLUSHING;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ GST_OBJECT_LOCK (filter);
+ area = filter->area;
+ planetable = filter->planetable;
+ planes = filter->planes;
+ current_plane = filter->current_plane;
+
+ if (planetable[current_plane])
+ gst_buffer_unref (planetable[current_plane]);
+ planetable[current_plane] = gst_buffer_ref (in_frame->buffer);
+
+ /* For each pixel */
+ while (--area) {
+ GstBuffer *rand;
+
+ /* pick a random buffer */
+ rand = planetable[(current_plane + (fastrand () >> 24)) % planes];
+
+ /* Copy the pixel from the random buffer to dest, FIXME, slow */
+ if (rand)
+ gst_buffer_extract (rand, area * 4, &dest[area], 4);
+ else
+ dest[area] = src[area];
+ }
+
+ filter->current_plane--;
+ if (filter->current_plane < 0)
+ filter->current_plane = planes - 1;
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static void
+gst_quarktv_planetable_clear (GstQuarkTV * filter)
+{
+ gint i;
+
+ if (filter->planetable == NULL)
+ return;
+
+ for (i = 0; i < filter->planes; i++) {
+ if (GST_IS_BUFFER (filter->planetable[i])) {
+ gst_buffer_unref (filter->planetable[i]);
+ }
+ filter->planetable[i] = NULL;
+ }
+}
+
+static gboolean
+gst_quarktv_start (GstBaseTransform * trans)
+{
+ GstQuarkTV *filter = GST_QUARKTV (trans);
+
+ if (filter->planetable) {
+ gst_quarktv_planetable_clear (filter);
+ g_free (filter->planetable);
+ }
+ filter->planetable =
+ (GstBuffer **) g_malloc0 (filter->planes * sizeof (GstBuffer *));
+
+ return TRUE;
+}
+
+static void
+gst_quarktv_finalize (GObject * object)
+{
+ GstQuarkTV *filter = GST_QUARKTV (object);
+
+ if (filter->planetable) {
+ gst_quarktv_planetable_clear (filter);
+ g_free (filter->planetable);
+ filter->planetable = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_quarktv_set_property (GObject * object, guint prop_id, const GValue * value,
+ GParamSpec * pspec)
+{
+ GstQuarkTV *filter = GST_QUARKTV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_PLANES:
+ {
+ gint new_n_planes = g_value_get_int (value);
+ GstBuffer **new_planetable;
+ gint i;
+
+ /* If the number of planes changed, copy across any existing planes */
+ if (new_n_planes != filter->planes) {
+ new_planetable =
+ (GstBuffer **) g_malloc0 (new_n_planes * sizeof (GstBuffer *));
+
+ if (filter->planetable) {
+ for (i = 0; (i < new_n_planes) && (i < filter->planes); i++) {
+ new_planetable[i] = filter->planetable[i];
+ }
+ for (; i < filter->planes; i++) {
+ if (filter->planetable[i])
+ gst_buffer_unref (filter->planetable[i]);
+ }
+ g_free (filter->planetable);
+ }
+
+ filter->planetable = new_planetable;
+ filter->planes = new_n_planes;
+ filter->current_plane = filter->planes - 1;
+ }
+ break;
+ }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_quarktv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstQuarkTV *filter = GST_QUARKTV (object);
+
+ switch (prop_id) {
+ case PROP_PLANES:
+ g_value_set_int (value, filter->planes);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_quarktv_class_init (GstQuarkTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_quarktv_set_property;
+ gobject_class->get_property = gst_quarktv_get_property;
+
+ gobject_class->finalize = gst_quarktv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_PLANES,
+ g_param_spec_int ("planes", "Planes",
+ "Number of planes", 0, 64, PLANES,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ gst_element_class_set_static_metadata (gstelement_class, "QuarkTV effect",
+ "Filter/Effect/Video",
+ "Motion dissolver", "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_quarktv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_quarktv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_quarktv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_quarktv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_quarktv_transform_frame);
+}
+
+static void
+gst_quarktv_init (GstQuarkTV * filter)
+{
+ filter->planes = PLANES;
+ filter->current_plane = filter->planes - 1;
+}
diff --git a/gst/effectv/gstquark.h b/gst/effectv/gstquark.h
new file mode 100644
index 0000000..5557756
--- /dev/null
+++ b/gst/effectv/gstquark.h
@@ -0,0 +1,71 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV:
+ * Copyright (C) 2001-2002 FUKUCHI Kentarou
+ *
+ * QuarkTV - motion disolver.
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_QUARK_H__
+#define __GST_QUARK_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_QUARKTV \
+ (gst_quarktv_get_type())
+#define GST_QUARKTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUARKTV,GstQuarkTV))
+#define GST_QUARKTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUARKTV,GstQuarkTVClass))
+#define GST_IS_QUARKTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUARKTV))
+#define GST_IS_QUARKTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUARKTV))
+
+typedef struct _GstQuarkTV GstQuarkTV;
+typedef struct _GstQuarkTVClass GstQuarkTVClass;
+
+struct _GstQuarkTV
+{
+ GstVideoFilter element;
+
+ /* < private > */
+ gint area;
+ gint planes;
+ gint current_plane;
+ GstBuffer **planetable;
+};
+
+struct _GstQuarkTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_quarktv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_QUARK_H__ */
diff --git a/gst/effectv/gstradioac.c b/gst/effectv/gstradioac.c
new file mode 100644
index 0000000..fc2d409
--- /dev/null
+++ b/gst/effectv/gstradioac.c
@@ -0,0 +1,634 @@
+/* GStreamer
+ * Cradioacyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Cradioacyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * RadioacTV - motion-enlightment effect.
+ * Cradioacyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your radioaction) any later version.
+ *
+ * This library is distributed in the hradioace that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a cradioacy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-radioactv
+ *
+ * RadioacTV does *NOT* detect a radioactivity. It detects a difference
+ * from previous frame and blurs it.
+ *
+ * RadioacTV has 4 mode, normal, strobe1, strobe2 and trigger.
+ * In trigger mode, effect appears only when the trigger property is %TRUE.
+ *
+ * strobe1 and strobe2 mode drops some frames. strobe1 mode uses the difference between
+ * current frame and previous frame dropped, while strobe2 mode uses the difference from
+ * previous frame displayed. The effect of strobe2 is stronger than strobe1.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! radioactv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of radioactv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstradioac.h"
+#include "gsteffectv.h"
+
+enum
+{
+ RADIOAC_NORMAL = 0,
+ RADIOAC_STROBE,
+ RADIOAC_STROBE2,
+ RADIOAC_TRIGGER
+};
+
+enum
+{
+ COLOR_RED = 0,
+ COLOR_GREEN,
+ COLOR_BLUE,
+ COLOR_WHITE
+};
+
+#define GST_TYPE_RADIOACTV_MODE (gst_radioactv_mode_get_type())
+static GType
+gst_radioactv_mode_get_type (void)
+{
+ static GType type = 0;
+
+ static const GEnumValue enumvalue[] = {
+ {RADIOAC_NORMAL, "Normal", "normal"},
+ {RADIOAC_STROBE, "Strobe 1", "strobe1"},
+ {RADIOAC_STROBE2, "Strobe 2", "strobe2"},
+ {RADIOAC_TRIGGER, "Trigger", "trigger"},
+ {0, NULL, NULL},
+ };
+
+ if (!type) {
+ type = g_enum_register_static ("GstRadioacTVMode", enumvalue);
+ }
+ return type;
+}
+
+#define GST_TYPE_RADIOACTV_COLOR (gst_radioactv_color_get_type())
+static GType
+gst_radioactv_color_get_type (void)
+{
+ static GType type = 0;
+
+ static const GEnumValue enumvalue[] = {
+ {COLOR_RED, "Red", "red"},
+ {COLOR_GREEN, "Green", "green"},
+ {COLOR_BLUE, "Blue", "blue"},
+ {COLOR_WHITE, "White", "white"},
+ {0, NULL, NULL},
+ };
+
+ if (!type) {
+ type = g_enum_register_static ("GstRadioacTVColor", enumvalue);
+ }
+ return type;
+}
+
+#define DEFAULT_MODE RADIOAC_NORMAL
+#define DEFAULT_COLOR COLOR_WHITE
+#define DEFAULT_INTERVAL 3
+#define DEFAULT_TRIGGER FALSE
+
+enum
+{
+ PROP_0,
+ PROP_MODE,
+ PROP_COLOR,
+ PROP_INTERVAL,
+ PROP_TRIGGER
+};
+
+#define COLORS 32
+#define PATTERN 4
+#define MAGIC_THRESHOLD 40
+#define RATIO 0.95
+
+static guint32 palettes[COLORS * PATTERN];
+static gint swap_tab[] = { 2, 1, 0, 3 };
+
+#define gst_radioactv_parent_class parent_class
+G_DEFINE_TYPE (GstRadioacTV, gst_radioactv, GST_TYPE_VIDEO_FILTER);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ RGBx, BGRx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xBGR, xRGB }")
+#endif
+
+static GstStaticPadTemplate gst_radioactv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_radioactv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static void
+makePalette (void)
+{
+ gint i;
+
+#define DELTA (255/(COLORS/2-1))
+
+ /* red, gree, blue */
+ for (i = 0; i < COLORS / 2; i++) {
+ palettes[i] = i * DELTA;
+ palettes[COLORS + i] = (i * DELTA) << 8;
+ palettes[COLORS * 2 + i] = (i * DELTA) << 16;
+ }
+ for (i = 0; i < COLORS / 2; i++) {
+ palettes[i + COLORS / 2] = 255 | (i * DELTA) << 16 | (i * DELTA) << 8;
+ palettes[COLORS + i + COLORS / 2] =
+ (255 << 8) | (i * DELTA) << 16 | i * DELTA;
+ palettes[COLORS * 2 + i + COLORS / 2] =
+ (255 << 16) | (i * DELTA) << 8 | i * DELTA;
+ }
+ /* white */
+ for (i = 0; i < COLORS; i++) {
+ palettes[COLORS * 3 + i] = (255 * i / COLORS) * 0x10101;
+ }
+ for (i = 0; i < COLORS * PATTERN; i++) {
+ palettes[i] = palettes[i] & 0xfefeff;
+ }
+#undef DELTA
+}
+
+#define VIDEO_HWIDTH (filter->buf_width/2)
+#define VIDEO_HHEIGHT (filter->buf_height/2)
+
+/* this table assumes that video_width is times of 32 */
+static void
+setTable (GstRadioacTV * filter)
+{
+ guint bits;
+ gint x, y, tx, ty, xx;
+ gint ptr, prevptr;
+
+ prevptr = (gint) (0.5 + RATIO * (-VIDEO_HWIDTH) + VIDEO_HWIDTH);
+ for (xx = 0; xx < (filter->buf_width_blocks); xx++) {
+ bits = 0;
+ for (x = 0; x < 32; x++) {
+ ptr = (gint) (0.5 + RATIO * (xx * 32 + x - VIDEO_HWIDTH) + VIDEO_HWIDTH);
+ bits = bits >> 1;
+ if (ptr != prevptr)
+ bits |= 0x80000000;
+ prevptr = ptr;
+ }
+ filter->blurzoomx[xx] = bits;
+ }
+
+ ty = (gint) (0.5 + RATIO * (-VIDEO_HHEIGHT) + VIDEO_HHEIGHT);
+ tx = (gint) (0.5 + RATIO * (-VIDEO_HWIDTH) + VIDEO_HWIDTH);
+ xx = (gint) (0.5 + RATIO * (filter->buf_width - 1 - VIDEO_HWIDTH) +
+ VIDEO_HWIDTH);
+ filter->blurzoomy[0] = ty * filter->buf_width + tx;
+ prevptr = ty * filter->buf_width + xx;
+ for (y = 1; y < filter->buf_height; y++) {
+ ty = (gint) (0.5 + RATIO * (y - VIDEO_HHEIGHT) + VIDEO_HHEIGHT);
+ filter->blurzoomy[y] = ty * filter->buf_width + tx - prevptr;
+ prevptr = ty * filter->buf_width + xx;
+ }
+}
+
+#undef VIDEO_HWIDTH
+#undef VIDEO_HHEIGHT
+
+static void
+blur (GstRadioacTV * filter)
+{
+ gint x, y;
+ gint width;
+ guint8 *p, *q;
+ guint8 v;
+ GstVideoInfo *info;
+
+ info = &GST_VIDEO_FILTER (filter)->in_info;
+
+ width = filter->buf_width;
+ p = filter->blurzoombuf + GST_VIDEO_INFO_WIDTH (info) + 1;
+ q = p + filter->buf_area;
+
+ for (y = filter->buf_height - 2; y > 0; y--) {
+ for (x = width - 2; x > 0; x--) {
+ v = (*(p - width) + *(p - 1) + *(p + 1) + *(p + width)) / 4 - 1;
+ if (v == 255)
+ v = 0;
+ *q = v;
+ p++;
+ q++;
+ }
+ p += 2;
+ q += 2;
+ }
+}
+
+static void
+zoom (GstRadioacTV * filter)
+{
+ gint b, x, y;
+ guint8 *p, *q;
+ gint blocks, height;
+ gint dx;
+
+ p = filter->blurzoombuf + filter->buf_area;
+ q = filter->blurzoombuf;
+ height = filter->buf_height;
+ blocks = filter->buf_width_blocks;
+
+ for (y = 0; y < height; y++) {
+ p += filter->blurzoomy[y];
+ for (b = 0; b < blocks; b++) {
+ dx = filter->blurzoomx[b];
+ for (x = 0; x < 32; x++) {
+ p += (dx & 1);
+ *q++ = *p;
+ dx = dx >> 1;
+ }
+ }
+ }
+}
+
+static void
+blurzoomcore (GstRadioacTV * filter)
+{
+ blur (filter);
+ zoom (filter);
+}
+
+/* Background image is refreshed every frame */
+static void
+image_bgsubtract_update_y (guint32 * src, gint16 * background, guint8 * diff,
+ gint video_area, gint y_threshold)
+{
+ gint i;
+ gint R, G, B;
+ guint32 *p;
+ gint16 *q;
+ guint8 *r;
+ gint v;
+
+ p = src;
+ q = background;
+ r = diff;
+ for (i = 0; i < video_area; i++) {
+ R = ((*p) & 0xff0000) >> (16 - 1);
+ G = ((*p) & 0xff00) >> (8 - 2);
+ B = (*p) & 0xff;
+ v = (R + G + B) - (gint) (*q);
+ *q = (gint16) (R + G + B);
+ *r = ((v + y_threshold) >> 24) | ((y_threshold - v) >> 24);
+
+ p++;
+ q++;
+ r++;
+ }
+}
+
+static GstFlowReturn
+gst_radioactv_transform_frame (GstVideoFilter * vfilter,
+ GstVideoFrame * in_frame, GstVideoFrame * out_frame)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (vfilter);
+ guint32 *src, *dest;
+ GstClockTime timestamp, stream_time;
+ gint x, y, width, height;
+ guint32 a, b;
+ guint8 *diff, *p;
+ guint32 *palette;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (filter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ GST_OBJECT_LOCK (filter);
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ if (GST_VIDEO_FRAME_FORMAT (in_frame) == GST_VIDEO_FORMAT_RGBx) {
+ palette = &palettes[COLORS * filter->color];
+ } else {
+ palette = &palettes[COLORS * swap_tab[filter->color]];
+ }
+#else
+ if (GST_VIDEO_FRAME_FORMAT (in_frame) == GST_VIDEO_FORMAT_xBGR) {
+ palette = &palettes[COLORS * filter->color];
+ } else {
+ palette = &palettes[COLORS * swap_tab[filter->color]];
+ }
+#endif
+ diff = filter->diff;
+
+ if (filter->mode == 3 && filter->trigger)
+ filter->snaptime = 0;
+ else if (filter->mode == 3 && !filter->trigger)
+ filter->snaptime = 1;
+
+ if (filter->mode != 2 || filter->snaptime <= 0) {
+ image_bgsubtract_update_y (src, filter->background, diff,
+ width * height, MAGIC_THRESHOLD * 7);
+ if (filter->mode == 0 || filter->snaptime <= 0) {
+ diff += filter->buf_margin_left;
+ p = filter->blurzoombuf;
+ for (y = 0; y < filter->buf_height; y++) {
+ for (x = 0; x < filter->buf_width; x++) {
+ p[x] |= diff[x] >> 3;
+ }
+ diff += width;
+ p += filter->buf_width;
+ }
+ if (filter->mode == 1 || filter->mode == 2) {
+ memcpy (filter->snapframe, src, width * height * 4);
+ }
+ }
+ }
+ blurzoomcore (filter);
+
+ if (filter->mode == 1 || filter->mode == 2) {
+ src = filter->snapframe;
+ }
+ p = filter->blurzoombuf;
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < filter->buf_margin_left; x++) {
+ *dest++ = *src++;
+ }
+ for (x = 0; x < filter->buf_width; x++) {
+ a = *src++ & 0xfefeff;
+ b = palette[*p++];
+ a += b;
+ b = a & 0x1010100;
+ *dest++ = a | (b - (b >> 8));
+ }
+ for (x = 0; x < filter->buf_margin_right; x++) {
+ *dest++ = *src++;
+ }
+ }
+
+ if (filter->mode == 1 || filter->mode == 2) {
+ filter->snaptime--;
+ if (filter->snaptime < 0) {
+ filter->snaptime = filter->interval;
+ }
+ }
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_radioactv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (vfilter);
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ filter->buf_width_blocks = width / 32;
+ if (filter->buf_width_blocks > 255)
+ goto too_wide;
+
+ filter->buf_width = filter->buf_width_blocks * 32;
+ filter->buf_height = height;
+ filter->buf_area = filter->buf_height * filter->buf_width;
+ filter->buf_margin_left = (width - filter->buf_width) / 2;
+ filter->buf_margin_right =
+ height - filter->buf_width - filter->buf_margin_left;
+
+ if (filter->blurzoombuf)
+ g_free (filter->blurzoombuf);
+ filter->blurzoombuf = g_new0 (guint8, filter->buf_area * 2);
+
+ if (filter->blurzoomx)
+ g_free (filter->blurzoomx);
+ filter->blurzoomx = g_new0 (gint, filter->buf_width);
+
+ if (filter->blurzoomy)
+ g_free (filter->blurzoomy);
+ filter->blurzoomy = g_new0 (gint, filter->buf_height);
+
+ if (filter->snapframe)
+ g_free (filter->snapframe);
+ filter->snapframe = g_new (guint32, width * height);
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = g_new (guint8, width * height);
+
+ if (filter->background)
+ g_free (filter->background);
+ filter->background = g_new0 (gint16, width * height);
+
+ setTable (filter);
+
+ return TRUE;
+
+ /* ERRORS */
+too_wide:
+ {
+ GST_DEBUG_OBJECT (filter, "frame too wide");
+ return FALSE;
+ }
+}
+
+static gboolean
+gst_radioactv_start (GstBaseTransform * trans)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (trans);
+
+ filter->snaptime = 0;
+
+ return TRUE;
+}
+
+static void
+gst_radioactv_finalize (GObject * object)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (object);
+
+ if (filter->snapframe)
+ g_free (filter->snapframe);
+ filter->snapframe = NULL;
+
+ if (filter->blurzoombuf)
+ g_free (filter->blurzoombuf);
+ filter->blurzoombuf = NULL;
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = NULL;
+
+ if (filter->background)
+ g_free (filter->background);
+ filter->background = NULL;
+
+ if (filter->blurzoomx)
+ g_free (filter->blurzoomx);
+ filter->blurzoomx = NULL;
+
+ if (filter->blurzoomy)
+ g_free (filter->blurzoomy);
+ filter->blurzoomy = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_radioactv_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_MODE:
+ filter->mode = g_value_get_enum (value);
+ if (filter->mode == 3)
+ filter->snaptime = 1;
+ break;
+ case PROP_COLOR:
+ filter->color = g_value_get_enum (value);
+ break;
+ case PROP_INTERVAL:
+ filter->interval = g_value_get_uint (value);
+ break;
+ case PROP_TRIGGER:
+ filter->trigger = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_radioactv_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec)
+{
+ GstRadioacTV *filter = GST_RADIOACTV (object);
+
+ switch (prop_id) {
+ case PROP_MODE:
+ g_value_set_enum (value, filter->mode);
+ break;
+ case PROP_COLOR:
+ g_value_set_enum (value, filter->color);
+ break;
+ case PROP_INTERVAL:
+ g_value_set_uint (value, filter->interval);
+ break;
+ case PROP_TRIGGER:
+ g_value_set_boolean (value, filter->trigger);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_radioactv_class_init (GstRadioacTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_radioactv_set_property;
+ gobject_class->get_property = gst_radioactv_get_property;
+
+ gobject_class->finalize = gst_radioactv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_MODE,
+ g_param_spec_enum ("mode", "Mode",
+ "Mode", GST_TYPE_RADIOACTV_MODE, DEFAULT_MODE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class, PROP_COLOR,
+ g_param_spec_enum ("color", "Color",
+ "Color", GST_TYPE_RADIOACTV_COLOR, DEFAULT_COLOR,
+ GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class, PROP_INTERVAL,
+ g_param_spec_uint ("interval", "Interval",
+ "Snapshot interval (in strobe mode)", 0, G_MAXINT, DEFAULT_INTERVAL,
+ GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class, PROP_TRIGGER,
+ g_param_spec_boolean ("trigger", "Trigger",
+ "Trigger (in trigger mode)", DEFAULT_TRIGGER,
+ GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gst_element_class_set_static_metadata (gstelement_class, "RadioacTV effect",
+ "Filter/Effect/Video",
+ "motion-enlightment effect",
+ "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>, "
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_radioactv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_radioactv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_radioactv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_radioactv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_radioactv_transform_frame);
+
+ makePalette ();
+}
+
+static void
+gst_radioactv_init (GstRadioacTV * filter)
+{
+ filter->mode = DEFAULT_MODE;
+ filter->color = DEFAULT_COLOR;
+ filter->interval = DEFAULT_INTERVAL;
+ filter->trigger = DEFAULT_TRIGGER;
+}
diff --git a/gst/effectv/gstradioac.h b/gst/effectv/gstradioac.h
new file mode 100644
index 0000000..c8d7c99
--- /dev/null
+++ b/gst/effectv/gstradioac.h
@@ -0,0 +1,87 @@
+/* GStreamer
+ * Cradioacyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Cradioacyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * RadioacTV - motion-enlightment effect.
+ * Copyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your radioaction) any later version.
+ *
+ * This library is distributed in the hradioace that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a cradioacy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_RADIOAC_H__
+#define __GST_RADIOAC_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_RADIOACTV \
+ (gst_radioactv_get_type())
+#define GST_RADIOACTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RADIOACTV,GstRadioacTV))
+#define GST_RADIOACTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RADIOACTV,GstRadioacTVClass))
+#define GST_IS_RADIOACTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RADIOACTV))
+#define GST_IS_RADIOACTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RADIOACTV))
+
+typedef struct _GstRadioacTV GstRadioacTV;
+typedef struct _GstRadioacTVClass GstRadioacTVClass;
+
+struct _GstRadioacTV
+{
+ GstVideoFilter element;
+
+ /* < private > */
+ gint mode;
+ gint color;
+ guint interval;
+ gboolean trigger;
+
+ gint snaptime;
+
+ guint32 *snapframe;
+ guint8 *blurzoombuf;
+ guint8 *diff;
+ gint16 *background;
+ gint *blurzoomx;
+ gint *blurzoomy;
+
+ gint buf_width_blocks;
+ gint buf_width;
+ gint buf_height;
+ gint buf_area;
+ gint buf_margin_right;
+ gint buf_margin_left;
+};
+
+struct _GstRadioacTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_radioactv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_RADIOAC_H__ */
diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c
new file mode 100755
index 0000000..003d36a
--- /dev/null
+++ b/gst/effectv/gstrev.c
@@ -0,0 +1,249 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * revTV based on Rutt-Etra Video Synthesizer 1974?
+
+ * (c)2002 Ed Tannenbaum
+ *
+ * This effect acts like a waveform monitor on each line.
+ * It was originally done by deflecting the electron beam on a monitor using
+ * additional electromagnets on the yoke of a b/w CRT.
+ * Here it is emulated digitally.
+
+ * Experimaental tapes were made with this system by Bill and
+ * Louise Etra and Woody and Steina Vasulka
+
+ * The line spacing can be controlled using the 1 and 2 Keys.
+ * The gain is controlled using the 3 and 4 keys.
+ * The update rate is controlled using the 0 and - keys.
+
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-revtv
+ *
+ * RevTV acts like a video waveform monitor for each line of video
+ * processed. This creates a pseudo 3D effect based on the brightness
+ * of the video along each line.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! revtv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of revtv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstrev.h"
+
+#define THE_COLOR 0xffffffff
+
+enum
+{
+ PROP_0,
+ PROP_DELAY,
+ PROP_LINESPACE,
+ PROP_GAIN
+};
+
+#define gst_revtv_parent_class parent_class
+G_DEFINE_TYPE (GstRevTV, gst_revtv, GST_TYPE_VIDEO_FILTER);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xBGR, xRGB }")
+#endif
+
+static GstStaticPadTemplate gst_revtv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_revtv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstFlowReturn
+gst_revtv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstRevTV *filter = GST_REVTV (vfilter);
+ guint32 *src, *dest;
+ gint width, height, sstride, dstride;
+ guint32 *nsrc;
+ gint y, x, R, G, B, yval;
+ gint linespace, vscale;
+ GstClockTime timestamp, stream_time;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (vfilter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ sstride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+ dstride = GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ /* Clear everything to black */
+ memset (dest, 0, dstride * height);
+
+ GST_OBJECT_LOCK (filter);
+ linespace = filter->linespace;
+ vscale = filter->vscale;
+
+ /* draw the offset lines */
+ for (y = 0; y < height; y += linespace) {
+ for (x = 0; x <= width; x++) {
+ nsrc = src + (y * sstride / 4) + x;
+
+ /* Calc Y Value for curpix */
+ R = ((*nsrc) & 0xff0000) >> (16 - 1);
+ G = ((*nsrc) & 0xff00) >> (8 - 2);
+ B = (*nsrc) & 0xff;
+
+ yval = y - ((short) (R + G + B) / vscale);
+
+ if (yval > 0) {
+ dest[x + (yval * dstride / 4)] = THE_COLOR;
+ }
+ }
+ }
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static void
+gst_revtv_set_property (GObject * object, guint prop_id, const GValue * value,
+ GParamSpec * pspec)
+{
+ GstRevTV *filter = GST_REVTV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_DELAY:
+ filter->vgrabtime = g_value_get_int (value);
+ break;
+ case PROP_LINESPACE:
+ filter->linespace = g_value_get_int (value);
+ break;
+ case PROP_GAIN:
+ filter->vscale = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_revtv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstRevTV *filter = GST_REVTV (object);
+
+ switch (prop_id) {
+ case PROP_DELAY:
+ g_value_set_int (value, filter->vgrabtime);
+ break;
+ case PROP_LINESPACE:
+ g_value_set_int (value, filter->linespace);
+ break;
+ case PROP_GAIN:
+ g_value_set_int (value, filter->vscale);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_revtv_class_init (GstRevTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_revtv_set_property;
+ gobject_class->get_property = gst_revtv_get_property;
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DELAY,
+ g_param_spec_int ("delay", "Delay", "Delay in frames between updates",
+ 1, 100, 1,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_LINESPACE,
+ g_param_spec_int ("linespace", "Linespace", "Control line spacing", 1,
+ 100, 6,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GAIN,
+ g_param_spec_int ("gain", "Gain", "Control gain", 1, 200, 50,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ gst_element_class_set_static_metadata (gstelement_class, "RevTV effect",
+ "Filter/Effect/Video",
+ "A video waveform monitor for each line of video processed",
+ "Wim Taymans <wim.taymans@gmail.be>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_revtv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_revtv_src_template));
+
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_revtv_transform_frame);
+}
+
+static void
+gst_revtv_init (GstRevTV * restv)
+{
+ restv->vgrabtime = 1;
+ restv->vgrab = 0;
+ restv->linespace = 6;
+ restv->vscale = 50;
+}
diff --git a/gst/effectv/gstrev.h b/gst/effectv/gstrev.h
new file mode 100644
index 0000000..198311b
--- /dev/null
+++ b/gst/effectv/gstrev.h
@@ -0,0 +1,87 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * revTV based on Rutt-Etra Video Synthesizer 1974?
+
+ * (c)2002 Ed Tannenbaum
+ *
+ * This effect acts like a waveform monitor on each line.
+ * It was originally done by deflecting the electron beam on a monitor using
+ * additional electromagnets on the yoke of a b/w CRT.
+ * Here it is emulated digitally.
+
+ * Experimaental tapes were made with this system by Bill and
+ * Louise Etra and Woody and Steina Vasulka
+
+ * The line spacing can be controlled using the 1 and 2 Keys.
+ * The gain is controlled using the 3 and 4 keys.
+ * The update rate is controlled using the 0 and - keys.
+
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_REV_H__
+#define __GST_REV_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_REVTV \
+ (gst_revtv_get_type())
+#define GST_REVTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REVTV,GstRevTV))
+#define GST_REVTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REVTV,GstRevTVClass))
+#define GST_IS_REVTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REVTV))
+#define GST_IS_REVTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REVTV))
+
+typedef struct _GstRevTV GstRevTV;
+typedef struct _GstRevTVClass GstRevTVClass;
+
+struct _GstRevTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ gint vgrabtime;
+ gint vgrab;
+ gint linespace;
+ gint vscale;
+};
+
+struct _GstRevTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_revtv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_REV_H__ */
diff --git a/gst/effectv/gstripple.c b/gst/effectv/gstripple.c
new file mode 100644
index 0000000..71b9796
--- /dev/null
+++ b/gst/effectv/gstripple.c
@@ -0,0 +1,619 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * RippleTV - Water ripple effect.
+ * Copyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * This combines the RippleTV and BaltanTV effects, which are
+ * very similar. BaltanTV is used if the feedback property is set
+ * to TRUE, otherwise RippleTV is used.
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-rippletv
+ *
+ * RippleTV does ripple mark effect on the video input. The ripple is caused
+ * by motion or random rain drops.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! rippletv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of rippletv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstripple.h"
+#include "gsteffectv.h"
+
+#define DEFAULT_MODE 0
+
+enum
+{
+ PROP_0,
+ PROP_RESET,
+ PROP_MODE
+};
+
+static gint sqrtable[256];
+
+#define GST_TYPE_RIPPLETV_MODE (gst_rippletv_mode_get_type())
+static GType
+gst_rippletv_mode_get_type (void)
+{
+ static GType type = 0;
+
+ static const GEnumValue enumvalue[] = {
+ {0, "Motion Detection", "motion-detection"},
+ {1, "Rain", "rain"},
+ {0, NULL, NULL},
+ };
+
+ if (!type) {
+ type = g_enum_register_static ("GstRippleTVMode", enumvalue);
+ }
+ return type;
+}
+
+#define gst_rippletv_parent_class parent_class
+G_DEFINE_TYPE (GstRippleTV, gst_rippletv, GST_TYPE_VIDEO_FILTER);
+
+static GstStaticPadTemplate gst_rippletv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx, xBGR, xRGB }"))
+ );
+
+static GstStaticPadTemplate gst_rippletv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx, xBGR, xRGB }"))
+ );
+
+static const gint point = 16;
+static const gint impact = 2;
+static const gint decay = 8;
+static const gint loopnum = 2;
+
+static void
+setTable (void)
+{
+ gint i;
+
+ for (i = 0; i < 128; i++) {
+ sqrtable[i] = i * i;
+ }
+ for (i = 1; i <= 128; i++) {
+ sqrtable[256 - i] = -i * i;
+ }
+}
+
+static void
+image_bgset_y (guint32 * src, gint16 * background, gint video_area)
+{
+ gint i;
+ gint R, G, B;
+ guint32 *p;
+ gint16 *q;
+
+ p = src;
+ q = background;
+ for (i = 0; i < video_area; i++) {
+ R = ((*p) & 0xff0000) >> (16 - 1);
+ G = ((*p) & 0xff00) >> (8 - 2);
+ B = (*p) & 0xff;
+ *q = (gint16) (R + G + B);
+ p++;
+ q++;
+ }
+}
+
+static gint
+setBackground (GstRippleTV * filter, guint32 * src)
+{
+ GstVideoInfo *info;
+
+ info = &GST_VIDEO_FILTER (filter)->in_info;
+
+ image_bgset_y (src, filter->background,
+ GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info));
+ filter->bg_is_set = TRUE;
+
+ return 0;
+}
+
+static void
+image_bgsubtract_update_y (guint32 * src, gint16 * background, guint8 * diff,
+ gint video_area)
+{
+ gint i;
+ gint R, G, B;
+ guint32 *p;
+ gint16 *q;
+ guint8 *r;
+ gint v;
+
+ p = src;
+ q = background;
+ r = diff;
+ for (i = 0; i < video_area; i++) {
+ R = ((*p) & 0xff0000) >> (16 - 1);
+ G = ((*p) & 0xff00) >> (8 - 2);
+ B = (*p) & 0xff;
+ v = (R + G + B) - (gint) (*q);
+ *q = (gint16) (R + G + B);
+ *r = ((v + 70 * 7) >> 24) | ((70 * 7 - v) >> 24);
+
+ p++;
+ q++;
+ r++;
+ }
+}
+
+static void
+motiondetect (GstRippleTV * filter, guint32 * src)
+{
+ guint8 *diff = filter->diff;
+ gint width, height;
+ gint *p, *q;
+ gint x, y, h;
+ GstVideoInfo *info;
+
+ info = &GST_VIDEO_FILTER (filter)->in_info;
+
+ width = GST_VIDEO_INFO_WIDTH (info);
+ height = GST_VIDEO_INFO_HEIGHT (info);
+
+ if (!filter->bg_is_set)
+ setBackground (filter, src);
+
+ image_bgsubtract_update_y (src, filter->background, filter->diff,
+ width * height);
+ p = filter->map1 + filter->map_w + 1;
+ q = filter->map2 + filter->map_w + 1;
+ diff += width + 2;
+
+ for (y = filter->map_h - 2; y > 0; y--) {
+ for (x = filter->map_w - 2; x > 0; x--) {
+ h = (gint) * diff + (gint) * (diff + 1) + (gint) * (diff + width) +
+ (gint) * (diff + width + 1);
+ if (h > 0) {
+ *p = h << (point + impact - 8);
+ *q = *p;
+ }
+ p++;
+ q++;
+ diff += 2;
+ }
+ diff += width + 2;
+ p += 2;
+ q += 2;
+ }
+}
+
+static inline void
+drop (gint power, gint * map1, gint * map2, gint map_w, gint map_h)
+{
+ gint x, y;
+ gint *p, *q;
+
+ x = fastrand () % (map_w - 4) + 2;
+ y = fastrand () % (map_h - 4) + 2;
+ p = map1 + y * map_w + x;
+ q = map2 + y * map_w + x;
+ *p = power;
+ *q = power;
+ *(p - map_w) = *(p - 1) = *(p + 1) = *(p + map_w) = power / 2;
+ *(p - map_w - 1) = *(p - map_w + 1) = *(p + map_w - 1) = *(p + map_w + 1) =
+ power / 4;
+ *(q - map_w) = *(q - 1) = *(q + 1) = *(q + map_w) = power / 2;
+ *(q - map_w - 1) = *(q - map_w + 1) = *(q + map_w - 1) = *(p + map_w + 1) =
+ power / 4;
+}
+
+static void
+raindrop (GstRippleTV * filter)
+{
+ gint i;
+
+ if (filter->period == 0) {
+ switch (filter->rain_stat) {
+ case 0:
+ filter->period = (fastrand () >> 23) + 100;
+ filter->drop_prob = 0;
+ filter->drop_prob_increment = 0x00ffffff / filter->period;
+ filter->drop_power = (-(fastrand () >> 28) - 2) << point;
+ filter->drops_per_frame_max = 2 << (fastrand () >> 30); // 2,4,8 or 16
+ filter->rain_stat = 1;
+ break;
+ case 1:
+ filter->drop_prob = 0x00ffffff;
+ filter->drops_per_frame = 1;
+ filter->drop_prob_increment = 1;
+ filter->period = (filter->drops_per_frame_max - 1) * 16;
+ filter->rain_stat = 2;
+ break;
+ case 2:
+ filter->period = (fastrand () >> 22) + 1000;
+ filter->drop_prob_increment = 0;
+ filter->rain_stat = 3;
+ break;
+ case 3:
+ filter->period = (filter->drops_per_frame_max - 1) * 16;
+ filter->drop_prob_increment = -1;
+ filter->rain_stat = 4;
+ break;
+ case 4:
+ filter->period = (fastrand () >> 24) + 60;
+ filter->drop_prob_increment = -(filter->drop_prob / filter->period);
+ filter->rain_stat = 5;
+ break;
+ case 5:
+ default:
+ filter->period = (fastrand () >> 23) + 500;
+ filter->drop_prob = 0;
+ filter->rain_stat = 0;
+ break;
+ }
+ }
+ switch (filter->rain_stat) {
+ default:
+ case 0:
+ break;
+ case 1:
+ case 5:
+ if ((fastrand () >> 8) < filter->drop_prob) {
+ drop (filter->drop_power, filter->map1, filter->map2, filter->map_w,
+ filter->map_h);
+ }
+ filter->drop_prob += filter->drop_prob_increment;
+ break;
+ case 2:
+ case 3:
+ case 4:
+ for (i = filter->drops_per_frame / 16; i > 0; i--) {
+ drop (filter->drop_power, filter->map1, filter->map2, filter->map_w,
+ filter->map_h);
+ }
+ filter->drops_per_frame += filter->drop_prob_increment;
+ break;
+ }
+ filter->period--;
+}
+
+static GstFlowReturn
+gst_rippletv_transform_frame (GstVideoFilter * vfilter,
+ GstVideoFrame * in_frame, GstVideoFrame * out_frame)
+{
+ GstRippleTV *filter = GST_RIPPLETV (vfilter);
+ guint32 *src, *dest;
+ gint x, y, i;
+ gint dx, dy, o_dx;
+ gint h, v;
+ gint m_w, m_h, v_w, v_h;
+ gint *p, *q, *r;
+ gint8 *vp;
+ GstClockTime timestamp, stream_time;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (vfilter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ GST_OBJECT_LOCK (filter);
+ /* impact from the motion or rain drop */
+ if (filter->mode)
+ raindrop (filter);
+ else
+ motiondetect (filter, src);
+
+ m_w = filter->map_w;
+ m_h = filter->map_h;
+ v_w = GST_VIDEO_FRAME_WIDTH (in_frame);
+ v_h = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ /* simulate surface wave */
+
+ /* This function is called only 30 times per second. To increase a speed
+ * of wave, iterates this loop several times. */
+ for (i = loopnum; i > 0; i--) {
+ /* wave simulation */
+ p = filter->map1 + m_w + 1;
+ q = filter->map2 + m_w + 1;
+ r = filter->map3 + m_w + 1;
+ for (y = m_h - 2; y > 0; y--) {
+ for (x = m_w - 2; x > 0; x--) {
+ h = *(p - m_w - 1) + *(p - m_w + 1) + *(p + m_w - 1) + *(p + m_w + 1)
+ + *(p - m_w) + *(p - 1) + *(p + 1) + *(p + m_w) - (*p) * 9;
+ h = h >> 3;
+ v = *p - *q;
+ v += h - (v >> decay);
+ *r = v + *p;
+ p++;
+ q++;
+ r++;
+ }
+ p += 2;
+ q += 2;
+ r += 2;
+ }
+
+ /* low pass filter */
+ p = filter->map3 + m_w + 1;
+ q = filter->map2 + m_w + 1;
+ for (y = m_h - 2; y > 0; y--) {
+ for (x = m_w - 2; x > 0; x--) {
+ h = *(p - m_w) + *(p - 1) + *(p + 1) + *(p + m_w) + (*p) * 60;
+ *q = h >> 6;
+ p++;
+ q++;
+ }
+ p += 2;
+ q += 2;
+ }
+
+ p = filter->map1;
+ filter->map1 = filter->map2;
+ filter->map2 = p;
+ }
+
+ vp = filter->vtable;
+ p = filter->map1;
+ for (y = m_h - 1; y > 0; y--) {
+ for (x = m_w - 1; x > 0; x--) {
+ /* difference of the height between two voxel. They are twiced to
+ * emphasise the wave. */
+ vp[0] = sqrtable[((p[0] - p[1]) >> (point - 1)) & 0xff];
+ vp[1] = sqrtable[((p[0] - p[m_w]) >> (point - 1)) & 0xff];
+ p++;
+ vp += 2;
+ }
+ p++;
+ vp += 2;
+ }
+
+ vp = filter->vtable;
+
+ /* draw refracted image. The vector table is stretched. */
+ for (y = 0; y < v_h; y += 2) {
+ for (x = 0; x < v_w; x += 2) {
+ h = (gint) vp[0];
+ v = (gint) vp[1];
+ dx = x + h;
+ dy = y + v;
+ dx = CLAMP (dx, 0, (v_w - 2));
+ dy = CLAMP (dy, 0, (v_h - 2));
+ dest[0] = src[dy * v_w + dx];
+
+ o_dx = dx;
+
+ dx = x + 1 + (h + (gint) vp[2]) / 2;
+ dx = CLAMP (dx, 0, (v_w - 2));
+ dest[1] = src[dy * v_w + dx];
+
+ dy = y + 1 + (v + (gint) vp[m_w * 2 + 1]) / 2;
+ dy = CLAMP (dy, 0, (v_h - 2));
+ dest[v_w] = src[dy * v_w + o_dx];
+
+ dest[v_w + 1] = src[dy * v_w + dx];
+ dest += 2;
+ vp += 2;
+ }
+ dest += v_w;
+ vp += 2;
+ }
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_rippletv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstRippleTV *filter = GST_RIPPLETV (vfilter);
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ GST_OBJECT_LOCK (filter);
+ filter->map_h = height / 2 + 1;
+ filter->map_w = width / 2 + 1;
+
+ /* we over allocate the buffers, as the render code does not handle clipping
+ * very well */
+ if (filter->map)
+ g_free (filter->map);
+ filter->map = g_new0 (gint, (1 + filter->map_h) * filter->map_w * 3);
+
+ filter->map1 = filter->map;
+ filter->map2 = filter->map + filter->map_w * filter->map_h;
+ filter->map3 = filter->map + filter->map_w * filter->map_h * 2;
+
+ if (filter->vtable)
+ g_free (filter->vtable);
+ filter->vtable = g_new0 (gint8, (1 + filter->map_h) * filter->map_w * 2);
+
+ if (filter->background)
+ g_free (filter->background);
+ filter->background = g_new0 (gint16, width * (height + 1));
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = g_new0 (guint8, width * (height + 1));
+ GST_OBJECT_UNLOCK (filter);
+
+ return TRUE;
+}
+
+static gboolean
+gst_rippletv_start (GstBaseTransform * trans)
+{
+ GstRippleTV *filter = GST_RIPPLETV (trans);
+
+ filter->bg_is_set = FALSE;
+
+ filter->period = 0;
+ filter->rain_stat = 0;
+ filter->drop_prob = 0;
+ filter->drop_prob_increment = 0;
+ filter->drops_per_frame_max = 0;
+ filter->drops_per_frame = 0;
+ filter->drop_power = 0;
+
+ return TRUE;
+}
+
+static void
+gst_rippletv_finalize (GObject * object)
+{
+ GstRippleTV *filter = GST_RIPPLETV (object);
+
+ if (filter->map)
+ g_free (filter->map);
+ filter->map = NULL;
+
+ if (filter->vtable)
+ g_free (filter->vtable);
+ filter->vtable = NULL;
+
+ if (filter->background)
+ g_free (filter->background);
+ filter->background = NULL;
+
+ if (filter->diff)
+ g_free (filter->diff);
+ filter->diff = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_rippletv_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstRippleTV *filter = GST_RIPPLETV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_RESET:{
+ memset (filter->map, 0,
+ filter->map_h * filter->map_w * 2 * sizeof (gint));
+ break;
+ }
+ case PROP_MODE:
+ filter->mode = g_value_get_enum (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_rippletv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstRippleTV *filter = GST_RIPPLETV (object);
+
+ switch (prop_id) {
+ case PROP_MODE:
+ g_value_set_enum (value, filter->mode);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_rippletv_class_init (GstRippleTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_rippletv_set_property;
+ gobject_class->get_property = gst_rippletv_get_property;
+
+ gobject_class->finalize = gst_rippletv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_RESET,
+ g_param_spec_boolean ("reset", "Reset",
+ "Reset all current ripples", FALSE,
+ G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ g_object_class_install_property (gobject_class, PROP_MODE,
+ g_param_spec_enum ("mode", "Mode",
+ "Mode", GST_TYPE_RIPPLETV_MODE, DEFAULT_MODE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
+
+ gst_element_class_set_static_metadata (gstelement_class, "RippleTV effect",
+ "Filter/Effect/Video",
+ "RippleTV does ripple mark effect on the video input",
+ "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>, "
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_rippletv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_rippletv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_rippletv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_rippletv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_rippletv_transform_frame);
+
+ setTable ();
+}
+
+static void
+gst_rippletv_init (GstRippleTV * filter)
+{
+ filter->mode = DEFAULT_MODE;
+
+ /* FIXME: remove this when memory corruption after resizes are fixed */
+ gst_pad_use_fixed_caps (GST_BASE_TRANSFORM_SRC_PAD (filter));
+ gst_pad_use_fixed_caps (GST_BASE_TRANSFORM_SINK_PAD (filter));
+}
diff --git a/gst/effectv/gstripple.h b/gst/effectv/gstripple.h
new file mode 100644
index 0000000..329e543
--- /dev/null
+++ b/gst/effectv/gstripple.h
@@ -0,0 +1,86 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * RippleTV - Water ripple effect.
+ * Copyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_RIPPLE_H__
+#define __GST_RIPPLE_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_RIPPLETV \
+ (gst_rippletv_get_type())
+#define GST_RIPPLETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RIPPLETV,GstRippleTV))
+#define GST_RIPPLETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RIPPLETV,GstRippleTVClass))
+#define GST_IS_RIPPLETV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RIPPLETV))
+#define GST_IS_RIPPLETV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RIPPLETV))
+
+typedef struct _GstRippleTV GstRippleTV;
+typedef struct _GstRippleTVClass GstRippleTVClass;
+
+struct _GstRippleTV
+{
+ GstVideoFilter element;
+
+ /* < private > */
+ gint mode;
+
+ gint16 *background;
+ guint8 *diff;
+
+ gint *map, *map1, *map2, *map3;
+ gint map_h, map_w;
+
+ gint8 *vtable;
+
+ gboolean bg_is_set;
+
+ gint period;
+ gint rain_stat;
+ guint drop_prob;
+ gint drop_prob_increment;
+ gint drops_per_frame_max;
+ gint drops_per_frame;
+ gint drop_power;
+};
+
+struct _GstRippleTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_rippletv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_RIPPLE_H__ */
diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c
new file mode 100644
index 0000000..956e5dd
--- /dev/null
+++ b/gst/effectv/gstshagadelic.c
@@ -0,0 +1,258 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * Inspired by Adrian Likin's script for the GIMP.
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-shagadelictv
+ *
+ * Oh behave, ShagedelicTV makes images shagadelic!
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! shagadelictv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of shagadelictv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstshagadelic.h"
+#include "gsteffectv.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#define gst_shagadelictv_parent_class parent_class
+G_DEFINE_TYPE (GstShagadelicTV, gst_shagadelictv, GST_TYPE_VIDEO_FILTER);
+
+static void gst_shagadelic_initialize (GstShagadelicTV * filter,
+ GstVideoInfo * in_info);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("BGRx")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("xRGB")
+#endif
+
+static GstStaticPadTemplate gst_shagadelictv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_shagadelictv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static gboolean
+gst_shagadelictv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstShagadelicTV *filter = GST_SHAGADELICTV (vfilter);
+ gint width, height, area;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ area = width * height;
+
+ g_free (filter->ripple);
+ g_free (filter->spiral);
+ filter->ripple = (guint8 *) g_malloc (area * 4);
+ filter->spiral = (guint8 *) g_malloc (area);
+
+ gst_shagadelic_initialize (filter, in_info);
+
+ return TRUE;
+}
+
+static void
+gst_shagadelic_initialize (GstShagadelicTV * filter, GstVideoInfo * info)
+{
+ int i, x, y;
+#ifdef PS2
+ float xx, yy;
+#else
+ double xx, yy;
+#endif
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (info);
+ height = GST_VIDEO_INFO_HEIGHT (info);
+
+ i = 0;
+ for (y = 0; y < height * 2; y++) {
+ yy = y - height;
+ yy *= yy;
+
+ for (x = 0; x < width * 2; x++) {
+ xx = x - width;
+#ifdef PS2
+ filter->ripple[i++] = ((unsigned int) (sqrtf (xx * xx + yy) * 8)) & 255;
+#else
+ filter->ripple[i++] = ((unsigned int) (sqrt (xx * xx + yy) * 8)) & 255;
+#endif
+ }
+ }
+
+ i = 0;
+ for (y = 0; y < height; y++) {
+ yy = y - height / 2;
+
+ for (x = 0; x < width; x++) {
+ xx = x - width / 2;
+#ifdef PS2
+ filter->spiral[i++] = ((unsigned int)
+ ((atan2f (xx,
+ yy) / ((float) M_PI) * 256 * 9) + (sqrtf (xx * xx +
+ yy * yy) * 5))) & 255;
+#else
+ filter->spiral[i++] = ((unsigned int)
+ ((atan2 (xx, yy) / M_PI * 256 * 9) + (sqrt (xx * xx +
+ yy * yy) * 5))) & 255;
+#endif
+/* Here is another Swinger!
+ * ((atan2(xx, yy)/M_PI*256) + (sqrt(xx*xx+yy*yy)*10))&255;
+ */
+ }
+ }
+ filter->rx = fastrand () % width;
+ filter->ry = fastrand () % height;
+ filter->bx = fastrand () % width;
+ filter->by = fastrand () % height;
+ filter->rvx = -2;
+ filter->rvy = -2;
+ filter->bvx = 2;
+ filter->bvy = 2;
+ filter->phase = 0;
+}
+
+static GstFlowReturn
+gst_shagadelictv_transform_frame (GstVideoFilter * vfilter,
+ GstVideoFrame * in_frame, GstVideoFrame * out_frame)
+{
+ GstShagadelicTV *filter = GST_SHAGADELICTV (vfilter);
+ guint32 *src, *dest;
+ gint x, y;
+ guint32 v;
+ guint8 r, g, b;
+ gint width, height;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ v = *src++ | 0x1010100;
+ v = (v - 0x707060) & 0x1010100;
+ v -= v >> 8;
+/* Try another Babe!
+ * v = *src++;
+ * *dest++ = v & ((r<<16)|(g<<8)|b);
+ */
+ r = ((gint8) (filter->ripple[(filter->ry + y) * width * 2 + filter->rx +
+ x] + filter->phase * 2)) >> 7;
+ g = ((gint8) (filter->spiral[y * width + x] + filter->phase * 3)) >> 7;
+ b = ((gint8) (filter->ripple[(filter->by + y) * width * 2 + filter->bx +
+ x] - filter->phase)) >> 7;
+ *dest++ = v & ((r << 16) | (g << 8) | b);
+ }
+ }
+
+ filter->phase -= 8;
+ if ((filter->rx + filter->rvx) < 0 || (filter->rx + filter->rvx) >= width)
+ filter->rvx = -filter->rvx;
+ if ((filter->ry + filter->rvy) < 0 || (filter->ry + filter->rvy) >= height)
+ filter->rvy = -filter->rvy;
+ if ((filter->bx + filter->bvx) < 0 || (filter->bx + filter->bvx) >= width)
+ filter->bvx = -filter->bvx;
+ if ((filter->by + filter->bvy) < 0 || (filter->by + filter->bvy) >= height)
+ filter->bvy = -filter->bvy;
+ filter->rx += filter->rvx;
+ filter->ry += filter->rvy;
+ filter->bx += filter->bvx;
+ filter->by += filter->bvy;
+
+ return GST_FLOW_OK;
+}
+
+static void
+gst_shagadelictv_finalize (GObject * object)
+{
+ GstShagadelicTV *filter = GST_SHAGADELICTV (object);
+
+ if (filter->ripple)
+ g_free (filter->ripple);
+ filter->ripple = NULL;
+
+ if (filter->spiral)
+ g_free (filter->spiral);
+ filter->spiral = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_shagadelictv_class_init (GstShagadelicTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->finalize = gst_shagadelictv_finalize;
+
+ gst_element_class_set_static_metadata (gstelement_class, "ShagadelicTV",
+ "Filter/Effect/Video",
+ "Oh behave, ShagedelicTV makes images shagadelic!",
+ "Wim Taymans <wim.taymans@chello.be>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_shagadelictv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_shagadelictv_src_template));
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_shagadelictv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_shagadelictv_transform_frame);
+}
+
+static void
+gst_shagadelictv_init (GstShagadelicTV * filter)
+{
+ filter->ripple = NULL;
+ filter->spiral = NULL;
+}
diff --git a/gst/effectv/gstshagadelic.h b/gst/effectv/gstshagadelic.h
new file mode 100644
index 0000000..a89cbf4
--- /dev/null
+++ b/gst/effectv/gstshagadelic.h
@@ -0,0 +1,72 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * Inspired by Adrian Likin's script for the GIMP.
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_SHAGADELIC_H__
+#define __GST_SHAGADELIC_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_SHAGADELICTV \
+ (gst_shagadelictv_get_type())
+#define GST_SHAGADELICTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SHAGADELICTV,GstShagadelicTV))
+#define GST_SHAGADELICTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SHAGADELICTV,GstShagadelicTVClass))
+#define GST_IS_SHAGADELICTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SHAGADELICTV))
+#define GST_IS_SHAGADELICTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHAGADELICTV))
+
+typedef struct _GstShagadelicTV GstShagadelicTV;
+typedef struct _GstShagadelicTVClass GstShagadelicTVClass;
+
+struct _GstShagadelicTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ guint8 *ripple;
+ guint8 *spiral;
+ guint8 phase;
+ gint rx, ry;
+ gint bx, by;
+ gint rvx, rvy;
+ gint bvx, bvy;
+};
+
+struct _GstShagadelicTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_shagadelictv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_SHAGADELIC_H__ */
diff --git a/gst/effectv/gststreak.c b/gst/effectv/gststreak.c
new file mode 100644
index 0000000..6eeb08d
--- /dev/null
+++ b/gst/effectv/gststreak.c
@@ -0,0 +1,266 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * StreakTV - afterimage effector.
+ * Copyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * This combines the StreakTV and BaltanTV effects, which are
+ * very similar. BaltanTV is used if the feedback property is set
+ * to TRUE, otherwise StreakTV is used.
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-streaktv
+ *
+ * StreakTV makes after images of moving objects.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! streaktv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of streaktv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gststreak.h"
+#include "gsteffectv.h"
+
+#define DEFAULT_FEEDBACK FALSE
+
+enum
+{
+ PROP_0,
+ PROP_FEEDBACK
+};
+
+#define gst_streaktv_parent_class parent_class
+G_DEFINE_TYPE (GstStreakTV, gst_streaktv, GST_TYPE_VIDEO_FILTER);
+
+static GstStaticPadTemplate gst_streaktv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx, xBGR, xRGB }"))
+ );
+
+static GstStaticPadTemplate gst_streaktv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx, xBGR, xRGB }"))
+ );
+
+
+static GstFlowReturn
+gst_streaktv_transform_frame (GstVideoFilter * vfilter,
+ GstVideoFrame * in_frame, GstVideoFrame * out_frame)
+{
+ GstStreakTV *filter = GST_STREAKTV (vfilter);
+ guint32 *src, *dest;
+ gint i, cf;
+ gint video_area, width, height;
+ guint32 **planetable = filter->planetable;
+ gint plane = filter->plane;
+ guint stride_mask, stride_shift, stride;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ video_area = width * height;
+
+ GST_OBJECT_LOCK (filter);
+ if (filter->feedback) {
+ stride_mask = 0xfcfcfcfc;
+ stride = 8;
+ stride_shift = 2;
+ } else {
+ stride_mask = 0xf8f8f8f8;
+ stride = 4;
+ stride_shift = 3;
+ }
+
+ for (i = 0; i < video_area; i++) {
+ planetable[plane][i] = (src[i] & stride_mask) >> stride_shift;
+ }
+
+ cf = plane & (stride - 1);
+ if (filter->feedback) {
+ for (i = 0; i < video_area; i++) {
+ dest[i] = planetable[cf][i]
+ + planetable[cf + stride][i]
+ + planetable[cf + stride * 2][i]
+ + planetable[cf + stride * 3][i];
+ planetable[plane][i] = (dest[i] & stride_mask) >> stride_shift;
+ }
+ } else {
+ for (i = 0; i < video_area; i++) {
+ dest[i] = planetable[cf][i]
+ + planetable[cf + stride][i]
+ + planetable[cf + stride * 2][i]
+ + planetable[cf + stride * 3][i]
+ + planetable[cf + stride * 4][i]
+ + planetable[cf + stride * 5][i]
+ + planetable[cf + stride * 6][i]
+ + planetable[cf + stride * 7][i];
+ }
+ }
+
+ plane++;
+ filter->plane = plane & (PLANES - 1);
+ GST_OBJECT_UNLOCK (filter);
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_streaktv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstStreakTV *filter = GST_STREAKTV (vfilter);
+ gint i, width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ if (filter->planebuffer)
+ g_free (filter->planebuffer);
+
+ filter->planebuffer = g_new0 (guint32, width * height * 4 * PLANES);
+
+ for (i = 0; i < PLANES; i++)
+ filter->planetable[i] = &filter->planebuffer[width * height * i];
+
+ return TRUE;
+}
+
+static gboolean
+gst_streaktv_start (GstBaseTransform * trans)
+{
+ GstStreakTV *filter = GST_STREAKTV (trans);
+
+ filter->plane = 0;
+
+ return TRUE;
+}
+
+static void
+gst_streaktv_finalize (GObject * object)
+{
+ GstStreakTV *filter = GST_STREAKTV (object);
+
+ if (filter->planebuffer) {
+ g_free (filter->planebuffer);
+ filter->planebuffer = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_streaktv_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstStreakTV *filter = GST_STREAKTV (object);
+
+ switch (prop_id) {
+ case PROP_FEEDBACK:
+ if (G_UNLIKELY (GST_STATE (filter) >= GST_STATE_PAUSED)) {
+ g_warning ("Changing the \"feedback\" property only allowed "
+ "in state < PLAYING");
+ return;
+ }
+
+ filter->feedback = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_streaktv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstStreakTV *filter = GST_STREAKTV (object);
+
+ switch (prop_id) {
+ case PROP_FEEDBACK:
+ g_value_set_boolean (value, filter->feedback);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_streaktv_class_init (GstStreakTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_streaktv_set_property;
+ gobject_class->get_property = gst_streaktv_get_property;
+
+ gobject_class->finalize = gst_streaktv_finalize;
+
+ g_object_class_install_property (gobject_class, PROP_FEEDBACK,
+ g_param_spec_boolean ("feedback", "Feedback",
+ "Feedback", DEFAULT_FEEDBACK,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gst_element_class_set_static_metadata (gstelement_class, "StreakTV effect",
+ "Filter/Effect/Video",
+ "StreakTV makes after images of moving objects",
+ "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>, "
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_streaktv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_streaktv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_streaktv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_streaktv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_streaktv_transform_frame);
+}
+
+static void
+gst_streaktv_init (GstStreakTV * filter)
+{
+ filter->feedback = DEFAULT_FEEDBACK;
+}
diff --git a/gst/effectv/gststreak.h b/gst/effectv/gststreak.h
new file mode 100644
index 0000000..5d9362d
--- /dev/null
+++ b/gst/effectv/gststreak.h
@@ -0,0 +1,74 @@
+/* GStreamer
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001-2006 FUKUCHI Kentaro
+ *
+ * StreakTV - afterimage effector.
+ * Copyright (C) 2001-2002 FUKUCHI Kentaro
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_STREAK_H__
+#define __GST_STREAK_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_STREAKTV \
+ (gst_streaktv_get_type())
+#define GST_STREAKTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAKTV,GstStreakTV))
+#define GST_STREAKTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAKTV,GstStreakTVClass))
+#define GST_IS_STREAKTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAKTV))
+#define GST_IS_STREAKTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAKTV))
+
+typedef struct _GstStreakTV GstStreakTV;
+typedef struct _GstStreakTVClass GstStreakTVClass;
+
+#define PLANES 32
+
+struct _GstStreakTV
+{
+ GstVideoFilter element;
+
+ /* < private > */
+ gboolean feedback;
+
+ guint32 *planebuffer;
+ guint32 *planetable[PLANES];
+ gint plane;
+};
+
+struct _GstStreakTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_streaktv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_STREAK_H__ */
diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c
new file mode 100644
index 0000000..3e575cb
--- /dev/null
+++ b/gst/effectv/gstvertigo.c
@@ -0,0 +1,327 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:element-vertigotv
+ *
+ * VertigoTV is a loopback alpha blending effector with rotating and scaling.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! vertigotv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of vertigotv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include <string.h>
+
+#include "gstvertigo.h"
+
+#define gst_vertigotv_parent_class parent_class
+G_DEFINE_TYPE (GstVertigoTV, gst_vertigotv, GST_TYPE_VIDEO_FILTER);
+
+/* Filter signals and args */
+enum
+{
+ PROP_0,
+ PROP_SPEED,
+ PROP_ZOOM_SPEED
+};
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ RGBx, BGRx }")
+#else
+#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ xRGB, xBGR }")
+#endif
+
+static GstStaticPadTemplate gst_vertigotv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static GstStaticPadTemplate gst_vertigotv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (CAPS_STR)
+ );
+
+static gboolean
+gst_vertigotv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (vfilter);
+ gint area, width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ area = width * height;
+
+ g_free (filter->buffer);
+ filter->buffer = (guint32 *) g_malloc0 (area * 2 * sizeof (guint32));
+
+ filter->current_buffer = filter->buffer;
+ filter->alt_buffer = filter->buffer + area;
+ filter->phase = 0;
+
+ return TRUE;
+}
+
+static void
+gst_vertigotv_set_parms (GstVertigoTV * filter)
+{
+ double vx, vy;
+ double t;
+ double x, y;
+ double dizz;
+ gint width, height;
+ GstVideoInfo *info;
+
+ dizz = sin (filter->phase) * 10 + sin (filter->phase * 1.9 + 5) * 5;
+
+ info = &GST_VIDEO_FILTER (filter)->in_info;
+
+ width = GST_VIDEO_INFO_WIDTH (info);
+ height = GST_VIDEO_INFO_HEIGHT (info);
+
+ x = width / 2;
+ y = height / 2;
+
+ t = (x * x + y * y) * filter->zoomrate;
+
+ if (width > height) {
+ if (dizz >= 0) {
+ if (dizz > x)
+ dizz = x;
+ vx = (x * (x - dizz) + y * y) / t;
+ } else {
+ if (dizz < -x)
+ dizz = -x;
+ vx = (x * (x + dizz) + y * y) / t;
+ }
+ vy = (dizz * y) / t;
+ } else {
+ if (dizz >= 0) {
+ if (dizz > y)
+ dizz = y;
+ vx = (x * x + y * (y - dizz)) / t;
+ } else {
+ if (dizz < -y)
+ dizz = -y;
+ vx = (x * x + y * (y + dizz)) / t;
+ }
+ vy = (dizz * x) / t;
+ }
+ filter->dx = vx * 65536;
+ filter->dy = vy * 65536;
+ filter->sx = (-vx * x + vy * y + x + cos (filter->phase * 5) * 2) * 65536;
+ filter->sy = (-vx * y - vy * x + y + sin (filter->phase * 6) * 2) * 65536;
+
+ filter->phase += filter->phase_increment;
+ if (filter->phase > 5700000)
+ filter->phase = 0;
+}
+
+static GstFlowReturn
+gst_vertigotv_transform_frame (GstVideoFilter * vfilter,
+ GstVideoFrame * in_frame, GstVideoFrame * out_frame)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (vfilter);
+ guint32 *src, *dest, *p;
+ guint32 v;
+ gint x, y, ox, oy, i, width, height, area, sstride, dstride;
+ GstClockTime timestamp, stream_time;
+
+ timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
+ stream_time =
+ gst_segment_to_stream_time (&GST_BASE_TRANSFORM (filter)->segment,
+ GST_FORMAT_TIME, timestamp);
+
+ GST_DEBUG_OBJECT (filter, "sync to %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp));
+
+ if (GST_CLOCK_TIME_IS_VALID (stream_time))
+ gst_object_sync_values (GST_OBJECT (filter), stream_time);
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ sstride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+ dstride = GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ area = width * height;
+
+ sstride /= 4;
+ dstride /= 4;
+
+ gst_vertigotv_set_parms (filter);
+ p = filter->alt_buffer;
+
+ for (y = 0; y < height; y++) {
+ ox = filter->sx;
+ oy = filter->sy;
+
+ for (x = 0; x < width; x++) {
+ i = (oy >> 16) * width + (ox >> 16);
+ if (i < 0)
+ i = 0;
+ if (i >= area)
+ i = area;
+
+ v = filter->current_buffer[i] & 0xfcfcff;
+ v = (v * 3) + (src[x] & 0xfcfcff);
+
+ *p++ = dest[x] = (v >> 2);
+ ox += filter->dx;
+ oy += filter->dy;
+ }
+ filter->sx -= filter->dy;
+ filter->sy += filter->dx;
+
+ src += sstride;
+ dest += dstride;
+ }
+
+ p = filter->current_buffer;
+ filter->current_buffer = filter->alt_buffer;
+ filter->alt_buffer = p;
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_vertigotv_start (GstBaseTransform * trans)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (trans);
+
+ filter->phase = 0.0;
+
+ return TRUE;
+}
+
+static void
+gst_vertigotv_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (object);
+
+ GST_OBJECT_LOCK (filter);
+ switch (prop_id) {
+ case PROP_SPEED:
+ filter->phase_increment = g_value_get_float (value);
+ break;
+ case PROP_ZOOM_SPEED:
+ filter->zoomrate = g_value_get_float (value);
+ break;
+ default:
+ break;
+ }
+ GST_OBJECT_UNLOCK (filter);
+}
+
+static void
+gst_vertigotv_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (object);
+
+ switch (prop_id) {
+ case PROP_SPEED:
+ g_value_set_float (value, filter->phase_increment);
+ break;
+ case PROP_ZOOM_SPEED:
+ g_value_set_float (value, filter->zoomrate);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_vertigotv_finalize (GObject * object)
+{
+ GstVertigoTV *filter = GST_VERTIGOTV (object);
+
+ g_free (filter->buffer);
+ filter->buffer = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_vertigotv_class_init (GstVertigoTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->set_property = gst_vertigotv_set_property;
+ gobject_class->get_property = gst_vertigotv_get_property;
+ gobject_class->finalize = gst_vertigotv_finalize;
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SPEED,
+ g_param_spec_float ("speed", "Speed", "Control the speed of movement",
+ 0.01, 100.0, 0.02, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ZOOM_SPEED,
+ g_param_spec_float ("zoom-speed", "Zoom Speed",
+ "Control the rate of zooming", 1.01, 1.1, 1.01,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gst_element_class_set_static_metadata (gstelement_class, "VertigoTV effect",
+ "Filter/Effect/Video",
+ "A loopback alpha blending effector with rotating and scaling",
+ "Wim Taymans <wim.taymans@gmail.be>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_vertigotv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_vertigotv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_vertigotv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_vertigotv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_vertigotv_transform_frame);
+}
+
+static void
+gst_vertigotv_init (GstVertigoTV * filter)
+{
+ filter->buffer = NULL;
+ filter->phase = 0.0;
+ filter->phase_increment = 0.02;
+ filter->zoomrate = 1.01;
+}
diff --git a/gst/effectv/gstvertigo.h b/gst/effectv/gstvertigo.h
new file mode 100644
index 0000000..39c225b
--- /dev/null
+++ b/gst/effectv/gstvertigo.h
@@ -0,0 +1,71 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ *
+ * EffecTV:
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * EffecTV is free software. This library is free software;
+ * you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_VERTIGO_H__
+#define __GST_VERTIGO_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_VERTIGOTV \
+ (gst_vertigotv_get_type())
+#define GST_VERTIGOTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VERTIGOTV,GstVertigoTV))
+#define GST_VERTIGOTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VERTIGOTV,GstVertigoTVClass))
+#define GST_IS_VERTIGOTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VERTIGOTV))
+#define GST_IS_VERTIGOTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VERTIGOTV))
+
+typedef struct _GstVertigoTV GstVertigoTV;
+typedef struct _GstVertigoTVClass GstVertigoTVClass;
+
+struct _GstVertigoTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ guint32 *buffer;
+ guint32 *current_buffer, *alt_buffer;
+ gint dx, dy;
+ gint sx, sy;
+ gdouble phase;
+ gdouble phase_increment;
+ gdouble zoomrate;
+};
+
+struct _GstVertigoTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_vertigotv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_VERTIGO_H__ */
diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c
new file mode 100644
index 0000000..327c9de
--- /dev/null
+++ b/gst/effectv/gstwarp.c
@@ -0,0 +1,266 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file was (probably) generated from gstvideotemplate.c,
+ * gstvideotemplate.c,v 1.11 2004/01/07 08:56:45 ds Exp
+ */
+
+/* From main.c of warp-1.1:
+ *
+ * Simple DirectMedia Layer demo
+ * Realtime picture 'gooing'
+ * by sam lantinga slouken@devolution.com
+ */
+
+/**
+ * SECTION:element-warptv
+ *
+ * WarpTV does realtime goo'ing of the video input.
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch-1.0 -v videotestsrc ! warptv ! videoconvert ! autovideosink
+ * ]| This pipeline shows the effect of warptv on a test stream.
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <math.h>
+
+#include "gstwarp.h"
+#include <gst/video/gstvideometa.h>
+#include <gst/video/gstvideopool.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#define gst_warptv_parent_class parent_class
+G_DEFINE_TYPE (GstWarpTV, gst_warptv, GST_TYPE_VIDEO_FILTER);
+
+static void initSinTable ();
+static void initDistTable (GstWarpTV * filter, gint width, gint height);
+
+static GstStaticPadTemplate gst_warptv_src_template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR }"))
+ );
+
+static GstStaticPadTemplate gst_warptv_sink_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGBx, xRGB, BGRx, xBGR }"))
+ );
+
+static gboolean
+gst_warptv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
+ GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
+{
+ GstWarpTV *filter = GST_WARPTV (vfilter);
+ gint width, height;
+
+ width = GST_VIDEO_INFO_WIDTH (in_info);
+ height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+ g_free (filter->disttable);
+ filter->disttable = g_malloc (width * height * sizeof (guint32));
+ initDistTable (filter, width, height);
+
+ return TRUE;
+}
+
+static gint32 sintable[1024 + 256];
+
+static void
+initSinTable (void)
+{
+ gint32 *tptr, *tsinptr;
+ gint i;
+
+ tsinptr = tptr = sintable;
+
+ for (i = 0; i < 1024; i++)
+ *tptr++ = (int) (sin (i * M_PI / 512) * 32767);
+
+ for (i = 0; i < 256; i++)
+ *tptr++ = *tsinptr++;
+}
+
+static void
+initDistTable (GstWarpTV * filter, gint width, gint height)
+{
+ gint32 halfw, halfh, *distptr;
+ gint x, y;
+ float m;
+
+ halfw = width >> 1;
+ halfh = height >> 1;
+
+ distptr = filter->disttable;
+
+ m = sqrt ((double) (halfw * halfw + halfh * halfh));
+
+ for (y = -halfh; y < halfh; y++)
+ for (x = -halfw; x < halfw; x++)
+#ifdef PS2
+ *distptr++ = ((int) ((sqrtf (x * x + y * y) * 511.9999) / m)) << 1;
+#else
+ *distptr++ = ((int) ((sqrt (x * x + y * y) * 511.9999) / m)) << 1;
+#endif
+}
+
+static GstFlowReturn
+gst_warptv_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame,
+ GstVideoFrame * out_frame)
+{
+ GstWarpTV *warptv = GST_WARPTV (filter);
+ gint width, height;
+ gint xw, yw, cw;
+ gint32 c, i, x, y, dx, dy, maxx, maxy;
+ gint32 *ctptr, *distptr;
+ gint32 *ctable;
+ guint32 *src, *dest;
+ gint sstride, dstride;
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
+ dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
+
+ sstride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
+ dstride = GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, 0);
+
+ width = GST_VIDEO_FRAME_WIDTH (in_frame);
+ height = GST_VIDEO_FRAME_HEIGHT (in_frame);
+
+ GST_OBJECT_LOCK (warptv);
+ xw = (gint) (sin ((warptv->tval + 100) * M_PI / 128) * 30);
+ yw = (gint) (sin ((warptv->tval) * M_PI / 256) * -35);
+ cw = (gint) (sin ((warptv->tval - 70) * M_PI / 64) * 50);
+ xw += (gint) (sin ((warptv->tval - 10) * M_PI / 512) * 40);
+ yw += (gint) (sin ((warptv->tval + 30) * M_PI / 512) * 40);
+
+ ctptr = warptv->ctable;
+ distptr = warptv->disttable;
+ ctable = warptv->ctable;
+
+ c = 0;
+
+ for (x = 0; x < 512; x++) {
+ i = (c >> 3) & 0x3FE;
+ *ctptr++ = ((sintable[i] * yw) >> 15);
+ *ctptr++ = ((sintable[i + 256] * xw) >> 15);
+ c += cw;
+ }
+ maxx = width - 2;
+ maxy = height - 2;
+
+ for (y = 0; y < height - 1; y++) {
+ for (x = 0; x < width; x++) {
+ i = *distptr++;
+ dx = ctable[i + 1] + x;
+ dy = ctable[i] + y;
+
+ if (dx < 0)
+ dx = 0;
+ else if (dx > maxx)
+ dx = maxx;
+
+ if (dy < 0)
+ dy = 0;
+ else if (dy > maxy)
+ dy = maxy;
+
+ dest[x] = src[dy * sstride / 4 + dx];
+ }
+ dest += dstride / 4;
+ }
+
+ warptv->tval = (warptv->tval + 1) & 511;
+ GST_OBJECT_UNLOCK (warptv);
+
+ return GST_FLOW_OK;
+}
+
+static gboolean
+gst_warptv_start (GstBaseTransform * trans)
+{
+ GstWarpTV *warptv = GST_WARPTV (trans);
+
+ warptv->tval = 0;
+
+ return TRUE;
+}
+
+static void
+gst_warptv_finalize (GObject * object)
+{
+ GstWarpTV *warptv = GST_WARPTV (object);
+
+ g_free (warptv->disttable);
+ warptv->disttable = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gst_warptv_class_init (GstWarpTVClass * klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
+ GstBaseTransformClass *trans_class = (GstBaseTransformClass *) klass;
+ GstVideoFilterClass *vfilter_class = (GstVideoFilterClass *) klass;
+
+ gobject_class->finalize = gst_warptv_finalize;
+
+ gst_element_class_set_static_metadata (gstelement_class, "WarpTV effect",
+ "Filter/Effect/Video",
+ "WarpTV does realtime goo'ing of the video input",
+ "Sam Lantinga <slouken@devolution.com>");
+
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_warptv_sink_template));
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&gst_warptv_src_template));
+
+ trans_class->start = GST_DEBUG_FUNCPTR (gst_warptv_start);
+
+ vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_warptv_set_info);
+ vfilter_class->transform_frame =
+ GST_DEBUG_FUNCPTR (gst_warptv_transform_frame);
+
+ initSinTable ();
+}
+
+static void
+gst_warptv_init (GstWarpTV * warptv)
+{
+ /* nothing to do */
+}
diff --git a/gst/effectv/gstwarp.h b/gst/effectv/gstwarp.h
new file mode 100644
index 0000000..73eeebc
--- /dev/null
+++ b/gst/effectv/gstwarp.h
@@ -0,0 +1,67 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2003> David Schleef <ds@schleef.org>
+ *
+ * EffecTV - Realtime Digital Video Effector
+ * Copyright (C) 2001 FUKUCHI Kentarou
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_WARP_H__
+#define __GST_WARP_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/video.h>
+#include <gst/video/gstvideofilter.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WARPTV \
+ (gst_warptv_get_type())
+#define GST_WARPTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WARPTV,GstWarpTV))
+#define GST_WARPTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WARPTV,GstWarpTVClass))
+#define GST_IS_WARPTV(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WARPTV))
+#define GST_IS_WARPTV_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WARPTV))
+
+typedef struct _GstWarpTV GstWarpTV;
+typedef struct _GstWarpTVClass GstWarpTVClass;
+
+struct _GstWarpTV
+{
+ GstVideoFilter videofilter;
+
+ /* < private > */
+ gint32 *disttable;
+ gint32 ctable[1024];
+ gint tval;
+};
+
+struct _GstWarpTVClass
+{
+ GstVideoFilterClass parent_class;
+};
+
+GType gst_warptv_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_WARP_H__ */