[FFmpeg-devel] compile for arm cortex A8 with iOS SDK 5
Gerhard Roethlin
gerhard at disneyresearch.com
Tue Jan 17 08:59:34 CET 2012
I had similar problems
On 2012.01.09, at 21:08, gary wrote:
> iam using ffmpeg-HEAD-f247f4c with llvm-gcc.4.2 compiler.
>
> when i activate the ASM neon support iam hanging right now at some instructions.
>
> i tried a first fix in the libavutil.h
>
> intmath.h
>
> #define av_clipl_int32 av_clipl_int32_arm
> static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
> {
> int x, y;
> __asm__ (//"adds %1, %R2, %Q2, lsr #31 \n\t"
> "itet ne \n\t"
> "mvnne %1, #1<<31 \n\t"
> //"moveq %0, %Q2 \n\t"
> //"eorne %0, %1, %R2, asr #31 \n\t"
> : "=r"(x), "=&r"(y) : "r"(a):"cc");
> return x;
> }
My solution for that was to make the av_clip macro only get used with gcc 4.4 or newer
> now i have another problem in
> CC libavformat/asf.o
> CC libavformat/asfcrypt.o
> error: invalid operand in inline asm: 'ldr ${0:Q}, $1
> ldr ${0:R}, $2
> '
Maybe AV_RN64. I fixed both problems in the patch I submitted a month ago:
http://ffmpeg.org/pipermail/ffmpeg-devel/2011-December/117848.html
But it's not much of a fix, more just ignoring the problem.
> but i cant find the right ASM function for this problem.
>
> compiling line was:
> ./configure \
> --target-os=darwin \
> --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 \
> --as="gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2" \
> --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \
> --extra-cflags="-w -arch armv7 -mfpu=neon " \
> --extra-ldflags="-arch armv7 -mfpu=neon -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" \
> --arch=arm \
> --cpu=cortex-a8 \
> --extra-cflags='-arch armv7' \
> --extra-ldflags='-arch armv7' \
> --prefix=compiled/armv7 \
> --disable-ffmpeg \
> --disable-ffplay \
> --disable-ffprobe \
> --disable-ffserver \
> --disable-avdevice \
> --disable-bzlib \
> --disable-mmx \
> --disable-encoders \
> --enable-cross-compile \
> --enable-pic
> make
I use default values for cc, and a set of scripts for easier building:
https://github.com/cbreak-black/ffmpeg-ios-build
(It creates fat binaries for the simulator and the old/new iThings)
> Anyone can help me, maybe with paid support?
>
> gary
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Gerhard Röthlin
Tech Transfer & Git Mastery
More information about the ffmpeg-devel
mailing list