[FFmpeg-devel] How to build FFmpeg to support NEON optimization in Android

lee dallas mswplandroid at gmail.com
Sat Mar 19 17:15:05 CET 2011


Hi all,

I've been trying to build FFmpeg to support NEON optimization for Android
for days without success.

Anyone has succeeded to build that? Would you please share the config.sh?

Here is mine:

#!/bin/bash

PREBUILT=/home/kenny/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0
PLATFORM=/home/kenn/android-ndk-r4b/build/platforms/android-8/arch-arm

./configure --target-os=linux \
    --disable-static \
    --enable-shared \
    --disable-doc \
    --arch=arm \
    --cpu=cortex-a8 \
    --disable-stripping \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-encoders \
    --disable-muxers \
    --disable-devices \
    --disable-avformat \
    --disable-swscale \
    --disable-filters \
    --disable-protocols \
    --disable-avfilter \
    --disable-network \
    --disable-mpegaudio-hp \
    --disable-avdevice \
    --enable-cross-compile \
    --cc=$PREBUILT/bin/arm-eabi-gcc \
    --cross-prefix=$PREBUILT/bin/arm-eabi- \
    --nm=$PREBUILT/bin/arm-eabi-nm \
    --extra-cflags="-fPIC -DANDROID -mfpu=neon -mfloat-abi=softfp" \
    --disable-armv5te \
    --disable-armv6 \
    --disable-armv6t2 \
    --disable-armvfp \
    --enable-neon \
    --extra-ldflags="-Wl,-T,$PREBUILT/arm-eabi/lib/ldscripts/armelf.x
-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib
$PREBUILT/lib/gcc/arm-eabi/4.4.0/crtbegin.o
$PREBUILT/lib/gcc/arm-eabi/4.4.0/crtend.o -lc -lm -ldl"


BR,
kenny



More information about the ffmpeg-devel mailing list