Added support for building mpg123 on Android arm64-v8a
authorSam Lantinga <slouken@libsdl.org>
Fri, 01 Dec 2017 23:44:46 -0800
changeset 844929c90225030
parent 843 d98f1d930524
child 845 5fe3b562f4e2
Added support for building mpg123 on Android arm64-v8a
external/mpg123-1.25.6.patch
external/mpg123-1.25.6/Android.mk
     1.1 --- a/external/mpg123-1.25.6.patch	Sat Nov 04 22:45:35 2017 -0700
     1.2 +++ b/external/mpg123-1.25.6.patch	Fri Dec 01 23:44:46 2017 -0800
     1.3 @@ -1,6 +1,223 @@
     1.4 +diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
     1.5 +--- mpg123-1.25.6.orig/Android.mk	1969-12-31 16:00:00.000000000 -0800
     1.6 ++++ mpg123-1.25.6/Android.mk	2017-12-01 23:42:28.271963854 -0800
     1.7 +@@ -0,0 +1,213 @@
     1.8 ++LOCAL_PATH := $(call my-dir)
     1.9 ++
    1.10 ++include $(CLEAR_VARS)
    1.11 ++
    1.12 ++LOCAL_MODULE := libmpg123
    1.13 ++
    1.14 ++LOCAL_C_INCLUDES := $(LOCAL_PATH)/android \
    1.15 ++                    $(LOCAL_PATH)/src \
    1.16 ++                    $(LOCAL_PATH)/src/compat \
    1.17 ++                    $(LOCAL_PATH)/src/libmpg123 \
    1.18 ++
    1.19 ++DECODER_CFLAGS_NEON := -DOPT_NEON -DREAL_IS_FLOAT
    1.20 ++
    1.21 ++DECODER_SRC_NEON := \
    1.22 ++    src/libmpg123/stringbuf.c \
    1.23 ++    src/libmpg123/icy.c \
    1.24 ++    src/libmpg123/icy2utf8.c \
    1.25 ++    src/libmpg123/ntom.c \
    1.26 ++    src/libmpg123/synth.c \
    1.27 ++    src/libmpg123/synth_8bit.c \
    1.28 ++    src/libmpg123/layer1.c \
    1.29 ++    src/libmpg123/layer2.c \
    1.30 ++    src/libmpg123/layer3.c \
    1.31 ++    src/libmpg123/dct36_neon.S \
    1.32 ++    src/libmpg123/dct64_neon_float.S \
    1.33 ++    src/libmpg123/synth_neon_float.S \
    1.34 ++    src/libmpg123/synth_neon_s32.S \
    1.35 ++    src/libmpg123/synth_stereo_neon_float.S \
    1.36 ++    src/libmpg123/synth_stereo_neon_s32.S \
    1.37 ++    src/libmpg123/dct64_neon.S \
    1.38 ++    src/libmpg123/synth_neon.S \
    1.39 ++    src/libmpg123/synth_stereo_neon.S \
    1.40 ++    src/libmpg123/synth_s32.c \
    1.41 ++    src/libmpg123/synth_real.c \
    1.42 ++    src/libmpg123/feature.c \
    1.43 ++
    1.44 ++DECODER_CFLAGS_NEON64 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON64 -DREAL_IS_FLOAT
    1.45 ++
    1.46 ++DECODER_SRC_NEON64 := \
    1.47 ++    src/libmpg123/stringbuf.c \
    1.48 ++    src/libmpg123/icy.c \
    1.49 ++    src/libmpg123/icy2utf8.c \
    1.50 ++    src/libmpg123/ntom.c \
    1.51 ++    src/libmpg123/synth.c \
    1.52 ++    src/libmpg123/synth_8bit.c \
    1.53 ++    src/libmpg123/layer1.c \
    1.54 ++    src/libmpg123/layer2.c \
    1.55 ++    src/libmpg123/layer3.c \
    1.56 ++    src/libmpg123/dct36_neon64.S \
    1.57 ++    src/libmpg123/dct64_neon64_float.S \
    1.58 ++    src/libmpg123/synth_neon64_float.S \
    1.59 ++    src/libmpg123/synth_neon64_s32.S \
    1.60 ++    src/libmpg123/synth_stereo_neon64_float.S \
    1.61 ++    src/libmpg123/synth_stereo_neon64_s32.S \
    1.62 ++    src/libmpg123/dct64_neon64.S \
    1.63 ++    src/libmpg123/synth_neon64.S \
    1.64 ++    src/libmpg123/synth_stereo_neon64.S \
    1.65 ++    src/libmpg123/synth_s32.c \
    1.66 ++    src/libmpg123/synth_real.c \
    1.67 ++    src/libmpg123/dither.c \
    1.68 ++    src/libmpg123/getcpuflags_arm.c \
    1.69 ++    src/libmpg123/check_neon.S \
    1.70 ++    src/libmpg123/feature.c \
    1.71 ++
    1.72 ++DECODER_CFLAGS_X86 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT
    1.73 ++
    1.74 ++DECODER_SRC_X86 := \
    1.75 ++    src/libmpg123/stringbuf.c \
    1.76 ++    src/libmpg123/icy.c \
    1.77 ++    src/libmpg123/icy2utf8.c \
    1.78 ++    src/libmpg123/ntom.c \
    1.79 ++    src/libmpg123/synth.c \
    1.80 ++    src/libmpg123/synth_8bit.c \
    1.81 ++    src/libmpg123/layer1.c \
    1.82 ++    src/libmpg123/layer2.c \
    1.83 ++    src/libmpg123/layer3.c \
    1.84 ++    src/libmpg123/synth_s32.c \
    1.85 ++    src/libmpg123/synth_real.c \
    1.86 ++    src/libmpg123/dct64_i386.c \
    1.87 ++    src/libmpg123/synth_i586.S \
    1.88 ++    src/libmpg123/synth_i586_dither.S \
    1.89 ++    src/libmpg123/dct64_mmx.S \
    1.90 ++    src/libmpg123/tabinit_mmx.S \
    1.91 ++    src/libmpg123/synth_mmx.S \
    1.92 ++    src/libmpg123/synth_3dnow.S \
    1.93 ++    src/libmpg123/dct64_3dnow.S \
    1.94 ++    src/libmpg123/equalizer_3dnow.S \
    1.95 ++    src/libmpg123/dct36_3dnow.S \
    1.96 ++    src/libmpg123/dct64_3dnowext.S \
    1.97 ++    src/libmpg123/synth_3dnowext.S \
    1.98 ++    src/libmpg123/dct36_3dnowext.S \
    1.99 ++    src/libmpg123/dct64_sse_float.S \
   1.100 ++    src/libmpg123/synth_sse_float.S \
   1.101 ++    src/libmpg123/synth_stereo_sse_float.S \
   1.102 ++    src/libmpg123/synth_sse_s32.S \
   1.103 ++    src/libmpg123/synth_stereo_sse_s32.S \
   1.104 ++    src/libmpg123/dct36_sse.S \
   1.105 ++    src/libmpg123/dct64_sse.S \
   1.106 ++    src/libmpg123/synth_sse.S \
   1.107 ++    src/libmpg123/getcpuflags.S \
   1.108 ++    src/libmpg123/dither.c \
   1.109 ++    src/libmpg123/feature.c \
   1.110 ++
   1.111 ++DECODER_CFLAGS_X64 := -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DOPT_AVX
   1.112 ++
   1.113 ++DECODER_SRC_X64 := \
   1.114 ++    src/libmpg123/stringbuf.c \
   1.115 ++    src/libmpg123/icy.c \
   1.116 ++    src/libmpg123/icy.h \
   1.117 ++    src/libmpg123/icy2utf8.c \
   1.118 ++    src/libmpg123/icy2utf8.h \
   1.119 ++    src/libmpg123/ntom.c \
   1.120 ++    src/libmpg123/synth.c \
   1.121 ++    src/libmpg123/synth.h \
   1.122 ++    src/libmpg123/synth_8bit.c \
   1.123 ++    src/libmpg123/synth_8bit.h \
   1.124 ++    src/libmpg123/layer1.c \
   1.125 ++    src/libmpg123/layer2.c \
   1.126 ++    src/libmpg123/layer3.c \
   1.127 ++    src/libmpg123/synth_s32.c \
   1.128 ++    src/libmpg123/synth_real.c \
   1.129 ++    src/libmpg123/dct36_x86_64.S \
   1.130 ++    src/libmpg123/dct64_x86_64_float.S \
   1.131 ++    src/libmpg123/synth_x86_64_float.S \
   1.132 ++    src/libmpg123/synth_x86_64_s32.S \
   1.133 ++    src/libmpg123/synth_stereo_x86_64_float.S \
   1.134 ++    src/libmpg123/synth_stereo_x86_64_s32.S \
   1.135 ++    src/libmpg123/synth_x86_64.S \
   1.136 ++    src/libmpg123/dct64_x86_64.S \
   1.137 ++    src/libmpg123/synth_stereo_x86_64.S \
   1.138 ++    src/libmpg123/dither.c \
   1.139 ++    src/libmpg123/dither.h \
   1.140 ++    src/libmpg123/getcpuflags_x86_64.S \
   1.141 ++    src/libmpg123/dct36_avx.S \
   1.142 ++    src/libmpg123/dct64_avx_float.S \
   1.143 ++    src/libmpg123/synth_stereo_avx_float.S \
   1.144 ++    src/libmpg123/synth_stereo_avx_s32.S \
   1.145 ++    src/libmpg123/dct64_avx.S \
   1.146 ++    src/libmpg123/synth_stereo_avx.S \
   1.147 ++    src/libmpg123/feature.c
   1.148 ++
   1.149 ++DECODER_CFLAGS_MIPS := -DOPT_GENERIC -DREAL_IS_FLOAT
   1.150 ++
   1.151 ++DECODER_SRC_MIPS := \
   1.152 ++    src/libmpg123/stringbuf.c \
   1.153 ++    src/libmpg123/icy.c \
   1.154 ++    src/libmpg123/icy2utf8.c \
   1.155 ++    src/libmpg123/ntom.c \
   1.156 ++    src/libmpg123/synth.c \
   1.157 ++    src/libmpg123/synth_8bit.c \
   1.158 ++    src/libmpg123/layer1.c \
   1.159 ++    src/libmpg123/layer2.c \
   1.160 ++    src/libmpg123/layer3.c \
   1.161 ++    src/libmpg123/synth_s32.c \
   1.162 ++    src/libmpg123/synth_real.c \
   1.163 ++    src/libmpg123/feature.c
   1.164 ++
   1.165 ++ifeq ($(TARGET_ARCH_ABI),armeabi)
   1.166 ++DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
   1.167 ++DECODER_SRC := $(DECODER_SRC_NEON)
   1.168 ++endif
   1.169 ++ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
   1.170 ++DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
   1.171 ++DECODER_SRC := $(DECODER_SRC_NEON)
   1.172 ++endif
   1.173 ++ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
   1.174 ++DECODER_CFLAGS := $(DECODER_CFLAGS_NEON64)
   1.175 ++DECODER_SRC := $(DECODER_SRC_NEON64)
   1.176 ++endif
   1.177 ++ifeq ($(TARGET_ARCH_ABI),x86)
   1.178 ++DECODER_CFLAGS := $(DECODER_CFLAGS_X86)
   1.179 ++DECODER_SRC := $(DECODER_SRC_X86)
   1.180 ++endif
   1.181 ++ifeq ($(TARGET_ARCH_ABI),x86_64)
   1.182 ++DECODER_CFLAGS := $(DECODER_CFLAGS_X64)
   1.183 ++DECODER_SRC := $(DECODER_SRC_X64)
   1.184 ++endif
   1.185 ++ifeq ($(TARGET_ARCH_ABI),mips)
   1.186 ++DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
   1.187 ++DECODER_SRC := $(DECODER_SRC_MIPS)
   1.188 ++endif
   1.189 ++ifeq ($(TARGET_ARCH_ABI),mips64)
   1.190 ++DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
   1.191 ++DECODER_SRC := $(DECODER_SRC_MIPS)
   1.192 ++endif
   1.193 ++
   1.194 ++LOCAL_CFLAGS := $(DECODER_CFLAGS)
   1.195 ++
   1.196 ++# This disables the following warning:
   1.197 ++#   warning: shared library text segment is not shareable
   1.198 ++# However, the library still has PIC unaware assembly!
   1.199 ++LOCAL_DISABLE_FATAL_LINKER_WARNINGS = true
   1.200 ++
   1.201 ++LOCAL_SRC_FILES := \
   1.202 ++    src/libmpg123/parse.c \
   1.203 ++    src/libmpg123/frame.c \
   1.204 ++    src/libmpg123/format.c \
   1.205 ++    src/libmpg123/dct64.c \
   1.206 ++    src/libmpg123/equalizer.c \
   1.207 ++    src/libmpg123/id3.c \
   1.208 ++    src/libmpg123/optimize.c \
   1.209 ++    src/libmpg123/readers.c \
   1.210 ++    src/libmpg123/tabinit.c \
   1.211 ++    src/libmpg123/libmpg123.c \
   1.212 ++    src/libmpg123/index.c \
   1.213 ++    src/compat/compat_str.c \
   1.214 ++    src/compat/compat.c \
   1.215 ++    $(DECODER_SRC)
   1.216 ++
   1.217 ++
   1.218 ++LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
   1.219 ++
   1.220 ++include $(BUILD_SHARED_LIBRARY)
   1.221  diff -ruN mpg123-1.25.6.orig/android/config.h mpg123-1.25.6/android/config.h
   1.222  --- mpg123-1.25.6.orig/android/config.h	1969-12-31 16:00:00.000000000 -0800
   1.223 -+++ mpg123-1.25.6/android/config.h	2017-10-23 07:43:01.919907577 -0700
   1.224 ++++ mpg123-1.25.6/android/config.h	2017-12-01 23:42:00.031823819 -0800
   1.225  @@ -0,0 +1,478 @@
   1.226  +/* src/config.h.  Generated from config.h.in by configure.  */
   1.227  +/* src/config.h.in.  Generated from configure.ac by autoheader.  */
   1.228 @@ -482,7 +699,7 @@
   1.229  +/* #undef uintptr_t */
   1.230  diff -ruN mpg123-1.25.6.orig/android/mpg123.h mpg123-1.25.6/android/mpg123.h
   1.231  --- mpg123-1.25.6.orig/android/mpg123.h	1969-12-31 16:00:00.000000000 -0800
   1.232 -+++ mpg123-1.25.6/android/mpg123.h	2017-10-23 07:43:01.919907577 -0700
   1.233 ++++ mpg123-1.25.6/android/mpg123.h	2017-12-01 23:42:00.031823819 -0800
   1.234  @@ -0,0 +1,1441 @@
   1.235  +/*
   1.236  +	libmpg123: MPEG Audio Decoder library (version 1.25.6)
   1.237 @@ -1925,188 +2142,3 @@
   1.238  +#endif
   1.239  +
   1.240  +#endif
   1.241 -diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
   1.242 ---- mpg123-1.25.6.orig/Android.mk	1969-12-31 16:00:00.000000000 -0800
   1.243 -+++ mpg123-1.25.6/Android.mk	2017-11-04 22:43:44.473949961 -0700
   1.244 -@@ -0,0 +1,181 @@
   1.245 -+LOCAL_PATH := $(call my-dir)
   1.246 -+
   1.247 -+include $(CLEAR_VARS)
   1.248 -+
   1.249 -+LOCAL_MODULE := libmpg123
   1.250 -+
   1.251 -+LOCAL_C_INCLUDES := $(LOCAL_PATH)/android \
   1.252 -+                    $(LOCAL_PATH)/src \
   1.253 -+                    $(LOCAL_PATH)/src/compat \
   1.254 -+                    $(LOCAL_PATH)/src/libmpg123 \
   1.255 -+
   1.256 -+DECODER_CFLAGS_NEON := -DOPT_NEON -DREAL_IS_FLOAT
   1.257 -+
   1.258 -+DECODER_SRC_NEON := \
   1.259 -+    src/libmpg123/stringbuf.c \
   1.260 -+    src/libmpg123/icy.c \
   1.261 -+    src/libmpg123/icy2utf8.c \
   1.262 -+    src/libmpg123/ntom.c \
   1.263 -+    src/libmpg123/synth.c \
   1.264 -+    src/libmpg123/synth_8bit.c \
   1.265 -+    src/libmpg123/layer1.c \
   1.266 -+    src/libmpg123/layer2.c \
   1.267 -+    src/libmpg123/layer3.c \
   1.268 -+    src/libmpg123/dct36_neon.S \
   1.269 -+    src/libmpg123/dct64_neon_float.S \
   1.270 -+    src/libmpg123/synth_neon_float.S \
   1.271 -+    src/libmpg123/synth_neon_s32.S \
   1.272 -+    src/libmpg123/synth_stereo_neon_float.S \
   1.273 -+    src/libmpg123/synth_stereo_neon_s32.S \
   1.274 -+    src/libmpg123/dct64_neon.S \
   1.275 -+    src/libmpg123/synth_neon.S \
   1.276 -+    src/libmpg123/synth_stereo_neon.S \
   1.277 -+    src/libmpg123/synth_s32.c \
   1.278 -+    src/libmpg123/synth_real.c \
   1.279 -+    src/libmpg123/feature.c \
   1.280 -+
   1.281 -+DECODER_CFLAGS_X86 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT
   1.282 -+
   1.283 -+DECODER_SRC_X86 := \
   1.284 -+    src/libmpg123/stringbuf.c \
   1.285 -+    src/libmpg123/icy.c \
   1.286 -+    src/libmpg123/icy2utf8.c \
   1.287 -+    src/libmpg123/ntom.c \
   1.288 -+    src/libmpg123/synth.c \
   1.289 -+    src/libmpg123/synth_8bit.c \
   1.290 -+    src/libmpg123/layer1.c \
   1.291 -+    src/libmpg123/layer2.c \
   1.292 -+    src/libmpg123/layer3.c \
   1.293 -+    src/libmpg123/synth_s32.c \
   1.294 -+    src/libmpg123/synth_real.c \
   1.295 -+    src/libmpg123/dct64_i386.c \
   1.296 -+    src/libmpg123/synth_i586.S \
   1.297 -+    src/libmpg123/synth_i586_dither.S \
   1.298 -+    src/libmpg123/dct64_mmx.S \
   1.299 -+    src/libmpg123/tabinit_mmx.S \
   1.300 -+    src/libmpg123/synth_mmx.S \
   1.301 -+    src/libmpg123/synth_3dnow.S \
   1.302 -+    src/libmpg123/dct64_3dnow.S \
   1.303 -+    src/libmpg123/equalizer_3dnow.S \
   1.304 -+    src/libmpg123/dct36_3dnow.S \
   1.305 -+    src/libmpg123/dct64_3dnowext.S \
   1.306 -+    src/libmpg123/synth_3dnowext.S \
   1.307 -+    src/libmpg123/dct36_3dnowext.S \
   1.308 -+    src/libmpg123/dct64_sse_float.S \
   1.309 -+    src/libmpg123/synth_sse_float.S \
   1.310 -+    src/libmpg123/synth_stereo_sse_float.S \
   1.311 -+    src/libmpg123/synth_sse_s32.S \
   1.312 -+    src/libmpg123/synth_stereo_sse_s32.S \
   1.313 -+    src/libmpg123/dct36_sse.S \
   1.314 -+    src/libmpg123/dct64_sse.S \
   1.315 -+    src/libmpg123/synth_sse.S \
   1.316 -+    src/libmpg123/getcpuflags.S \
   1.317 -+    src/libmpg123/dither.c \
   1.318 -+    src/libmpg123/feature.c \
   1.319 -+
   1.320 -+DECODER_CFLAGS_X64 := -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DOPT_AVX
   1.321 -+
   1.322 -+DECODER_SRC_X64 := \
   1.323 -+    src/libmpg123/stringbuf.c \
   1.324 -+    src/libmpg123/icy.c \
   1.325 -+    src/libmpg123/icy.h \
   1.326 -+    src/libmpg123/icy2utf8.c \
   1.327 -+    src/libmpg123/icy2utf8.h \
   1.328 -+    src/libmpg123/ntom.c \
   1.329 -+    src/libmpg123/synth.c \
   1.330 -+    src/libmpg123/synth.h \
   1.331 -+    src/libmpg123/synth_8bit.c \
   1.332 -+    src/libmpg123/synth_8bit.h \
   1.333 -+    src/libmpg123/layer1.c \
   1.334 -+    src/libmpg123/layer2.c \
   1.335 -+    src/libmpg123/layer3.c \
   1.336 -+    src/libmpg123/synth_s32.c \
   1.337 -+    src/libmpg123/synth_real.c \
   1.338 -+    src/libmpg123/dct36_x86_64.S \
   1.339 -+    src/libmpg123/dct64_x86_64_float.S \
   1.340 -+    src/libmpg123/synth_x86_64_float.S \
   1.341 -+    src/libmpg123/synth_x86_64_s32.S \
   1.342 -+    src/libmpg123/synth_stereo_x86_64_float.S \
   1.343 -+    src/libmpg123/synth_stereo_x86_64_s32.S \
   1.344 -+    src/libmpg123/synth_x86_64.S \
   1.345 -+    src/libmpg123/dct64_x86_64.S \
   1.346 -+    src/libmpg123/synth_stereo_x86_64.S \
   1.347 -+    src/libmpg123/dither.c \
   1.348 -+    src/libmpg123/dither.h \
   1.349 -+    src/libmpg123/getcpuflags_x86_64.S \
   1.350 -+    src/libmpg123/dct36_avx.S \
   1.351 -+    src/libmpg123/dct64_avx_float.S \
   1.352 -+    src/libmpg123/synth_stereo_avx_float.S \
   1.353 -+    src/libmpg123/synth_stereo_avx_s32.S \
   1.354 -+    src/libmpg123/dct64_avx.S \
   1.355 -+    src/libmpg123/synth_stereo_avx.S \
   1.356 -+    src/libmpg123/feature.c
   1.357 -+
   1.358 -+DECODER_CFLAGS_MIPS := -DOPT_GENERIC -DREAL_IS_FLOAT
   1.359 -+
   1.360 -+DECODER_SRC_MIPS := \
   1.361 -+    src/libmpg123/stringbuf.c \
   1.362 -+    src/libmpg123/icy.c \
   1.363 -+    src/libmpg123/icy2utf8.c \
   1.364 -+    src/libmpg123/ntom.c \
   1.365 -+    src/libmpg123/synth.c \
   1.366 -+    src/libmpg123/synth_8bit.c \
   1.367 -+    src/libmpg123/layer1.c \
   1.368 -+    src/libmpg123/layer2.c \
   1.369 -+    src/libmpg123/layer3.c \
   1.370 -+    src/libmpg123/synth_s32.c \
   1.371 -+    src/libmpg123/synth_real.c \
   1.372 -+    src/libmpg123/feature.c
   1.373 -+
   1.374 -+ifeq ($(TARGET_ARCH_ABI),armeabi)
   1.375 -+DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
   1.376 -+DECODER_SRC := $(DECODER_SRC_NEON)
   1.377 -+endif
   1.378 -+ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
   1.379 -+DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
   1.380 -+DECODER_SRC := $(DECODER_SRC_NEON)
   1.381 -+endif
   1.382 -+ifeq ($(TARGET_ARCH_ABI),x86)
   1.383 -+DECODER_CFLAGS := $(DECODER_CFLAGS_X86)
   1.384 -+DECODER_SRC := $(DECODER_SRC_X86)
   1.385 -+endif
   1.386 -+ifeq ($(TARGET_ARCH_ABI),x86_64)
   1.387 -+DECODER_CFLAGS := $(DECODER_CFLAGS_X64)
   1.388 -+DECODER_SRC := $(DECODER_SRC_X64)
   1.389 -+endif
   1.390 -+ifeq ($(TARGET_ARCH_ABI),mips)
   1.391 -+DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
   1.392 -+DECODER_SRC := $(DECODER_SRC_MIPS)
   1.393 -+endif
   1.394 -+ifeq ($(TARGET_ARCH_ABI),mips64)
   1.395 -+DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
   1.396 -+DECODER_SRC := $(DECODER_SRC_MIPS)
   1.397 -+endif
   1.398 -+
   1.399 -+LOCAL_CFLAGS := $(DECODER_CFLAGS)
   1.400 -+
   1.401 -+# This disables the following warning:
   1.402 -+#   warning: shared library text segment is not shareable
   1.403 -+# However, the library still has PIC unaware assembly!
   1.404 -+LOCAL_DISABLE_FATAL_LINKER_WARNINGS = true
   1.405 -+
   1.406 -+LOCAL_SRC_FILES := \
   1.407 -+    src/libmpg123/parse.c \
   1.408 -+    src/libmpg123/frame.c \
   1.409 -+    src/libmpg123/format.c \
   1.410 -+    src/libmpg123/dct64.c \
   1.411 -+    src/libmpg123/equalizer.c \
   1.412 -+    src/libmpg123/id3.c \
   1.413 -+    src/libmpg123/optimize.c \
   1.414 -+    src/libmpg123/readers.c \
   1.415 -+    src/libmpg123/tabinit.c \
   1.416 -+    src/libmpg123/libmpg123.c \
   1.417 -+    src/libmpg123/index.c \
   1.418 -+    src/compat/compat_str.c \
   1.419 -+    src/compat/compat.c \
   1.420 -+    $(DECODER_SRC)
   1.421 -+
   1.422 -+
   1.423 -+LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
   1.424 -+
   1.425 -+include $(BUILD_SHARED_LIBRARY)
     2.1 --- a/external/mpg123-1.25.6/Android.mk	Sat Nov 04 22:45:35 2017 -0700
     2.2 +++ b/external/mpg123-1.25.6/Android.mk	Fri Dec 01 23:44:46 2017 -0800
     2.3 @@ -34,6 +34,34 @@
     2.4      src/libmpg123/synth_real.c \
     2.5      src/libmpg123/feature.c \
     2.6  
     2.7 +DECODER_CFLAGS_NEON64 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON64 -DREAL_IS_FLOAT
     2.8 +
     2.9 +DECODER_SRC_NEON64 := \
    2.10 +    src/libmpg123/stringbuf.c \
    2.11 +    src/libmpg123/icy.c \
    2.12 +    src/libmpg123/icy2utf8.c \
    2.13 +    src/libmpg123/ntom.c \
    2.14 +    src/libmpg123/synth.c \
    2.15 +    src/libmpg123/synth_8bit.c \
    2.16 +    src/libmpg123/layer1.c \
    2.17 +    src/libmpg123/layer2.c \
    2.18 +    src/libmpg123/layer3.c \
    2.19 +    src/libmpg123/dct36_neon64.S \
    2.20 +    src/libmpg123/dct64_neon64_float.S \
    2.21 +    src/libmpg123/synth_neon64_float.S \
    2.22 +    src/libmpg123/synth_neon64_s32.S \
    2.23 +    src/libmpg123/synth_stereo_neon64_float.S \
    2.24 +    src/libmpg123/synth_stereo_neon64_s32.S \
    2.25 +    src/libmpg123/dct64_neon64.S \
    2.26 +    src/libmpg123/synth_neon64.S \
    2.27 +    src/libmpg123/synth_stereo_neon64.S \
    2.28 +    src/libmpg123/synth_s32.c \
    2.29 +    src/libmpg123/synth_real.c \
    2.30 +    src/libmpg123/dither.c \
    2.31 +    src/libmpg123/getcpuflags_arm.c \
    2.32 +    src/libmpg123/check_neon.S \
    2.33 +    src/libmpg123/feature.c \
    2.34 +
    2.35  DECODER_CFLAGS_X86 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT
    2.36  
    2.37  DECODER_SRC_X86 := \
    2.38 @@ -135,6 +163,10 @@
    2.39  DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
    2.40  DECODER_SRC := $(DECODER_SRC_NEON)
    2.41  endif
    2.42 +ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
    2.43 +DECODER_CFLAGS := $(DECODER_CFLAGS_NEON64)
    2.44 +DECODER_SRC := $(DECODER_SRC_NEON64)
    2.45 +endif
    2.46  ifeq ($(TARGET_ARCH_ABI),x86)
    2.47  DECODER_CFLAGS := $(DECODER_CFLAGS_X86)
    2.48  DECODER_SRC := $(DECODER_SRC_X86)