Took a look at the x264 macIntel patch just now...
It patches against two files: x264/common/i386inc.asm and x264/common/predict-a.asm. The second one works still, the first one is rejected.
You know how I said in a post above that titer made a minor change to x264 for MacIntels a couple of weeks back? In the old version, line 44 of x264/common/i386/i386inc.asm was:
And now it's:
The patch is designed to comment out that line, forcing MacIntels to use:
By the way--the code's comments say "On OS X we cannot use .rodata because NASM is unable to compute address offsets outside of .text so we use the .text section instead until NASM is fixed." Yet using .rodata on OS X is exactly what the patch forces MacIntels into doing? Could titer's simple addition of "align=16" work instead?
I'm totally out of my league on this sort of stuff, so I'll assume the way the patch currently works is correct.
As such, the only change required to the patch for it to run on the new x264 is to add "align=16" to the end of line 8. Here's a paste of the revised patch:
Code: Select all
--- x264/common/i386/i386inc.asm 2006-09-23 14:01:05.000000000 -0400
+++ x264-patched/common/i386/i386inc.asm 2006-09-24 09:21:27.000000000 -0400
@@ -40,12 +40,12 @@
; is unable to compute address offsets outside of .text so we use the .text
; section instead until NASM is fixed.
%macro SECTION_RODATA 0
- %ifidn __OUTPUT_FORMAT__,macho
- SECTION .text align=16
- fakegot:
- %else
+; %ifidn __OUTPUT_FORMAT__,macho
+; SECTION .text align=16
+; fakegot:
+; %else
SECTION .rodata data align=16
- %endif
+; %endif
%endmacro
; PIC support macros. All these macros are totally harmless when __PIC__ is
--- x264/common/i386/predict-a.asm 2006-09-23 14:01:05.000000000 -0400
+++ x264-patched/common/i386/predict-a.asm 2006-09-24 09:21:27.000000000 -0400
@@ -191,7 +191,6 @@
%assign Y (Y-1)
movq [edx + Y*FDEC_STRIDE], mm1
- picpop ebx
ret
;-----------------------------------------------------------------------------
@@ -228,7 +227,6 @@
%assign Y (Y-1)
movq [edx + Y*FDEC_STRIDE], mm0
- picpop ebx
ret
;-----------------------------------------------------------------------------
@@ -269,8 +267,7 @@
%endrep
movq [edx + Y *FDEC_STRIDE], mm3
movq [edx + (Y+1)*FDEC_STRIDE], mm0
-
- picpop ebx
+
ret
;-----------------------------------------------------------------------------
While the patch successfully applies to the source, I have no Intel Macs and can't guarantee that it actually compiles, though I see no reason why it wouldn't.