[vlc-devel] [PATCH 1/3] contrib/png: fix ARM assembly for iOS

Felix Paul Kühne fkuehne at videolan.org
Wed Jan 22 14:16:44 CET 2014


From: Felix Paul Kühne <fkuehne at videolan.org>

---
 contrib/src/png/ios.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++
 contrib/src/png/rules.mak | 14 +++++++++-
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 contrib/src/png/ios.patch

diff --git a/contrib/src/png/ios.patch b/contrib/src/png/ios.patch
new file mode 100644
index 0000000..f4b8bc1
--- /dev/null
+++ b/contrib/src/png/ios.patch
@@ -0,0 +1,66 @@
+diff -ru png/arm/filter_neon.S png-fixed/arm/filter_neon.S
+--- png/arm/filter_neon.S	2013-06-27 05:25:41.000000000 +0200
++++ png-fixed/arm/filter_neon.S	2013-07-20 23:33:23.000000000 +0200
+@@ -46,7 +46,7 @@
+ \name:
+ .endm
+ 
+-func    png_read_filter_row_sub4_neon, export=1
++func    _png_read_filter_row_sub4_neon, export=1
+         ldr             r3,  [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
+ 1:
+@@ -62,7 +62,7 @@
+         bx              lr
+ endfunc
+ 
+-func    png_read_filter_row_sub3_neon, export=1
++func    _png_read_filter_row_sub3_neon, export=1
+         ldr             r3,  [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
+         mov             r0,  r1
+@@ -88,7 +88,7 @@
+         bx              lr
+ endfunc
+ 
+-func    png_read_filter_row_up_neon, export=1
++func    _png_read_filter_row_up_neon, export=1
+         ldr             r3,  [r0, #4]           @ rowbytes
+ 1:
+         vld1.8          {q0}, [r1,:128]
+@@ -101,7 +101,7 @@
+         bx              lr
+ endfunc
+ 
+-func    png_read_filter_row_avg4_neon, export=1
++func    _png_read_filter_row_avg4_neon, export=1
+         ldr             r12, [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
+ 1:
+@@ -122,7 +122,7 @@
+         bx              lr
+ endfunc
+ 
+-func    png_read_filter_row_avg3_neon, export=1
++func    _png_read_filter_row_avg3_neon, export=1
+         push            {r4,lr}
+         ldr             r12, [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
+@@ -173,7 +173,7 @@
+         vbsl            \rx, \ra, d28
+ .endm
+ 
+-func    png_read_filter_row_paeth4_neon, export=1
++func    _png_read_filter_row_paeth4_neon, export=1
+         ldr             r12, [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
+         vmov.i8         d20, #0
+@@ -196,7 +196,7 @@
+         bx              lr
+ endfunc
+ 
+-func    png_read_filter_row_paeth3_neon, export=1
++func    _png_read_filter_row_paeth3_neon, export=1
+         push            {r4,lr}
+         ldr             r12, [r0, #4]           @ rowbytes
+         vmov.i8         d3,  #0
diff --git a/contrib/src/png/rules.mak b/contrib/src/png/rules.mak
index d1adc34..4f12595 100644
--- a/contrib/src/png/rules.mak
+++ b/contrib/src/png/rules.mak
@@ -7,6 +7,15 @@ ifeq ($(call need_pkg,"libpng"),)
 PKGS_FOUND += png
 endif
 
+PNGCONF =
+ifdef HAVE_IOS
+ifdef HAVE_ARMV7A
+PNGCONF = --enable-arm-neon=yes
+else
+PNGCONF = --enable-arm-neon=no
+endif
+endif
+
 $(TARBALLS)/libpng-$(PNG_VERSION).tar.xz:
 	$(call download,$(PNG_URL))
 
@@ -17,12 +26,15 @@ png: libpng-$(PNG_VERSION).tar.xz .sum-png
 	$(APPLY) $(SRC)/png/winrt.patch
 	$(APPLY) $(SRC)/png/bins.patch
 	$(APPLY) $(SRC)/png/automake.patch
+ifdef HAVE_IOS
+	$(APPLY) $(SRC)/png/ios.patch
+endif
 	$(MOVE)
 
 DEPS_png = zlib $(DEPS_zlib)
 
 .png: png
 	$(RECONF)
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(PNGCONF)
 	cd $< && $(MAKE) install
 	touch $@
-- 
1.8.3.4 (Apple Git-47)




More information about the vlc-devel mailing list