summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
m---------common0
-rw-r--r--configure.ac7
-rw-r--r--gst/goom/Makefile.am2
-rw-r--r--gst/goom/convolve_fx.c8
-rw-r--r--gst/goom/flying_stars_fx.c11
-rw-r--r--gst/goom/goom_config.h4
-rw-r--r--gst/goom/goom_core.c4
-rw-r--r--gst/goom/goomsl.c2
-rw-r--r--gst/goom/ifs.c4
-rw-r--r--gst/goom/mmx.c15
-rw-r--r--gst/goom/plugin_info.c10
-rw-r--r--gst/goom/xmmx.c12
13 files changed, 78 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d2017b3..1b4f0293 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2008-02-26 Jan Schmidt <jan.schmidt@sun.com>
+
+ * configure.ac:
+ Detect and indicate if GCC inline assembly syntax is
+ available.
+
+ * gst/goom/Makefile.am:
+ * gst/goom/convolve_fx.c:
+ * gst/goom/flying_stars_fx.c:
+ * gst/goom/goom_config.h:
+ * gst/goom/goom_core.c:
+ * gst/goom/goomsl.c:
+ * gst/goom/ifs.c:
+ * gst/goom/mmx.c:
+ * gst/goom/plugin_info.c:
+ * gst/goom/xmmx.c:
+ Fix various GCC-isms, and only build the inline assembly
+ with compilers that support GCC inline assembly.
+
+ Fix a couple of other warnings shown with Forte.
+
2008-02-25 Stefan Kost <ensonic@users.sf.net>
* gst/goom/xmmx.c:
diff --git a/common b/common
-Subproject 1c5138efc5679d9eaee66c84dcfabdec5b72749
+Subproject e746d20ef536a73aea9964666c7d5f6d5c9465d
diff --git a/configure.ac b/configure.ac
index a6c3170d..1580d75f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -337,6 +337,13 @@ dnl Check for Yacc and Lex for the goom plugin
AG_GST_BISON_CHECK
AG_GST_FLEX_CHECK
AM_PROG_AS
+dnl Check if we have GCC inline-asm
+AS_GCC_INLINE_ASSEMBLY([HAVE_GCC_ASM=yes], [HAVE_GCC_ASM=no])
+if test x$HAVE_GCC_ASM = xyes ; then
+ AC_DEFINE(HAVE_GCC_ASM, 1,
+ [Define if compiler supports gcc inline assembly])
+fi
+AM_CONDITIONAL(HAVE_GCC_ASM, test "x$HAVE_GCC_ASM" = "xyes")
dnl *** sys plug-ins ***
diff --git a/gst/goom/Makefile.am b/gst/goom/Makefile.am
index 02bb6b26..0dec96a4 100644
--- a/gst/goom/Makefile.am
+++ b/gst/goom/Makefile.am
@@ -11,7 +11,7 @@ ARCH_FILES = $(PPC_FILES)
endif
if HAVE_CPU_I386
ARCH_FILES = $(MMX_FILES)
-ARCH_CFLAGS = -DHAVE_MMX
+ARCH_CFLAGS = -DBUILD_MMX
endif
libgstgoom_la_SOURCES = \
diff --git a/gst/goom/convolve_fx.c b/gst/goom/convolve_fx.c
index fb5e0b55..c5d8f298 100644
--- a/gst/goom/convolve_fx.c
+++ b/gst/goom/convolve_fx.c
@@ -340,10 +340,10 @@ VisualFX
convolve_create (void)
{
VisualFX vfx = {
- init:convolve_init,
- free:convolve_free,
- apply:convolve_apply,
- fx_data:0
+ convolve_init,
+ convolve_free,
+ convolve_apply,
+ NULL
};
return vfx;
}
diff --git a/gst/goom/flying_stars_fx.c b/gst/goom/flying_stars_fx.c
index c323c7c9..384b54aa 100644
--- a/gst/goom/flying_stars_fx.c
+++ b/gst/goom/flying_stars_fx.c
@@ -200,8 +200,7 @@ fs_sound_event_occured (VisualFX * _this, PluginInfo * info)
FSData *data = (FSData *) _this->fx_data;
int i;
- int max =
- (int) ((1.0f + info->sound.goomPower) * goom_irand (info->gRandom,
+ int max = (int) ((1.0f + info->sound.goomPower) * goom_irand (info->gRandom,
150)) + 100;
float radius =
(1.0f + info->sound.goomPower) * (float) (goom_irand (info->gRandom,
@@ -332,10 +331,10 @@ VisualFX
flying_star_create (void)
{
VisualFX vfx = {
- init:fs_init,
- free:fs_free,
- apply:fs_apply,
- fx_data:0
+ fs_init,
+ fs_free,
+ fs_apply,
+ NULL
};
return vfx;
}
diff --git a/gst/goom/goom_config.h b/gst/goom/goom_config.h
index 5f6f1589..d44e23d1 100644
--- a/gst/goom/goom_config.h
+++ b/gst/goom/goom_config.h
@@ -26,3 +26,7 @@
#define gint16 signed short int
#define gint32 signed int
#endif
+
+#if defined (BUILD_MMX) && defined (HAVE_GCC_ASM)
+#define HAVE_MMX
+#endif
diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c
index 5dee8278..14df03a0 100644
--- a/gst/goom/goom_core.c
+++ b/gst/goom/goom_core.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <inttypes.h>
#include "goom.h"
@@ -721,8 +722,7 @@ goom_update (PluginInfo * goomInfo, gint16 data[2][512],
goomInfo->update.lineMode--;
if (goomInfo->update.lineMode == -1)
goomInfo->update.lineMode = 0;
- } else
- if ((goomInfo->cycle % 80 == 0)
+ } else if ((goomInfo->cycle % 80 == 0)
&& (goom_irand (goomInfo->gRandom, 5) == 0) && goomInfo->update.lineMode)
goomInfo->update.lineMode--;
diff --git a/gst/goom/goomsl.c b/gst/goom/goomsl.c
index 6d3254ae..759be102 100644
--- a/gst/goom/goomsl.c
+++ b/gst/goom/goomsl.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <glib.h>
#include "goomsl.h"
#include "goomsl_private.h"
#include "goomsl_yacc.h"
@@ -465,7 +466,6 @@ gsl_instr_validate (Instruction * _this)
default:
return VALIDATE_TODO;
}
- return VALIDATE_ERROR;
} /* }}} */
/*************/
diff --git a/gst/goom/ifs.c b/gst/goom/ifs.c
index ccadaa7a..1a90e2dd 100644
--- a/gst/goom/ifs.c
+++ b/gst/goom/ifs.c
@@ -470,7 +470,7 @@ static void
ifs_update (PluginInfo * goomInfo, Pixel * data, Pixel * back, int increment,
IfsData * fx_data)
{
- static int couleur = 0xc0c0c0c0;
+ static unsigned int couleur = 0xc0c0c0c0;
static int v[4] = { 2, 4, 3, 2 };
static int col[4] = { 2, 4, 3, 2 };
@@ -486,7 +486,7 @@ ifs_update (PluginInfo * goomInfo, Pixel * data, Pixel * back, int increment,
IFSPoint *points;
int i;
- int couleursl = couleur;
+ unsigned int couleursl = couleur;
int width = goomInfo->screen.width;
int height = goomInfo->screen.height;
diff --git a/gst/goom/mmx.c b/gst/goom/mmx.c
index 4cee0acb..73546a89 100644
--- a/gst/goom/mmx.c
+++ b/gst/goom/mmx.c
@@ -1,6 +1,10 @@
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
-#if defined (HAVE_CPU_I386) || defined (HAVE_CPU_X86_64)
+#include "goom_config.h"
+
+#ifdef HAVE_MMX
#define BUFFPOINTNB 16
#define BUFFPOINTMASK 0xffff
@@ -252,5 +256,10 @@ end_of_line:
emms ();
/* __asm__ __volatile__ ("emms"); */
}
-
-#endif /* HAVE_CPU_I386 || HAVE_CPU_X86_64 */
+#else
+int
+mmx_supported (void)
+{
+ return (0);
+}
+#endif /* HAVE_MMX */
diff --git a/gst/goom/plugin_info.c b/gst/goom/plugin_info.c
index 420f45a1..1218b78f 100644
--- a/gst/goom/plugin_info.c
+++ b/gst/goom/plugin_info.c
@@ -1,7 +1,11 @@
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <gst/gst.h>
+#include "goom_config.h"
+
#include "goom_plugin_info.h"
#include "goom_fx.h"
#include "default_scripts.h"
@@ -18,9 +22,9 @@
#endif /* HAVE_CPU_PPC64 || HAVE_CPU_PPC */
-#ifdef HAVE_CPU_I386
+#ifdef HAVE_MMX
#include "mmx.h"
-#endif /* HAVE_CPU_I386 */
+#endif /* HAVE_MMX */
#include <liboil/liboil.h>
#include <liboil/liboilfunction.h>
@@ -44,6 +48,7 @@ setOptimizedMethods (PluginInfo * p)
/* FIXME: what about HAVE_CPU_X86_64 ? */
#ifdef HAVE_CPU_I386
+#ifdef HAVE_MMX
GST_INFO ("have an x86");
if (cpuFlavour & OIL_IMPL_FLAG_MMXEXT) {
GST_INFO ("Extended MMX detected. Using the fastest methods!");
@@ -56,6 +61,7 @@ setOptimizedMethods (PluginInfo * p)
} else {
GST_INFO ("Too bad ! No SIMD optimization available for your CPU.");
}
+#endif
#endif /* HAVE_CPU_I386 */
#ifdef HAVE_CPU_PPC64
diff --git a/gst/goom/xmmx.c b/gst/goom/xmmx.c
index a9e9dfb7..1d68ef64 100644
--- a/gst/goom/xmmx.c
+++ b/gst/goom/xmmx.c
@@ -1,3 +1,8 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "goom_config.h"
#ifdef HAVE_MMX
@@ -362,5 +367,10 @@ end_of_line:
/* this was femms, which is AMD 3dnow */
__asm__ __volatile__ ("emms\n");
}
-
+#else
+int
+xmmx_supported (void)
+{
+ return (0);
+}
#endif