changeset 62:4bfc845cdfea libavcodec

arm optimizations
author glantau
date Mon, 13 Aug 2001 21:45:36 +0000
parents fefaa96def6e
children 8e2d8dbf89a5
files Makefile dsputil.c dsputil.h
diffstat 3 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Aug 13 21:38:25 2001 +0000
+++ b/Makefile	Mon Aug 13 21:45:36 2001 +0000
@@ -31,6 +31,12 @@
         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 @@
 %.o: %.c
 	$(CC) $(CFLAGS) -c -o $@ $< 
 
+%.o: %.S
+	$(CC) $(CFLAGS) -c -o $@ $<
+
 %.o: %.s
 	nasm -f elf -o $@ $<
 
@@ -59,6 +68,7 @@
 
 clean: 
 	rm -f *.o *~ *.a i386/*.o i386/*~ \
+	   armv4l/*.o armv4l/*~ \
            libac3/*.o libac3/*~ \
            mpglib/*.o mpglib/*~ \
            apiexample $(TESTS)
--- a/dsputil.c	Mon Aug 13 21:38:25 2001 +0000
+++ b/dsputil.c	Mon Aug 13 21:45:36 2001 +0000
@@ -450,4 +450,7 @@
 #ifdef HAVE_MMX
     dsputil_init_mmx();
 #endif
+#ifdef ARCH_ARMV4L
+    dsputil_init_armv4l();
+#endif
 }
--- a/dsputil.h	Mon Aug 13 21:38:25 2001 +0000
+++ b/dsputil.h	Mon Aug 13 21:45:36 2001 +0000
@@ -2,7 +2,6 @@
 #define DSPUTIL_H
 
 #include "common.h"
-#include <inttypes.h>
 
 /* dct code */
 typedef short DCTELEM;
@@ -75,7 +74,7 @@
 
 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 @@
 
 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()