From: <tp...@ke...> - 2008-02-23 12:10:25
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: tpm Date: Sat Feb 23 2008 12:10:31 UTC Log message: * gst/goom/gstgoom.c: (goom_debug), (plugin_init): * gst/goom/plugin_info.c: (goom_debug), (GST_CAT_DEFAULT), (setOptimizedMethods): Call oil_init(), otherwise oil_get_cpu_flags() won't return anything useful. Export goom debug category so we can get rid of the VERBOSE define and the printfs. Modified files: . : ChangeLog gst/goom : gstgoom.c plugin_info.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3327&r2=1.3328 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/goom/gstgoom.c.diff?r1=1.64&r2=1.65 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/goom/plugin_info.c.diff?r1=1.4&r2=1.5 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3327 retrieving revision 1.3328 diff -u -d -r1.3327 -r1.3328 --- ChangeLog 23 Feb 2008 11:53:26 -0000 1.3327 +++ ChangeLog 23 Feb 2008 12:10:15 -0000 1.3328 @@ -1,5 +1,14 @@ 2008-02-23 Tim-Philipp Müller <tim at centricular dot net> + * gst/goom/gstgoom.c: (goom_debug), (plugin_init): + * gst/goom/plugin_info.c: (goom_debug), (GST_CAT_DEFAULT), + (setOptimizedMethods): + Call oil_init(), otherwise oil_get_cpu_flags() won't return + anything useful. Export goom debug category so we can get + rid of the VERBOSE define and the printfs. + +2008-02-23 Tim-Philipp Müller <tim at centricular dot net> * gst/goom/goomsl_heap.c: (align_it): * gst/goom/plugin_info.c: (setOptimizedMethods): Compile fixes for x86-64. Index: gstgoom.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/goom/gstgoom.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- gstgoom.c 23 Feb 2008 01:51:32 -0000 1.64 +++ gstgoom.c 23 Feb 2008 12:10:16 -0000 1.65 @@ -46,7 +46,9 @@ #include <gst/video/video.h> #include "goom.h" -GST_DEBUG_CATEGORY_STATIC (goom_debug); +#include <liboil/liboil.h> +GST_DEBUG_CATEGORY (goom_debug); #define GST_CAT_DEFAULT goom_debug /* elementfactory information */ @@ -153,8 +155,6 @@ gobject_class->finalize = gst_goom_finalize; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_goom_change_state); - - GST_DEBUG_CATEGORY_INIT (goom_debug, "goom", 0, "goom visualisation element"); } static void @@ -593,6 +593,10 @@ static gboolean plugin_init (GstPlugin * plugin) { + GST_DEBUG_CATEGORY_INIT (goom_debug, "goom", 0, "goom visualisation element"); + oil_init (); return gst_element_register (plugin, "goom", GST_RANK_NONE, GST_TYPE_GOOM); Index: plugin_info.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/goom/plugin_info.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- plugin_info.c 23 Feb 2008 11:53:27 -0000 1.4 +++ plugin_info.c 23 Feb 2008 12:10:16 -0000 1.5 @@ -1,5 +1,7 @@ #include "config.h" +#include <gst/gst.h> #include "goom_plugin_info.h" #include "goom_fx.h" #include "default_scripts.h" @@ -23,7 +25,9 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> #include <liboil/liboilcpu.h> -/* #define VERBOSE 1 */ +GST_DEBUG_CATEGORY_EXTERN (goom_debug); +#define GST_CAT_DEFAULT goom_debug setOptimizedMethods (PluginInfo * p) @@ -36,26 +40,22 @@ p->methods.zoom_filter = zoom_filter_c; /* p->methods.create_output_with_brightness = create_output_with_brightness;*/ + GST_INFO ("liboil cpu flags: 0x%08x", cpuFlavour); /* FIXME: what about HAVE_CPU_X86_64 ? */ #ifdef HAVE_CPU_I386 - printf ("have an x86\n"); + GST_INFO ("have an x86"); if (cpuFlavour & OIL_IMPL_FLAG_MMXEXT) { -#ifdef VERBOSE - printf ("Extended MMX detected. Using the fastest methods !\n"); -#endif + GST_INFO ("Extended MMX detected. Using the fastest methods!"); p->methods.draw_line = draw_line_mmx; p->methods.zoom_filter = zoom_filter_xmmx; } else if (cpuFlavour & OIL_IMPL_FLAG_MMX) { - printf ("MMX detected. Using fast methods !\n"); + GST_INFO ("MMX detected. Using fast methods!"); p->methods.zoom_filter = zoom_filter_mmx; + } else { + GST_INFO ("Too bad ! No SIMD optimization available for your CPU."); } - else - printf ("Too bad ! No SIMD optimization available for your CPU.\n"); #endif /* HAVE_CPU_I386 */ #ifdef HAVE_CPU_PPC64 |