[xiph-commits] r9353 - in experimental/derf/theora-exp: . examples
lib
tterribe at motherfish-iii.xiph.org
tterribe at motherfish-iii.xiph.org
Sat Jun 4 13:56:46 PDT 2005
Author: tterribe
Date: 2005-06-04 13:56:43 -0700 (Sat, 04 Jun 2005)
New Revision: 9353
Modified:
experimental/derf/theora-exp/configure.ac
experimental/derf/theora-exp/examples/Makefile.am
experimental/derf/theora-exp/lib/Makefile.am
experimental/derf/theora-exp/lib/internal.h
Log:
Add an option to enable the x86 assembly optimizations with autofoo.
Currently, this is disabled by default, though ideally build support would be
auto-detected (runtime support is already auto-detected if it's enabled at
build time).
Thanks to j^ for the patch.
Modified: experimental/derf/theora-exp/configure.ac
===================================================================
--- experimental/derf/theora-exp/configure.ac 2005-06-04 20:15:19 UTC (rev 9352)
+++ experimental/derf/theora-exp/configure.ac 2005-06-04 20:56:43 UTC (rev 9353)
@@ -122,6 +122,23 @@
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(gettimeofday select strstr)
+dnl Check for optimization
+AC_ARG_ENABLE(x86asm,
+ AS_HELP_STRING([--enable-x86asm],
+ [enable x86 assambler optimization, default=disabled]),
+ AC_DEFINE([OC_X86ASM], [], [enable x86 assambler optimization])
+)
+
+if test "$enable_x86asm" = "yes"; then
+ AM_CONDITIONAL(OC_X86ASM,true)
+else
+ AM_CONDITIONAL(OC_X86ASM,false)
+fi
+
+dnl Enable some opzimization for gcc
+OPTIMIZATION_CFLAGS="-O3 -fforce-addr -fomit-frame-pointer"
+AC_SUBST(OPTIMIZATION_CFLAGS)
+
AC_OUTPUT([
Makefile lib/Makefile
include/Makefile include/theora/Makefile
Modified: experimental/derf/theora-exp/examples/Makefile.am
===================================================================
--- experimental/derf/theora-exp/examples/Makefile.am 2005-06-04 20:15:19 UTC (rev 9352)
+++ experimental/derf/theora-exp/examples/Makefile.am 2005-06-04 20:56:43 UTC (rev 9353)
@@ -1,6 +1,6 @@
INCLUDES = -I $(top_srcdir)/include
-AM_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS)
+AM_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(OPTIMIZATION_CFLAGS)
LDADD = ../lib/libtheoradec.la ../lib/libtheoraenc.la ../lib/libtheorabase.la -lm $(OGG_LIBS)
Modified: experimental/derf/theora-exp/lib/Makefile.am
===================================================================
--- experimental/derf/theora-exp/lib/Makefile.am 2005-06-04 20:15:19 UTC (rev 9352)
+++ experimental/derf/theora-exp/lib/Makefile.am 2005-06-04 20:56:43 UTC (rev 9353)
@@ -1,8 +1,22 @@
lib_LTLIBRARIES = libtheorabase.la libtheoraenc.la libtheoradec.la
INCLUDES = -I $(top_srcdir)/include
-AM_CFLAGS = $(OGG_CFLAGS)
+AM_CFLAGS = $(OGG_CFLAGS) $(OPTIMIZATION_CFLAGS)
+EXTRA_DIST = \
+ x86/cpu.c \
+ x86/mmxfrag.c \
+ x86/mmxstate.c \
+ x86/x86state.c
+
+if OC_X86ASM
+X86ASM_FILES = \
+ x86/cpu.c \
+ x86/mmxfrag.c \
+ x86/mmxstate.c \
+ x86/x86state.c
+endif
+
noinst_HEADERS = \
dct.h \
decint.h \
@@ -17,7 +31,9 @@
internal.h \
ocintrin.h \
psych.h \
- quant.h
+ quant.h \
+ x86/cpu.h \
+ x86/x86int.h
libtheorabase_la_SOURCES = \
fragment.c \
@@ -25,7 +41,8 @@
info.c \
internal.c \
quant.c \
- state.c
+ state.c \
+ $(X86ASM_FILES)
libtheorabase_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@
@@ -49,4 +66,3 @@
huffdec.c
libtheoradec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@
-
Modified: experimental/derf/theora-exp/lib/internal.h
===================================================================
--- experimental/derf/theora-exp/lib/internal.h 2005-06-04 20:15:19 UTC (rev 9352)
+++ experimental/derf/theora-exp/lib/internal.h 2005-06-04 20:56:43 UTC (rev 9353)
@@ -1,6 +1,9 @@
#if !defined(_internal_H)
# define _internal_H (1)
# include <stdlib.h>
+# if defined(HAVE_CONFIG_H)
+# include <config.h>
+# endif
# include "theora/codec.h"
# include "ocintrin.h"
# include "huffman.h"
More information about the commits
mailing list