---
title: "linbpng 开启neon指令优化"
author: "HEXLee"
date: "2013-04-10T18:35:48Z"
tags: []
categories: ["移动开发"]
slug: "linbpng-neon"
draft: false
lastmod: "2013-04-10T18:35:48Z"
id: 1845319
url: "https://hexlee.iteye.com/blog/1845319"
---

libpng version: 1.6.1

Ref: http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/

\-----------------------------------------------------------------------------------------

 

export PLATFORM\_PREFIX=/tmp/opt/android-ext

 

\# armv5

export NDK\_PLATFORM=android-5

\# armv7

export NDK\_PLATFORM=android-8

\# x86

export NDK\_PLATFORM=android-9

 

\# arm5 armv7

$NDK\_ROOT/build/tools/make-standalone-toolchain.sh --platform=$NDK\_PLATFORM  --install-dir=$PLATFORM\_PREFIX

\# x86

$NDK\_ROOT/build/tools/make-standalone-toolchain.sh --platform=$NDK\_PLATFORM  --install-dir=$PLATFORM\_PREFIX --toolchain=x86-4.6

 

export PATH=$PLATFORM\_PREFIX/bin:$PATH

 

\# armv5 x86

./configure --host=arm-linux-androideabi --prefix=$PLATFORM\_PREFIX

\# armv7

./configure --host=arm-linux-androideabi --enable-arm-neon=on --prefix=$PLATFORM\_PREFIX 

Edit arm/filter\_neon.S(armv7 only): delete line 19-20, delete last line

 

make