Index: common/i386/mc-a.asm
===================================================================
--- common/i386/mc-a.asm	(revision 346)
+++ common/i386/mc-a.asm	(working copy)
@@ -46,22 +46,6 @@
 %endmacro
 
 ;=============================================================================
-; Constants
-;=============================================================================
-
-%ifdef FORMAT_COFF
-SECTION .rodata data
-%else
-SECTION .rodata data align=16
-%endif
-
-ALIGN 16
-pw_4:  times 4 dw  4
-pw_8:  times 4 dw  8
-pw_32: times 4 dw 32
-pw_64: times 4 dw 64
-
-;=============================================================================
 ; Code
 ;=============================================================================
 
@@ -589,3 +573,20 @@
 .finish
     pop     edi
     ret
+
+;=============================================================================
+; Constants
+;=============================================================================
+
+%ifdef FORMAT_COFF
+SECTION .rodata data
+%else
+SECTION .rodata data align=16
+%endif
+
+ALIGN 16
+pw_4:  times 4 dw  4
+pw_8:  times 4 dw  8
+pw_32: times 4 dw 32
+pw_64: times 4 dw 64
+
Index: common/i386/deblock-a.asm
===================================================================
--- common/i386/deblock-a.asm	(revision 346)
+++ common/i386/deblock-a.asm	(working copy)
@@ -31,11 +31,6 @@
     %endif
 %endmacro
 
-SECTION .rodata align=16
-pb_01: times 16 db 0x01
-pb_3f: times 16 db 0x3f
-pb_ff: times 16 db 0xff
-
 SECTION .text
 cglobal x264_deblock_v8_luma_mmxext
 cglobal x264_deblock_h_luma_mmxext
@@ -525,3 +520,11 @@
     pop  ebp
     CHROMA_END
 
+;=============================================================================
+; Local Data (Read Only)
+;=============================================================================
+SECTION .rodata align=16
+pb_01: times 16 db 0x01
+pb_3f: times 16 db 0x3f
+pb_ff: times 16 db 0xff
+
Index: common/i386/dct-a.asm
===================================================================
--- common/i386/dct-a.asm	(revision 346)
+++ common/i386/dct-a.asm	(working copy)
@@ -124,31 +124,6 @@
 %endmacro
 
 ;=============================================================================
-; Local Data (Read Only)
-;=============================================================================
-
-%ifdef FORMAT_COFF
-SECTION .rodata data
-%else
-SECTION .rodata data align=16
-%endif
-
-;-----------------------------------------------------------------------------
-; Various memory constants (trigonometric values or rounding values)
-;-----------------------------------------------------------------------------
-
-ALIGN 16
-x264_mmx_1:        dw  1,  1,  1,  1
-x264_mmx_32:       dw 32, 32, 32, 32
-x264_mmx_PPNN:     dw  1,  1, -1, -1
-x264_mmx_PNPN:     dw  1, -1,  1, -1 
-x264_mmx_PNNP:     dw  1, -1, -1,  1 
-x264_mmx_PPPN:     dw  1,  1,  1, -1 
-x264_mmx_PPNP:     dw  1,  1, -1,  1 
-x264_mmx_2121:     dw  2,  1,  2,  1 
-x264_mmx_p2n2p1p1: dw  2, -2,  1,  1
-
-;=============================================================================
 ; Code
 ;=============================================================================
 
@@ -729,3 +704,28 @@
     %endrep
     ret
 
+;=============================================================================
+; Local Data (Read Only)
+;=============================================================================
+
+%ifdef FORMAT_COFF
+SECTION .rodata data
+%else
+SECTION .rodata data align=16
+%endif
+
+;-----------------------------------------------------------------------------
+; Various memory constants (trigonometric values or rounding values)
+;-----------------------------------------------------------------------------
+
+ALIGN 16
+x264_mmx_1:        dw  1,  1,  1,  1
+x264_mmx_32:       dw 32, 32, 32, 32
+x264_mmx_PPNN:     dw  1,  1, -1, -1
+x264_mmx_PNPN:     dw  1, -1,  1, -1 
+x264_mmx_PNNP:     dw  1, -1, -1,  1 
+x264_mmx_PPPN:     dw  1,  1,  1, -1 
+x264_mmx_PPNP:     dw  1,  1, -1,  1 
+x264_mmx_2121:     dw  2,  1,  2,  1 
+x264_mmx_p2n2p1p1: dw  2, -2,  1,  1
+
Index: common/i386/pixel-sse2.asm
===================================================================
--- common/i386/pixel-sse2.asm	(revision 346)
+++ common/i386/pixel-sse2.asm	(working copy)
@@ -36,15 +36,6 @@
 %endmacro
 
 
-%ifdef FORMAT_COFF
-SECTION .rodata data
-%else
-SECTION .rodata data align=16
-%endif
-
-pd_0000ffff: times 4 dd 0x0000ffff
-
-
 SECTION .text
 
 
@@ -531,3 +522,15 @@
 
     SATD_END
 
+;=============================================================================
+; Local Data (Read Only)
+;=============================================================================
+%ifdef FORMAT_COFF
+SECTION .rodata data
+%else
+SECTION .rodata data align=16
+%endif
+
+pd_0000ffff: times 4 dd 0x0000ffff
+
+
Index: common/i386/mc-a2.asm
===================================================================
--- common/i386/mc-a2.asm	(revision 346)
+++ common/i386/mc-a2.asm	(working copy)
@@ -33,22 +33,6 @@
     %endif
 %endmacro
 
-;=============================================================================
-; Read only data
-;=============================================================================
-
-SECTION .rodata data align=16
-
-ALIGN 16
-mmx_dw_one:
-    times 4 dw 16
-mmx_dd_one:
-    times 2 dd 512
-mmx_dw_20:
-    times 4 dw 20
-mmx_dw_5:
-    times 4 dw -5
-
 %assign twidth  0
 %assign theight 4
 %assign tdstp1  8
@@ -374,3 +358,20 @@
     pop         edi
 
     ret
+
+;=============================================================================
+; Read only data
+;=============================================================================
+
+SECTION .rodata data align=16
+
+ALIGN 16
+mmx_dw_one:
+    times 4 dw 16
+mmx_dd_one:
+    times 2 dd 512
+mmx_dw_20:
+    times 4 dw 20
+mmx_dw_5:
+    times 4 dw -5
+
--- Makefile	(révision 380)
+++ Makefile	(copie de travail)
@@ -63,8 +63,8 @@
 default: $(DEP) x264$(EXE)
 
 libx264.a: .depend $(OBJS) $(OBJASM)
-	ar rc libx264.a $(OBJS) $(OBJASM)
-	ranlib libx264.a
+	$(AR) rc libx264.a $(OBJS) $(OBJASM)
+	$(RANLIB) libx264.a
 
 x264$(EXE): libx264.a x264.o matroska.o
 	$(CC) -o $@ x264.o matroska.o libx264.a $(LDFLAGS)
@@ -128,14 +128,14 @@
 distclean: clean
 	rm -f config.mak vfw/build/cygwin/config.mak x264.pc
 
-install: x264
+install: x264$(EXE)
 	install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
 	install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
 	install -m 644 x264.h $(DESTDIR)$(includedir)
 	install -m 644 libx264.a $(DESTDIR)$(libdir)
 	install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
-	install x264 $(DESTDIR)$(bindir)
-	ranlib $(DESTDIR)$(libdir)/libx264.a
+	install x264$(EXE) $(DESTDIR)$(bindir)
+	$(RANLIB) $(DESTDIR)$(libdir)/libx264.a
 
 uninstall:
 	rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
--- configure	(révision 385)
+++ configure	(copie de travail)
@@ -7,6 +7,7 @@
 echo "available options:"
 echo ""
 echo "  --help                   print this message"
+echo "  --crosscompile=ARCH      crosscompile for ARCH"
 echo "  --enable-avis-input      enables avisynth input (win32 only)"
 echo "  --enable-mp4-output      enables mp4 output (using gpac)"
 echo "  --enable-vfw             compiles the VfW frontend"
@@ -58,47 +59,138 @@
 
 EXE=""
 
-UNAMES="`uname -s`"
+AR="ar"
+AROPTS="rc"
+RANLIB="ranlib"
+
+UNAMES="`uname -s |tr A-Z a-z`"
+UNAMEM="`uname -m |tr A-Z a-z`"
+
+# parse options
+
+for opt do
+    optarg="${opt#*=}"
+    case "$opt" in
+	--crosscompile=*)
+	    CROSS="$optarg"
+	    CC="$CROSS-gcc"
+	    AR="$CROSS-ar"
+	    RANLIB="$CROSS-ranlib"
+	    UNAMES="`echo $CROSS | cut -d- -f2`"
+	    UNAMEM="`echo $CROSS | cut -d- -f1`"
+	    ;;
+	--prefix=*)
+	    prefix="$optarg"
+	    ;;
+	--exec-prefix=*)
+	    eprefix="$optarg"
+	    ;;
+	--bindir=*)
+	    bindir="$optarg"
+	    ;;
+	--libdir=*)
+	    libdir="$optarg"
+	    ;;
+	--includedir=*)
+	    includedir="$optarg"
+	    ;;
+        --enable-avis-input)
+            if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
+                CFLAGS="$CFLAGS -DAVIS_INPUT"
+                LDFLAGS="$LDFLAGS -lvfw32"
+                avis_input="yes"
+            fi
+            ;;
+        --enable-mp4-output)
+            CFLAGS="$CFLAGS -DMP4_OUTPUT"
+            LDFLAGS="$LDFLAGS -lgpac_static"
+            if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
+                LDFLAGS="$LDFLAGS -lwinmm"
+            fi
+            mp4_output="yes"
+            ;;
+        --extra-asflags=*)
+            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
+            ;;
+        --extra-cflags=*)
+            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
+            VFW_CFLAGS="${opt#--extra-cflags=}"
+            ;;
+        --extra-ldflags=*)
+            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
+            VFW_LDFLAGS="${opt#--extra-ldflags=}"
+            ;;
+        --enable-pthread)
+            CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
+            pthread="yes"
+            case $SYS in
+              MINGW|CYGWIN|BEOS)
+                ;;
+              *)
+                LDFLAGS="$LDFLAGS -lpthread"
+                ;;
+            esac
+            ;;
+        --enable-debug)
+            CFLAGS="$CFLAGS -g"
+            debug="yes"
+            ;;
+        --enable-gprof)
+            CFLAGS="$CFLAGS -pg"
+            LDFLAGS="$LDFLAGS -pg"
+            gprof="yes"
+            ;;
+        --enable-vfw)
+            vfw="yes"
+            ;;
+        --enable-visualize)
+            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+            CFLAGS="$CFLAGS -DVISUALIZE=1"
+            vis="yes"
+            ;;
+        *)
+            echo "Unknown option $opt, ignored"
+            ;;
+    esac
+done
+
+
 case "$UNAMES" in
-  BeOS)
+  beos)
     SYS="BEOS"
     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
     ;;
-  Darwin)
+  darwin)
     SYS="MACOSX"
     CFLAGS="$CFLAGS -falign-loops=16"
     LDFLAGS="$LDFLAGS -lm -lmx"
     ;;
-  FreeBSD)
+  freebsd)
     SYS="FREEBSD"
     LDFLAGS="$LDFLAGS -lm"
     ;;
-  NetBSD)
+  netbsd)
     SYS="NETBSD"
     LDFLAGS="$LDFLAGS -lm"
     ;;
-  Linux)
+  linux)
     SYS="LINUX"
     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
     LDFLAGS="$LDFLAGS -lm"
     ;;
-  CYGWIN*)
+  cygwin*)
     SYS="CYGWIN"
     CFLAGS="$CFLAGS -mno-cygwin"
     LDFLAGS="$LDFLAGS -mno-cygwin"
     ASFLAGS="-f win32 -DPREFIX"
     EXE=".exe"
-    DEVNULL="NUL"
-    vfw="yes"
     ;;
-  MINGW*)
+  mingw*)
     SYS="MINGW"
     ASFLAGS="-f win32 -DPREFIX"
     EXE=".exe"
-    DEVNULL="NUL"
-    vfw="yes"
     ;;
-  SunOS)
+  sunos)
     SYS="SunOS"
     CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
     LDFLAGS="$LDFLAGS -lm"
@@ -110,9 +202,8 @@
     ;;
 esac
 
-UNAMEM="`uname -m`"
 case "$UNAMEM" in
-  i386|i486|i586|i686|BePC)
+  i386|i486|i586|i686|bepc)
     ARCH="X86"
     CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
     ;;
@@ -122,7 +213,7 @@
     AS="yasm"
     ASFLAGS="-f elf -m amd64"
     ;;
-  "Power Macintosh"|ppc)
+  "power macintosh"|ppc)
     ARCH="PPC"
     if [ $SYS = MACOSX ]
     then
@@ -144,9 +235,6 @@
   ia64)
     ARCH="IA64"
     ;;
-  alpha)
-    ARCH="ALPHA"
-    ;;
   mips|mipsel)
     ARCH="MIPS"
     ;;
@@ -170,129 +258,6 @@
 
 CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
 
-# parse options
-
-for opt do
-    optarg="${opt#*=}"
-    case "$opt" in
-        --prefix=*)
-            prefix="$optarg"
-            ;;
-        --exec-prefix=*)
-            exec_prefix="$optarg"
-            ;;
-        --bindir=*)
-            bindir="$optarg"
-            ;;
-        --libdir=*)
-            libdir="$optarg"
-            ;;
-        --includedir=*)
-            includedir="$optarg"
-            ;;
-        --enable-avis-input)
-            avis_input="yes"
-            ;;
-        --disable-avis-input)
-            avis_input="no"
-            ;;
-        --enable-mp4-output)
-            mp4_output="yes"
-            ;;
-        --disable-mp4-output)
-            mp4_output="no"
-            ;;
-        --extra-asflags=*)
-            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
-            ;;
-        --extra-cflags=*)
-            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
-            VFW_CFLAGS="${opt#--extra-cflags=}"
-            ;;
-        --extra-ldflags=*)
-            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
-            VFW_LDFLAGS="${opt#--extra-ldflags=}"
-            ;;
-        --enable-pthread)
-            pthread="yes"
-            ;;
-        --disable-pthread)
-            pthread="no"
-            ;;
-        --enable-debug)
-            CFLAGS="$CFLAGS -g"
-            debug="yes"
-            ;;
-        --enable-gprof)
-            CFLAGS="$CFLAGS -pg"
-            LDFLAGS="$LDFLAGS -pg"
-            gprof="yes"
-            ;;
-        --enable-vfw)
-            vfw="yes"
-            ;;
-        --disable-vfw)
-            vfw="no"
-            ;;
-        --enable-visualize)
-            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-            CFLAGS="$CFLAGS -DVISUALIZE=1"
-            vis="yes"
-            ;;
-        *)
-            echo "Unknown option $opt, ignored"
-            ;;
-    esac
-done
-
-# autodetect options that weren't forced nor disabled
-
-if test "$pthread" = "auto" ; then
-    case $SYS in
-        MINGW|CYGWIN|BEOS)
-            pthread="yes"
-            ;;
-        *)
-            pthread="no"
-            cc_check pthread.h -lpthread && pthread="yes"
-            ;;
-    esac
-fi
-if test "$pthread" = "yes" ; then
-    CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
-    case $SYS in
-        MINGW|CYGWIN|BEOS)
-            ;;
-        *) LDFLAGS="$LDFLAGS -lpthread"
-            ;;
-    esac
-fi
-
-MP4_LDFLAGS="-lgpac_static"
-if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
-    MP4_LDFLAGS="$MP4_LDFLAGS -lwinmm"
-fi
-if [ "$mp4_output" = "auto" ] ; then
-    mp4_output="no"
-    cc_check gpac/isomedia.h "$MP4_LDFLAGS" && mp4_output="yes"
-fi
-if [ "$mp4_output" = "yes" ] ; then
-    CFLAGS="$CFLAGS -DMP4_OUTPUT"
-    LDFLAGS="$LDFLAGS $MP4_LDFLAGS"
-fi
-
-if [ "$avis_input" = "auto" ] ; then
-    if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
-        avis_input="yes"
-    else
-        avis_input="no";
-    fi
-fi
-if [ "$avis_input" = "yes" ] ; then
-    CFLAGS="$CFLAGS -DAVIS_INPUT"
-    LDFLAGS="$LDFLAGS -lvfw32"
-fi
-
 if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
     CFLAGS="$CFLAGS -s -fomit-frame-pointer"
     LDFLAGS="$LDFLAGS -s"
@@ -317,6 +282,9 @@
 ASFLAGS=$ASFLAGS
 VFW=$vfw
 EXE=$EXE
+AR=$AR
+AROPTS=$AROPTS
+RANLIB=$RANLIB
 VIS=$vis
 HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
 DEVNULL=$DEVNULL
