From 952061c2c38a8f936832256165761b4225160dd4 Mon Sep 17 00:00:00 2001 From: Brett Goulder Date: Mon, 24 Mar 2008 18:47:52 -0400 Subject: [PATCH] libxvid: Add missing patch. --- libxvid/libxvid-1.1.3-nasm-compat.patch | 175 ++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 libxvid/libxvid-1.1.3-nasm-compat.patch diff --git a/libxvid/libxvid-1.1.3-nasm-compat.patch b/libxvid/libxvid-1.1.3-nasm-compat.patch new file mode 100644 index 000000000..bd1b41706 --- /dev/null +++ b/libxvid/libxvid-1.1.3-nasm-compat.patch @@ -0,0 +1,175 @@ +Index: src/dct/x86_asm/fdct_mmx_skal.asm +=================================================================== +RCS file: /xvid/xvidcore/src/dct/x86_asm/fdct_mmx_skal.asm,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -r1.6 -r1.7 +--- src/dct/x86_asm/fdct_mmx_skal.asm 29 Aug 2004 10:02:38 -0000 1.6 ++++ src/dct/x86_asm/fdct_mmx_skal.asm 11 Sep 2007 12:41:13 -0000 1.7 +@@ -378,9 +378,9 @@ + paddd mm2, mm3 ; [ out0 | out1 ] + pmaddwd mm7, mm1 ; [a0.M10+a1.M11 | b0.M26+b1.M27] + psrad mm2, 16 +- pmaddwd mm0, qword [%3 + 48] ; [a0.M12+a1.M13 | b0.M28+b1.M29] ++ pmaddwd mm0, [%3 + 48] ; [a0.M12+a1.M13 | b0.M28+b1.M29] + paddd mm4, mm5 ; [ out2 | out3 ] +- pmaddwd mm1, qword [%3 + 56] ; [a0.M14+a1.M15 | b0.M30+b1.M31] ++ pmaddwd mm1, [%3 + 56] ; [a0.M14+a1.M15 | b0.M30+b1.M31] + psrad mm4, 16 + + paddd mm6, mm7 ; [ out4 | out5 ] +@@ -436,9 +436,9 @@ + paddd mm2, mm3 ; [ out0 | out1 ] + pmaddwd mm7, mm1 ; [a0.M10+a1.M11 | b0.M26+b1.M27] + psrad mm2, 16 +- pmaddwd mm0, qword [%3 + 48] ; [a0.M12+a1.M13 | b0.M28+b1.M29] ++ pmaddwd mm0, [%3 + 48] ; [a0.M12+a1.M13 | b0.M28+b1.M29] + paddd mm4, mm5 ; [ out2 | out3 ] +- pmaddwd mm1, qword [%3 + 56] ; [a0.M14+a1.M15 | b0.M30+b1.M31] ++ pmaddwd mm1, [%3 + 56] ; [a0.M14+a1.M15 | b0.M30+b1.M31] + psrad mm4, 16 + + paddd mm6, mm7 ; [ out4 | out5 ] +Index: src/image/x86_asm/interpolate8x8_3dne.asm +=================================================================== +RCS file: /xvid/xvidcore/src/image/x86_asm/interpolate8x8_3dne.asm,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -r1.7 -r1.8 +--- src/image/x86_asm/interpolate8x8_3dne.asm 13 Sep 2005 12:12:15 -0000 1.7 ++++ src/image/x86_asm/interpolate8x8_3dne.asm 11 Sep 2007 12:41:13 -0000 1.8 +@@ -97,7 +97,13 @@ + %if (%1) + movq mm0, [eax] + %else +- movq mm0, [dword eax] ++ movq mm0, [eax+0] ++ ; --- ++ ; nasm >0.99.x rejects the original statement: ++ ; movq mm0, [dword eax] ++ ; as it is ambiguous. for this statement nasm <0.99.x would ++ ; generate "movq mm0,[eax+0]" ++ ; --- + %endif + pavgb mm0, [eax+1] + movq mm1, [eax+edx] +Index: src/motion/x86_asm/sad_3dne.asm +=================================================================== +RCS file: /xvid/xvidcore/src/motion/x86_asm/sad_3dne.asm,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -r1.6 -r1.7 +--- src/motion/x86_asm/sad_3dne.asm 29 Aug 2004 10:02:38 -0000 1.6 ++++ src/motion/x86_asm/sad_3dne.asm 11 Sep 2007 12:41:13 -0000 1.7 +@@ -180,7 +180,7 @@ + movq mm1, [eax+2*ecx+8] + psadbw mm3, mm4 + +- movq mm0, [dword eax+edx] ++ movq mm0, [eax+edx+0] + psadbw mm2, mm4 + add eax, edx + psadbw mm1, mm4 +Index: src/quant/x86_asm/quantize_h263_3dne.asm +=================================================================== +RCS file: /xvid/xvidcore/src/quant/x86_asm/quantize_h263_3dne.asm,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -r1.5 -r1.6 +--- src/quant/x86_asm/quantize_h263_3dne.asm 29 Aug 2004 10:02:38 -0000 1.5 ++++ src/quant/x86_asm/quantize_h263_3dne.asm 11 Sep 2007 12:41:13 -0000 1.6 +@@ -396,7 +396,7 @@ + + quant_intra1 3 + psubw mm5, mm4 ;C8 +- mov esi, [dword esp + 12] ; pop back the register value ++ mov esi, [esp + 12] ; pop back the register value + mov edi, [esp + 4] ; pop back the register value + sar eax, 16 + lea ebx, [byte eax + 1] ; workaround for eax < 0 +@@ -755,7 +755,7 @@ + pmaxsw mm2, mm3 ;|c| ;B4 (2nd) + pmullw mm2, [edi] ;*= 2Q ;B8 (3rd+) + psraw mm3, 15 ; sign(c) ;B7 (2nd) +- mov edx, [dword esp+ 4+12] ; data ++ mov edx, [esp+ 4+12] ; data + + ALIGN 8 + +Index: src/utils/x86_asm/mem_transfer_3dne.asm +=================================================================== +RCS file: /xvid/xvidcore/src/utils/x86_asm/mem_transfer_3dne.asm,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -r1.7 -r1.8 +--- src/utils/x86_asm/mem_transfer_3dne.asm 13 Sep 2005 12:12:15 -0000 1.7 ++++ src/utils/x86_asm/mem_transfer_3dne.asm 11 Sep 2007 12:41:13 -0000 1.8 +@@ -254,7 +254,7 @@ + mov eax, [esp + 8] ; Cur + mov ecx, [esp +12] ; Ref + push edi +- mov edx, [dword esp+4+16] ; Stride ++ mov edx, [esp+4+16] ; Stride + mov edi, [esp+4+ 4] ; Dst + pxor mm7, mm7 + nop +@@ -272,7 +272,7 @@ + mov eax, [esp + 8] ; Cur + mov ecx, [esp +12] ; Ref + push edi +- mov edx, [dword esp+4+16] ; Stride ++ mov edx, [esp+4+16] ; Stride + mov edi, [esp+4+ 4] ; Dst + pxor mm7, mm7 + nop +Index: build/generic/configure.in +=================================================================== +RCS file: /xvid/xvidcore/build/generic/configure.in,v +retrieving revision 1.22 +retrieving revision 1.23 +diff -u -r1.22 -r1.23 +--- build/generic/configure.in 21 Dec 2006 23:29:27 -0000 1.22 ++++ build/generic/configure.in 23 Nov 2007 10:44:11 -0000 1.23 +@@ -17,6 +17,8 @@ + + dnl NASM version requirement + minimum_nasm_patch_version=34 ++minimum_nasm_minor_version=99 ++minimum_nasm_major_version=2 + nasm_prog="nasm" + yasm_prog="yasm" + +@@ -364,14 +366,31 @@ + dnl + AC_MSG_CHECKING([for nasm patch version]) + nasm_patch=`$nasm_prog -r | cut -d '.' -f 3 | cut -d ' ' -f 1` ++ nasm_minor=`$nasm_prog -v | cut -d '.' -f 2 | cut -d ' ' -f 1` ++ nasm_major=`$nasm_prog -v | cut -d '.' -f 1 | cut -d ' ' -f 3` + if test -z $nasm_patch ; then + nasm_patch=-1 + fi ++ if test -z $nasm_minor ; then ++ nasm_minor=-1 ++ fi ++ if test -z $nasm_major ; then ++ nasm_major=-1 ++ fi + AC_MSG_RESULT([$nasm_patch]) + +- + if test "$nasm_patch" -lt "$minimum_nasm_patch_version" ; then +- AC_MSG_WARN([nasm patch version is too old]) ++ if test "$nasm_minor" -lt "$minimum_nasm_minor_version" ; then ++ if test "$nasm_major" -lt "$minimum_nasm_major_version" ; then ++ AC_MSG_WARN([nasm version is too old]) ++ else ++ found_nasm_comp_prog="yes" ++ chosen_asm_prog="$nasm_prog" ++ fi ++ else ++ found_nasm_comp_prog="yes" ++ chosen_asm_prog="$nasm_prog" ++ fi + else + found_nasm_comp_prog="yes" + chosen_asm_prog="$nasm_prog"