OSDN Git Service

arm optimizations
authorFabrice Bellard <fabrice@bellard.org>
Mon, 13 Aug 2001 21:45:36 +0000 (21:45 +0000)
committerFabrice Bellard <fabrice@bellard.org>
Mon, 13 Aug 2001 21:45:36 +0000 (21:45 +0000)
Originally committed as revision 82 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/Makefile
libavcodec/dsputil.c
libavcodec/dsputil.h

index d2be0e7..8738ddd 100644 (file)
@@ -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)
index 4cb781a..abbca19 100644 (file)
@@ -450,4 +450,7 @@ void dsputil_init(void)
 #ifdef HAVE_MMX
     dsputil_init_mmx();
 #endif
+#ifdef ARCH_ARMV4L
+    dsputil_init_armv4l();
+#endif
 }
index 14613ad..80a934c 100644 (file)
@@ -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()