[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenDivX] Small patch for OpenDivX
Hi all,
As I am building OpenDivX on a non-X86 platform on Linux, I decided to
change a bit the Makefile in the Linux build section to support that. I also
used the new multi-platform capabilities to remove the 'bswapl' asm inline
code in the case of non-X86 platform.
I also wanted to remove the pow / log / ceil functions (it is VERY slow on a
non-FPU box), but it seems that somebody already beat me to it :-) So I just
removed the extraneous '#include <math.h>' files.
Feel free to comment and apply if it is correct :-)
Lionel (honing his StrongARM ASM skills :-) )
--
Lionel Ulmer - http://www.bbrox.org/
Index: decore/build/linux/Makefile
===================================================================
RCS file: /home/cvsroot/divxcore/decore/build/linux/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- decore/build/linux/Makefile 2001/05/15 17:07:25 1.2
+++ decore/build/linux/Makefile 2001/05/17 20:23:56
@@ -2,10 +2,20 @@
CC=gcc
#
-# Undefine this to build non-MMX version of library.
+# Supported plaftorms for now : X86 and STRONGARM
#
-HAS_MMX=1
+PLATFORM=X86
+ifeq ($(PLATFORM),X86)
+ # Undefine this to build non-MMX version of library.
+ CFLAGS_PLATFORM=-DX86
+ HAS_MMX=1
+endif
+ifeq ($(PLATFORM),STRONGARM)
+ CFLAGS_PLATFORM=-DSTRONGARM
+ HAX_MMX=0
+endif
+
SRCDIR=../../src
MMXDIR=../../src/mmx
@@ -27,7 +37,7 @@
$(SRCDIR)/yuv2rgb.c
endif
-CFLAGS=-g -fPIC -Wall -DLINUX -D_DECORE -I$(SRCDIR) $(CFLAGS_MMX)
+CFLAGS=-g -fPIC -Wall -DLINUX -D_DECORE -I$(SRCDIR) $(CFLAGS_MMX) $(CFLAGS_PLATFORM)
SOURCES=$(SRCDIR)/debug.c $(SRCDIR)/decore.c \
$(SRCDIR)/getbits.c $(SRCDIR)/mp4_block.c $(SRCDIR)/mp4_decoder.c \
Index: decore/src/getbits.h
===================================================================
RCS file: /home/cvsroot/divxcore/decore/src/getbits.h,v
retrieving revision 1.5
diff -u -r1.5 getbits.h
--- decore/src/getbits.h 2001/05/15 19:39:44 1.5
+++ decore/src/getbits.h 2001/05/17 20:24:37
@@ -35,7 +35,7 @@
void fillbfr (void);
/***/
-#if defined(LINUX)
+#if defined(LINUX) && defined(X86)
// 486+ specific instruction
// anybody want to use decore on 386?
#define _SWAP(a,b) b=*(int*)a; \
Index: decore/src/mp4_header.c
===================================================================
RCS file: /home/cvsroot/divxcore/decore/src/mp4_header.c,v
retrieving revision 1.17
diff -u -r1.17 mp4_header.c
--- decore/src/mp4_header.c 2001/05/17 18:19:52 1.17
+++ decore/src/mp4_header.c 2001/05/17 20:25:01
@@ -30,7 +30,6 @@
// mp4_header.c //
#include <stdlib.h>
-#include <math.h>
#include "mp4_vars.h"
Index: decore/src/mp4_predict.c
===================================================================
RCS file: /home/cvsroot/divxcore/decore/src/mp4_predict.c,v
retrieving revision 1.3
diff -u -r1.3 mp4_predict.c
--- decore/src/mp4_predict.c 2001/04/06 18:08:38 1.3
+++ decore/src/mp4_predict.c 2001/05/17 20:25:12
@@ -29,8 +29,6 @@
**/
// mp4_predict.c //
-#include <math.h>
-
#include "mp4_vars.h"
#include "mp4_predict.h"
Index: decore/src/mp4_block.c
===================================================================
RCS file: /home/cvsroot/divxcore/decore/src/mp4_block.c,v
retrieving revision 1.12
diff -u -r1.12 mp4_block.c
--- decore/src/mp4_block.c 2001/05/17 16:33:43 1.12
+++ decore/src/mp4_block.c 2001/05/17 20:25:33
@@ -29,7 +29,6 @@
**/
/// mp4_block.c //
-#include <math.h>
#include <stdlib.h>
#include <assert.h>
Index: decore/src/mp4_mblock.c
===================================================================
RCS file: /home/cvsroot/divxcore/decore/src/mp4_mblock.c,v
retrieving revision 1.9
diff -u -r1.9 mp4_mblock.c
--- decore/src/mp4_mblock.c 2001/04/13 01:33:22 1.9
+++ decore/src/mp4_mblock.c 2001/05/17 20:25:45
@@ -29,7 +29,6 @@
**/
// mp4_mblock.c //
-#include <math.h>
#include <assert.h>
#include "mp4_vars.h"
Reply To Poster
Local References / HOW-TO / FAQs