diff --git a/libavcodec/Makefile b/libavcodec/Makefile index d2be0e760ce7a70b3a440cc3f8daa8f8e6e1f160..8738ddd32ab910acb3caab5c24a3c1bb7b39b489 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -31,6 +31,12 @@ OBJS += i386/fdctdata.o i386/cputest.o \ i386/idct_mmx.o endif +# armv4l specific stuff +ifeq ($(TARGET_ARCH_ARMV4L),yes) +ASM_OBJS += armv4l/jrevdct_arm.o +OBJS += armv4l/dsputil_arm.o +endif + SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) LIB= libavcodec.a @@ -48,6 +54,9 @@ dsputil.o: dsputil.c dsputil.h %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< +%.o: %.S + $(CC) $(CFLAGS) -c -o $@ $< + %.o: %.s nasm -f elf -o $@ $< @@ -59,6 +68,7 @@ depend: clean: rm -f *.o *~ *.a i386/*.o i386/*~ \ + armv4l/*.o armv4l/*~ \ libac3/*.o libac3/*~ \ mpglib/*.o mpglib/*~ \ apiexample $(TESTS) diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 4cb781a82dbc1cef3dc20ac29c2345c4326fd7ae..abbca19daa4541d2211b46ad593dd48b7428d802 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -450,4 +450,7 @@ void dsputil_init(void) #ifdef HAVE_MMX dsputil_init_mmx(); #endif +#ifdef ARCH_ARMV4L + dsputil_init_armv4l(); +#endif } diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index 14613adba281bb1873c103527f2e00858d28d273..80a934ccdbf742dbc7669f41b2eceafe140cfb9e 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -2,7 +2,6 @@ #define DSPUTIL_H #include "common.h" -#include <inttypes.h> /* dct code */ typedef short DCTELEM; @@ -75,7 +74,7 @@ static inline int block_permute_op(int j) void block_permute(INT16 *block); -#ifdef HAVE_MMX +#if defined(HAVE_MMX) #define MM_MMX 0x0001 /* standard MMX */ #define MM_3DNOW 0x0004 /* AMD 3DNOW */ @@ -102,6 +101,16 @@ static inline void emms(void) void dsputil_init_mmx(void); +#elif defined(ARCH_ARMV4L) + +#define emms_c() + +/* This is to use 4 bytes read to the IDCT pointers for some 'zero' + line ptimizations */ +#define __align8 __attribute__ ((aligned (4))) + +void dsputil_init_armv4l(void); + #else #define emms_c()