[FFmpeg-devel] can't build the ffmpeg for iOS using the newest gas-preprocessor.pl

2015-12-22 Thread zhuhb
I download the newest gas-preprocessor.pl from 
https://github.com/ffmpeg/gas-preprocessor and install it to the path.

Then I try to build the ffmpeg v2.7.1 and failed.

 

The build .sh is as follows:

SDKVERSION=""

MIN_IPHONE_VERSION="5.1"

 

ARCHS="armv7 arm64"

 

DEVELOPER=`xcode-select -print-path`

 

REPOROOT=$(pwd)

 

BUILDDIR="${REPOROOT}/build"

mkdir -p $BUILDDIR

 

# where we will store intermediary builds

INTERDIR="${BUILDDIR}/ios-all"

mkdir -p $INTERDIR

 

source ./ffmpeg-config-macro-all

FFMPEG_FLAGS="$FFMPEG_FLAGS_IOS"

for ARCH in ${ARCHS}

do

if [ "${ARCH}" == "i386" ];

then

PLATFORM="iPhoneSimulator"

EXTRA_CONFIG=" --arch=i386 --enable-cross-compile --target-os=darwin 
--cpu=i386 "

EXTRA_CFLAGS=" -arch i386 "

EXTRA_LDFLAGS="-arch i386 "

elif [ "${ARCH}" == "arm64" ];

then

PLATFORM="iPhoneOS"

EXTRA_CONFIG="--arch=arm64 --target-os=darwin --enable-cross-compile 
--disable-armv5te"

EXTRA_CFLAGS="-w -arch ${ARCH} -mfpu=neon"

EXTRA_LDFLAGS="-mfpu=neon"

else

PLATFORM="iPhoneOS"

EXTRA_CONFIG="--arch=arm --target-os=darwin --enable-cross-compile 
--cpu=cortex-a9 --disable-armv5te"

EXTRA_CFLAGS="-w -arch ${ARCH} -mfpu=neon"

EXTRA_LDFLAGS="-mfpu=neon"

fi

 

mkdir -p "${INTERDIR}/${ARCH}"

 

  if [ "${ARCH}" == "i386" ];

  then

./configure $FFMPEG_FLAGS --prefix="${INTERDIR}/${ARCH}" --disable-armv6 
--disable-armv6t2 --extra-cflags="${EXTRA_CFLAGS} -I $SOURCE/include/ios" 
--extra-ldflags="${EXTRA_LDFLAGS} -L $SOURCE/lib/ios" ${EXTRA_CONFIG} 
--enable-pic 
--extra-cflags="-I/Users/iqiyi/local/opencore-amr/ios/${ARCH}/include" 
--extra-ldflags="-L/Users/iqiyi/local/opencore-amr/ios/${ARCH}/lib" 
--extra-cflags="-fembed-bitcode"

  else

./configure $FFMPEG_FLAGS --prefix="${INTERDIR}/${ARCH}" --disable-armv6 
--disable-armv6t2 
--sysroot="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
 --cc="${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" 
--as='gas-preprocessor.pl 
/Applications/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
 --extra-cflags="${EXTRA_CFLAGS} -miphoneos-version-min=${MIN_IPHONE_VERSION} 
-I${OUTPUTDIR}/include -I $SOURCE/include/ios" --extra-ldflags="-arch ${ARCH} 
${EXTRA_LDFLAGS} -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk
 -miphoneos-version-min=${MIN_IPHONE_VERSION} -L${OUTPUTDIR}/lib -L 
$SOURCE/lib/ios" ${EXTRA_CONFIG} --enable-pic --extra-cxxflags="$CPPFLAGS 
-I${OUTPUTDIR}/include -isysroot 
${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
 --extra-cflags="-I/Users/iqiyi/local/opencore-amr/ios/${ARCH}/include" 
--extra-ldflags="-L/Users/iqiyi/local/opencore-amr/ios/${ARCH}/lib" 
--extra-cflags="-fembed-bitcode"

  fi

 

  make clean

  make && make install && make clean

 

done

 

UNIVERSAL_DIR=`pwd`/../ffmpeg_player/libs/all/ios && rm -rf ${UNIVERSAL_DIR}

mkdir -p "${UNIVERSAL_DIR}/lib"

 

cd "${INTERDIR}/armv7/lib"

for file in *.a

do

 

cd ${INTERDIR}

#xcrun -sdk iphoneos lipo -output ${UNIVERSAL_DIR}/lib/$file  -create -arch 
armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch arm64 arm64/lib/$file 
-arch i386 i386/lib/$file

xcrun -sdk iphoneos lipo -output ${UNIVERSAL_DIR}/lib/$file  -create -arch 
armv7 armv7/lib/$file -arch arm64 arm64/lib/$file

echo "Universal $file created."

 

done

cp -r ${INTERDIR}/armv7/include ${UNIVERSAL_DIR}/

 

echo "Done."

 

The error for arm32 build is:

./ffmpeg-ios-all.sh 

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1

install prefix
/Users/liuweiwei/player/ffmpeg/h265_decoder/build/ios-all/armv7

source path   .

C compiler
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

C library 

host C compiler   gcc

host C library

ARCH  arm (cortex-a9)

big-endianno

runtime cpu detection yes

ARMv5TE enabled   no

ARMv6 enabled no

ARMv6T2 enabled   no

VFP enabled   yes

NEON enabled  yes

THUMB enabled yes

debug symbols no

strip symbols yes

optimize for size yes

optimizations yes

staticyes

sharedno

postprocessing supportyes

new filter support   

Re: [FFmpeg-devel] can't build the ffmpeg for iOS using the newest gas-preprocessor.pl

2015-12-23 Thread zhuhb
 

aarch64 2.7.2+ build on osx should work with the options listed at:

 

http://fate.ffmpeg.org/report.cgi?time=20151221193018&slot=arm64-osx10.9-app
le-clang-n2.7

 

arm:

 

http://fate.ffmpeg.org/report.cgi?time=20151221184824&slot=arm-osx10.9-apple
-clang-n2.7

 

maybe you can figure out which differences cause the failure ?

Although I change my configuration according to the website, I can't fix the
following critical error:

Unable to identify target architecture at /usr/local/bin/gas-preprocessor.pl
line 82.

How can I fix the problem? What is the reason that the compilation/build
system can't find the target architecture in the gas-preprocessor.pl?

 

 

 

 

 

[...]

-- 

Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

 

You can kill me, but you cannot change the truth.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] arm neon float instruction crash the ffmpeg

2016-01-05 Thread zhuhb
I managed to compile/build the ffmpeg for the iOS arm32 version. But it crashed 
when I play bitstreams containing the aac and H.264 raw bitstreams.
I found that the neon float instruction is the reason, so I disable all neon 
float assembly code and the ffmpeg succeed to play the aac and H.264 bitstream.
What is the reason? How can I succeed to use the neon float instruction 
assembly code?

My configuration is as follows:
FFMPEG_FLAGS="$FFMPEG_FLAGS_IOS"
PLATFORM="iPhoneOS"
EXTRA_CONFIG="--cpu=cortex-a8 --enable-cross-compile --disable-debug 
--disable-programs  --disable-doc --arch=arm --target-os=darwin 
--disable-armv5te"
EXTRA_CFLAGS="-w -arch ${ARCH} -mfpu=neon -marm"
EXTRA_LDFLAGS="-mfpu=neon"

./configure $FFMPEG_FLAGS --prefix="${INTERDIR}/${ARCH}" 
--disable-armv6 --disable-armv6t2 
--sysroot="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
 --cc="${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" 
--as='gas-preprocessor.pl 
/Applications/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
 --extra-cflags="${EXTRA_CFLAGS} -miphoneos-version-min=${MIN_IPHONE_VERSION} 
-I${OUTPUTDIR}/include -I $SOURCE/include/ios" --extra-ldflags="-arch ${ARCH} 
${EXTRA_LDFLAGS} -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk
 -miphoneos-version-min=${MIN_IPHONE_VERSION} -L${OUTPUTDIR}/lib -L 
$SOURCE/lib/ios" ${EXTRA_CONFIG} --enable-pic --extra-cxxflags="$CPPFLAGS 
-I${OUTPUTDIR}/include -isysroot 
${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
 --extra-cflags="-I/Users/iqiyi/local/opencore-amr/ios/${ARCH}/include" 
--extra-ldflags="-L/Users/iqiyi/local/opencore-amr/ios/${ARCH}/lib" 
--extra-cflags="-fembed-bitcode"

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel