[Libav-user] android crash with armeabi-v7a + tegra3

Michael Zucchi notzed at gmail.com
Fri Jun 22 12:19:01 CEST 2012


Hi Carl,

On 22/06/12 17:24, Carl Eugen Hoyos wrote:
> Michael Zucchi<notzed at ...>  writes:
>
>> PS I tried compiling with no optimisation but the build
>> fails if i do that
>
> How? / Did you report this?

I didn't report it because I assumed it was a mistake my end or just an 
unsupported configuration.  I tried various things in the past but 
following this email I had another go to confirm the details.  The 
configure options are otherwise the same as in my previous email.

If I add:

  --disable-optimisations

So it looks like the FFmpeg build itself goes through (i'm only building 
the libs), but when linking to my code it fails with a  bunch of stuff 
like this:

/home/notzed/svn/jjmpeg-0.11/jjmpeg-android/obj/local/armeabi/libavcodec.a(h264dsp_init_arm.o): 
In function `ff_h264dsp_init_neon':
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/h264dsp_init_arm.c:99: 
undefined reference to `ff_h264_v_loop_filter_luma_neon'
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/h264dsp_init_arm.c:99: 
undefined reference to `ff_h264_h_loop_filter_luma_neon'
.. a bunch more in the same file
/home/notzed/svn/jjmpeg-0.11/jjmpeg-android/obj/local/armeabi-v7a/libavcodec.a(h264pred_init_arm.o): 
In function `ff_h264_pred_init_neon':
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/h264pred_init_arm.c:77: 
undefined reference to `ff_pred8x8_vert_neon'
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/h264pred_init_arm.c:77: 
undefined reference to `ff_pred8x8_hor_neon'
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/h264pred_init_arm.c:77: 
undefined reference to `ff_pred8x8_plane_neon'
.. and more in that file


> It may make sense to fix this to get more useful information
> about the crash.

Yeah, I thought as much.

> What about --disable-asm (--disable-neon if this is neon)?

If I also add to the above:
  --disable-asm

Then it builds and runs ok - but it doesn't crash either.  I didn't test 
it exhaustively - but I will leave it running for the next hour (the 
length of the video) in gdb and see how it goes (i got sidetracked and 
tried more stuff and it's still going after nearly an hour).  But this 
is close to the 'armeabi' config anyway which i've already found to be 
pretty stable.

If I change that to:
  --disable-neon

Then the FFmpeg build fails on the first file:

/usr/local/android-ndk-r7c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc 
-I. -I/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/ 
-D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_AV_CONFIG_H 
-I/usr/local/android-ndk-r7c/platforms/android-8/arch-arm//usr/include 
-mfloat-abi=softfp -mfpu=neon -marm -march=armv7-a 
--sysroot=/usr/local/android-ndk-r7c/platforms/android-8/arch-arm/ 
-std=c99 -fPIC -marm -g -Wdeclaration-after-statement -Wall 
-Wno-parentheses -Wno-switch -Wno-format-zero-length 
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls 
-Wno-pointer-sign -Wwrite-strings -Wtype-limits -Wundef 
-Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes 
-fno-math-errno -fno-signed-zeros -fno-tree-vectorize 
-Werror=implicit-function-declaration -Werror=missing-prototypes  -MMD 
-MF libavformat/4xm.d -MT libavformat/4xm.o -c -o libavformat/4xm.o 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavformat/4xm.c
In file included from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/intmath.h:36,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/common.h:102,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/avutil.h:327,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/samplefmt.h:22,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/avcodec.h:30,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavformat/avformat.h:197,
                  from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavformat/4xm.c:32:
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/arm/intmath.h: 
In function 'av_clip_uintp2_arm':
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/arm/intmath.h:82: 
warning: asm operand 2 probably doesn't match constraints
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavutil/arm/intmath.h:82: 
error: impossible constraint in 'asm'
make[1]: *** [libavformat/4xm.o] Error 1

If I comment out av_clip_uintp2_arm() in that function, then it compiles 
until it hits this:

In file included from 
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/dca.c:48:
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/dca.h: 
In function 'decode_blockcodes':
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/dca.h:36: 
error: can't find a register in class 'CORE_REGS' while reloading 'asm'
/home/notzed/svn/jjmpeg-0.11/jjmpeg-core/jni/ffmpeg-0.11/libavcodec/arm/dca.h:36: 
error: 'asm' operand has impossible constraints

If I comment out decode_blockcodes() it compiles the libraries ok.  But 
then it fails linking my library with all the missing *_neon functions 
as described in the first part of this mail.

I can log reports for this if that would help.

  Michael


More information about the Libav-user mailing list