Added neon optimization for the libpng Android build
authorSam Lantinga <slouken@libsdl.org>
Mon, 01 Oct 2018 20:27:51 -0700
changeset 594693d8aff87d8
parent 593 cec9b7594f75
child 595 ed8961044eba
Added neon optimization for the libpng Android build
external/libpng-1.6.32.patch
external/libpng-1.6.32/Android.mk
     1.1 --- a/external/libpng-1.6.32.patch	Fri Sep 28 21:01:43 2018 -0700
     1.2 +++ b/external/libpng-1.6.32.patch	Mon Oct 01 20:27:51 2018 -0700
     1.3 @@ -1,7 +1,7 @@
     1.4  diff -ruN libpng-1.6.32.orig/Android.mk libpng-1.6.32/Android.mk
     1.5  --- libpng-1.6.32.orig/Android.mk	1969-12-31 16:00:00.000000000 -0800
     1.6 -+++ libpng-1.6.32/Android.mk	2017-10-22 10:52:42.000000000 -0700
     1.7 -@@ -0,0 +1,28 @@
     1.8 ++++ libpng-1.6.32/Android.mk	2018-10-01 20:26:46.000000000 -0700
     1.9 +@@ -0,0 +1,37 @@
    1.10  +LOCAL_PATH:= $(call my-dir)
    1.11  +
    1.12  +include $(CLEAR_VARS)
    1.13 @@ -11,6 +11,15 @@
    1.14  +	pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c \
    1.15  +	pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
    1.16  +
    1.17 ++ifeq ($(TARGET_ARCH_ABI),armeabi)
    1.18 ++common_SRC_FILES += \
    1.19 ++	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
    1.20 ++endif
    1.21 ++ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
    1.22 ++common_SRC_FILES += \
    1.23 ++	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
    1.24 ++endif
    1.25 ++
    1.26  +common_CFLAGS := ## -fomit-frame-pointer
    1.27  +
    1.28  +common_C_INCLUDES += \
    1.29 @@ -32,7 +41,7 @@
    1.30  +
    1.31  diff -ruN libpng-1.6.32.orig/pnglibconf.h libpng-1.6.32/pnglibconf.h
    1.32  --- libpng-1.6.32.orig/pnglibconf.h	1969-12-31 16:00:00.000000000 -0800
    1.33 -+++ libpng-1.6.32/pnglibconf.h	2017-10-22 10:52:50.000000000 -0700
    1.34 ++++ libpng-1.6.32/pnglibconf.h	2018-10-01 20:26:26.000000000 -0700
    1.35  @@ -0,0 +1,217 @@
    1.36  +/* libpng 1.6.2 STANDARD API DEFINITION */
    1.37  +
     2.1 --- a/external/libpng-1.6.32/Android.mk	Fri Sep 28 21:01:43 2018 -0700
     2.2 +++ b/external/libpng-1.6.32/Android.mk	Mon Oct 01 20:27:51 2018 -0700
     2.3 @@ -7,6 +7,15 @@
     2.4  	pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c \
     2.5  	pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
     2.6  
     2.7 +ifeq ($(TARGET_ARCH_ABI),armeabi)
     2.8 +common_SRC_FILES += \
     2.9 +	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
    2.10 +endif
    2.11 +ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
    2.12 +common_SRC_FILES += \
    2.13 +	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
    2.14 +endif
    2.15 +
    2.16  common_CFLAGS := ## -fomit-frame-pointer
    2.17  
    2.18  common_C_INCLUDES += \