Commit e61bfa60 authored by Christophe Massiot's avatar Christophe Massiot

Faster configure script and as-yet untested Darwin patches.

parent 93d7b1f0
...@@ -65,6 +65,7 @@ includedir = @includedir@ ...@@ -65,6 +65,7 @@ includedir = @includedir@
# Libraries for special cases # Libraries for special cases
# #
LIB_ALSA = @LIB_ALSA@ LIB_ALSA = @LIB_ALSA@
LIB_ALTIVEC = @LIB_ALTIVEC@
LIB_BEOS = @LIB_BEOS@ LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@ LIB_DARWIN = @LIB_DARWIN@
LIB_DVD = @LIB_DVD@ LIB_DVD = @LIB_DVD@
...@@ -90,6 +91,7 @@ LIB_YUV = @LIB_YUV@ ...@@ -90,6 +91,7 @@ LIB_YUV = @LIB_YUV@
# #
# CFLAGS for special cases # CFLAGS for special cases
# #
CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
CFLAGS_DVD = @CFLAGS_DVD@ CFLAGS_DVD = @CFLAGS_DVD@
CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@ CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
CFLAGS_GTK = @CFLAGS_GTK@ CFLAGS_GTK = @CFLAGS_GTK@
...@@ -171,6 +173,9 @@ INCLUDE += -Iinclude -Iextras ...@@ -171,6 +173,9 @@ INCLUDE += -Iinclude -Iextras
# #
# Libraries needed by built-in modules # Libraries needed by built-in modules
# #
# Let's go for a crude hack !
LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
ifneq (,$(BUILTINS)) ifneq (,$(BUILTINS))
LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done) LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
LIB += $(LIB_BUILTINS) LIB += $(LIB_BUILTINS)
...@@ -236,7 +241,7 @@ endif ...@@ -236,7 +241,7 @@ endif
# Optimizations for PowerPC # Optimizations for PowerPC
ifneq (,$(findstring powerpc,$(ARCH))) ifneq (,$(findstring powerpc,$(ARCH)))
CFLAGS += -mmultiple -mhard-float -mstring -Wa,-m7400 CFLAGS += -mmultiple -mhard-float -mstring
endif endif
# Optimizations for Sparc # Optimizations for Sparc
...@@ -258,7 +263,13 @@ DCFLAGS += -MM ...@@ -258,7 +263,13 @@ DCFLAGS += -MM
# #
LCFLAGS += @LCFLAGS@ $(LIB) LCFLAGS += @LCFLAGS@ $(LIB)
LCFLAGS += -Wall LCFLAGS += -Wall
#LCFLAGS += -s ifneq ($(DEBUG),1)
ifneq ($(GPROF),1)
ifneq ($(CPROF),1)
LCFLAGS += -s
endif
endif
endif
ifneq (,$(findstring mingw32,$(SYS))) ifneq (,$(findstring mingw32,$(SYS)))
LCFLAGS += -mwindows -Xlinker --force-exe-suffix LCFLAGS += -mwindows -Xlinker --force-exe-suffix
endif endif
......
This diff is collapsed.
This diff is collapsed.
...@@ -19,8 +19,8 @@ BUILTIN_IDCTMMX = $(PLUGIN_IDCTMMX:%.o=BUILTIN_IDCTMMX_%.o) ...@@ -19,8 +19,8 @@ BUILTIN_IDCTMMX = $(PLUGIN_IDCTMMX:%.o=BUILTIN_IDCTMMX_%.o)
BUILTIN_IDCTMMXEXT = $(PLUGIN_IDCTMMXEXT:%.o=BUILTIN_IDCTMMXEXT_%.o) BUILTIN_IDCTMMXEXT = $(PLUGIN_IDCTMMXEXT:%.o=BUILTIN_IDCTMMXEXT_%.o)
BUILTIN_IDCTALTIVEC = $(PLUGIN_IDCTALTIVEC:%.o=BUILTIN_IDCTALTIVEC_%.o) BUILTIN_IDCTALTIVEC = $(PLUGIN_IDCTALTIVEC:%.o=BUILTIN_IDCTALTIVEC_%.o)
PLUGIN_C = $(PLUGIN_IDCT) $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTALTIVEC) PLUGIN_C = $(PLUGIN_IDCT) $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTMMXEXT)
ALL_OBJ = $(PLUGIN_C) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX) $(BUILTIN_IDCTMMXEXT) $(BUILTIN_IDCTALTIVEC) ALL_OBJ = $(PLUGIN_C) $(PLUGIN_IDCTALTIVEC) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX) $(BUILTIN_IDCTMMXEXT) $(BUILTIN_IDCTALTIVEC)
# #
# Virtual targets # Virtual targets
...@@ -28,6 +28,10 @@ ALL_OBJ = $(PLUGIN_C) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX) ...@@ -28,6 +28,10 @@ ALL_OBJ = $(PLUGIN_C) $(BUILTIN_IDCT) $(BUILTIN_IDCTCLASSIC) $(BUILTIN_IDCTMMX)
include ../../Makefile.modules include ../../Makefile.modules
$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
$(PLUGIN_IDCTALTIVEC): %.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DPLUGIN $(PCFLAGS) -c -o $@ $<
$(BUILTIN_IDCT): BUILTIN_IDCT_%.o: .dep/%.d $(BUILTIN_IDCT): BUILTIN_IDCT_%.o: .dep/%.d
$(BUILTIN_IDCT): BUILTIN_IDCT_%.o: %.c $(BUILTIN_IDCT): BUILTIN_IDCT_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idct -c -o $@ $< $(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idct -c -o $@ $<
...@@ -46,7 +50,7 @@ $(BUILTIN_IDCTMMXEXT): BUILTIN_IDCTMMXEXT_%.o: %.c ...@@ -46,7 +50,7 @@ $(BUILTIN_IDCTMMXEXT): BUILTIN_IDCTMMXEXT_%.o: %.c
$(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: .dep/%.d $(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: .dep/%.d
$(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c $(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=idctaltivec -c -o $@ $< $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=idctaltivec -c -o $@ $<
# #
# Real targets # Real targets
...@@ -81,7 +85,7 @@ $(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c ...@@ -81,7 +85,7 @@ $(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c
$(RANLIB) $@ $(RANLIB) $@
../idctaltivec.so: $(PLUGIN_IDCTALTIVEC) ../idctaltivec.so: $(PLUGIN_IDCTALTIVEC)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(CC) $(PCFLAGS) -o $@ $^ $(LIB_ALTIVEC) $(PLCFLAGS)
../idctaltivec.a: $(BUILTIN_IDCTALTIVEC) ../idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
ar r $@ $^ ar r $@ $^
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* idctaltivec.c : Altivec IDCT module * idctaltivec.c : Altivec IDCT module
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: idctaltivec.c,v 1.16 2001/09/28 09:55:20 massiot Exp $ * $Id: idctaltivec.c,v 1.17 2001/09/28 14:17:16 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __ALTIVEC__ #ifndef __BUILD_ALTIVEC_ASM__
#define MODULE_NAME idctaltivec #define MODULE_NAME idctaltivec
#include "modules_inner.h" #include "modules_inner.h"
...@@ -129,10 +129,12 @@ static int16_t constants[5][8] ATTR_ALIGN(16) = { ...@@ -129,10 +129,12 @@ static int16_t constants[5][8] ATTR_ALIGN(16) = {
{19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722} {19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722}
}; };
#ifndef HAVE_C_ALTIVEC
/* /*
* The asm code is generated with: * The asm code is generated with:
* *
* gcc-2.95 -fvec -D__ALTIVEC__ -O9 -fomit-frame-pointer -mregnames -S * gcc-2.95 -fvec -D__BUILD_ALTIVEC_ASM__ -O9 -fomit-frame-pointer -mregnames -S
* idct_altivec.c * idct_altivec.c
* *
* awk '{args=""; len=split ($2, arg, ","); * awk '{args=""; len=split ($2, arg, ",");
...@@ -555,7 +557,11 @@ void idct_block_add_altivec (int16_t * block, uint8_t * dest, int stride) ...@@ -555,7 +557,11 @@ void idct_block_add_altivec (int16_t * block, uint8_t * dest, int stride)
); );
} }
#else /* __ALTIVEC__ */ #endif /* !HAVE_C_ALTIVEC */
#endif /* __BUILD_ALTIVEC_ASM__ */
#if defined(HAVE_C_ALTIVEC) || defined(__BUILD_ALTIVEC_ASM__)
#define vector_s16_t vector signed short #define vector_s16_t vector signed short
#define vector_u16_t vector unsigned short #define vector_u16_t vector unsigned short
...@@ -733,8 +739,9 @@ void idct_block_add_altivec (vector_s16_t * block, unsigned char * dest, ...@@ -733,8 +739,9 @@ void idct_block_add_altivec (vector_s16_t * block, unsigned char * dest,
ADD (dest, vx7, perm1) ADD (dest, vx7, perm1)
} }
#endif /* __ALTIVEC__ */ #endif /* __BUILD_ALTIVEC_ASM__ || HAVE_C_ALTIVEC */
#ifndef __ALTIVEC__
#ifndef __BUILD_ALTIVEC_ASM__
/***************************************************************************** /*****************************************************************************
* Functions exported as capabilities. They are declared as static so that * Functions exported as capabilities. They are declared as static so that
...@@ -754,4 +761,4 @@ static void idct_getfunctions( function_list_t * p_function_list ) ...@@ -754,4 +761,4 @@ static void idct_getfunctions( function_list_t * p_function_list )
#undef F #undef F
} }
#endif /* __ALTIVEC__ */ #endif /* __BUILD_ALTIVEC_ASM__ */
...@@ -30,7 +30,7 @@ include ../../Makefile.modules ...@@ -30,7 +30,7 @@ include ../../Makefile.modules
$(PLUGIN_MOTIONALTIVEC): %.o: .dep/%.d $(PLUGIN_MOTIONALTIVEC): %.o: .dep/%.d
$(PLUGIN_MOTIONALTIVEC): %.o: %.c $(PLUGIN_MOTIONALTIVEC): %.o: %.c
$(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -faltivec -c -o $@ $< $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DPLUGIN $(PCFLAGS) -c -o $@ $<
$(BUILTIN_MOTION): BUILTIN_MOTION_%.o: .dep/%.d $(BUILTIN_MOTION): BUILTIN_MOTION_%.o: .dep/%.d
$(BUILTIN_MOTION): BUILTIN_MOTION_%.o: %.c $(BUILTIN_MOTION): BUILTIN_MOTION_%.o: %.c
...@@ -50,7 +50,7 @@ $(BUILTIN_MOTION3DNOW): BUILTIN_MOTION3DNOW_%.o: %.c ...@@ -50,7 +50,7 @@ $(BUILTIN_MOTION3DNOW): BUILTIN_MOTION3DNOW_%.o: %.c
$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: .dep/%.d $(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: .dep/%.d
$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c $(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -DMODULE_NAME=motionaltivec -faltivec -c -o $@ $< $(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=motionaltivec -faltivec -c -o $@ $<
# #
# Real targets # Real targets
...@@ -92,7 +92,7 @@ $(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c ...@@ -92,7 +92,7 @@ $(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c
$(RANLIB) $@ $(RANLIB) $@
../motionaltivec.so: $(PLUGIN_MOTIONALTIVEC) ../motionaltivec.so: $(PLUGIN_MOTIONALTIVEC)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(CC) $(PCFLAGS) -o $@ $^ $(LIB_ALTIVEC) $(PLCFLAGS)
../motionaltivec.a: $(BUILTIN_MOTIONALTIVEC) ../motionaltivec.a: $(BUILTIN_MOTIONALTIVEC)
ar r $@ $^ ar r $@ $^
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* motionaltivec.c : Altivec motion compensation module for vlc * motionaltivec.c : Altivec motion compensation module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: motionaltivec.c,v 1.4 2001/09/25 11:46:14 massiot Exp $ * $Id: motionaltivec.c,v 1.5 2001/09/28 14:17:16 massiot Exp $
* *
* Authors: Michel Lespinasse <walken@zoy.org> * Authors: Michel Lespinasse <walken@zoy.org>
* Paul Mackerras <paulus@linuxcare.com.au> * Paul Mackerras <paulus@linuxcare.com.au>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef __ALTIVEC__ #ifndef __BUILD_ALTIVEC_ASM__
#define MODULE_NAME motionaltivec #define MODULE_NAME motionaltivec
#include "modules_inner.h" #include "modules_inner.h"
...@@ -94,10 +94,12 @@ static int motion_Probe( probedata_t *p_data ) ...@@ -94,10 +94,12 @@ static int motion_Probe( probedata_t *p_data )
* Motion compensation in Altivec * Motion compensation in Altivec
*****************************************************************************/ *****************************************************************************/
#ifndef HAVE_C_ALTIVEC
/* /*
* The asm code is generated with: * The asm code is generated with:
* *
* gcc-2.95 -fvec -D__ALTIVEC__ -O9 -fomit-frame-pointer -mregnames -S * gcc-2.95 -fvec -D__BUILD_ALTIVEC_ASM__ -O9 -fomit-frame-pointer -mregnames -S
* motion_comp_altivec.c * motion_comp_altivec.c
* *
* sed 's/.L/._L/g' motion_comp_altivec.s | * sed 's/.L/._L/g' motion_comp_altivec.s |
...@@ -1126,7 +1128,10 @@ static void MC_avg_xy_8_altivec (uint8_t * dest, uint8_t * ref, ...@@ -1126,7 +1128,10 @@ static void MC_avg_xy_8_altivec (uint8_t * dest, uint8_t * ref,
); );
} }
#else /* __ALTIVEC__ */ #endif /* !HAVE_C_ALTIVEC */
#endif /* __BUILD_ALTIVEC_ASM__ */
#if defined(HAVE_C_ALTIVEC) || defined(__BUILD_ALTIVEC_ASM__)
#define vector_s16_t vector signed short #define vector_s16_t vector signed short
#define vector_u16_t vector unsigned short #define vector_u16_t vector unsigned short
...@@ -2078,8 +2083,8 @@ void MC_avg_xy_8_altivec (unsigned char * dest, unsigned char * ref, ...@@ -2078,8 +2083,8 @@ void MC_avg_xy_8_altivec (unsigned char * dest, unsigned char * ref,
vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest);
} }
#endif /* __ALTIVEC__ */ #endif /* HAVE_C_ALTIVEC || __BUILD_ALTIVEC_ASM__ */
#ifndef __ALTIVEC__ #ifndef __BUILD_ALTIVEC_ASM__
/***************************************************************************** /*****************************************************************************
* Functions exported as capabilities. They are declared as static so that * Functions exported as capabilities. They are declared as static so that
...@@ -2123,4 +2128,4 @@ static void motion_getfunctions( function_list_t * p_function_list ) ...@@ -2123,4 +2128,4 @@ static void motion_getfunctions( function_list_t * p_function_list )
return; return;
} }
#endif /* __ALTIVEC__ */ #endif /* __BUILD_ALTIVEC_ASM__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment