[MPlayer-dev-eng] [PATCH] SSE version of DCT64 for mp3lib
Guillaume Poirier
gpoirier at mplayerhq.hu
Fri Jun 23 10:24:46 CEST 2006
Hi,
Guillaume POIRIER wrote:
> On 6/23/06, Zuxy Meng <zuxy.meng at gmail.com> wrote:
>> 2006/6/23, Guillaume POIRIER <poirierg at gmail.com>:
>> > So it looks like things could greatly improved on AMD64.
>> >
>>
>> In sr1.c:
>>
>> #ifdef ARCH_X86
>> #define CAN_COMPILE_X86_ASM
>> #endif
>>
>> may be changed to
>>
>> #if defined(ARCH_X86) || defined(ARCH_X86_64)
>> #define CAN_COMPILE_X86_ASM
>> #endif
>
>
> Yes, but smth similar needs to be done for the Makefile too:
>
> ifeq ($(TARGET_ARCH_X86),yes)
> SRCS += decode_i586.c
> OBJS += decode_i586.o
>
> ...
>
> I'm not a Makefile statements kings, so I need to read the docs of
> make to learn how to write a "or" statement.
>
> Guillaume
A temporary solution could be as follows:
Index: Makefile
===================================================================
--- Makefile (révision 18792)
+++ Makefile (copie de travail)
@@ -18,6 +18,14 @@
SRCS += dct36_k7.c dct64_k7.c
OBJS += dct36_k7.o dct64_k7.o
endif
+ifeq ($(TARGET_ARCH_X86_64),yes)
+SRCS += dct64_MMX.c
+OBJS += dct64_MMX.o
+SRCS += dct64_3dnow.c
+OBJS += dct64_3dnow.o
+SRCS += dct64_k7.c dct64_sse.c
+OBJS += dct64_k7.o dct64_sse.o
+endif
ifeq ($(TARGET_ARCH_POWERPC),yes)
ifeq ($(TARGET_ALTIVEC),yes)
SRCS += dct64_altivec.c
Note that with these changes, mp3lib _builds_ fine (I removed from the
makefile all the files that couldn't be build). I've not adressed the
issues with linking:
mp3lib/libMP3.a(sr1.o): In function `MP3_Init':sr1.c:(.text+0x1dbd):
undefined reference to `dct36_3dnowex'
:sr1.c:(.text+0x31f9): undefined reference to `synth_1to1_pent'
:sr1.c:(.text+0x321f): undefined reference to `dct36_3dnow'
:sr1.c:(.text+0x3258): undefined reference to `make_decode_tables_MMX'
mp3lib/libMP3.a(sr1.o): In function
`synth_1to1_MMX':sr1.c:(.text+0x3350): undefined reference to
`synth_1to1_MMX_s'
mp3lib/libMP3.a(dct64_MMX.o): In function
`dct64_MMX':dct64_MMX.c:(.text+0x36): undefined reference to `costab_mmx'
mp3lib/libMP3.a(dct64_3dnow.o): In function
`dct64_MMX_3dnow':dct64_3dnow.c:(.text+0x28): undefined reference to
`costab_mmx'
mp3lib/libMP3.a(dct64_k7.o): In function
`dct64_MMX_3dnowex':dct64_k7.c:(.text+0x28): undefined reference to
`costab_mmx'
mp3lib/libMP3.a(dct64_sse.o): In function
`dct64_sse':dct64_sse.c:(.text+0x3): undefined reference to `costab_mmx'
:dct64_sse.c:(.text+0x3a): undefined reference to `costab_mmx'
mp3lib/libMP3.a(dct64_sse.o):dct64_sse.c:(.text+0x72): more undefined
references to `costab_mmx' follow
collect2: ld returned 1 exit status
make: *** [mplayer] Erreur 1
I will do it this week-end
Guillaume
More information about the MPlayer-dev-eng
mailing list