ffmpeg neon compilation on android - assembler errors
I am trying to compile ffmpeg for android with neon support , but I am getting following assembler errors. Please let me know if anybody has any clue about this?
/home/user1/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o.d.org -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -I/home/user1/workspace/FFMPEGFinal/jni/SDL/include -I/home/user1/workspace/FFMPEGFinal/jni -DANDROID -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DCMP_HAVE_NEON -DCMP_HAVE_VFP -fasm -Wa,--noexecstack -O2 -DNDEBUG -g -I/home/user1/android-ndk-r5b/platforms/android-8/arch-arm/usr/include -c /home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S -o /home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o && rm -f /home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o.d && mv /home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o.d.org /home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o.d
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S: Assembler messages:
开发者_开发百科/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:54: Error: bad instruction `vld1.32 {d0},[r0,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:55: Error: bad instruction `vld1.32 {d1},[r1,:64],r8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:56: Error: bad instruction `vld1.32 {d4},[r2,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:57: Error: bad instruction `vld1.32 {d5},[r3,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:58: Error: bad instruction `vmov.f32 d18,#0.5'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:59: Error: bad instruction `vdup.32 d19,r6'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:61: Error: selected processor does not support `veor d19,d18,d19'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:62: Error: bad instruction `vmov.i32 d16,#0'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:63: Error: bad instruction `vmov.i32 d17,#1<<31'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:65: Error: bad instruction `vtrn.32 d16,d17'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:67: Error: bad instruction `vrev64.32 d16,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:70: Error: selected processor does not support `veor q1,q0,q8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:71: Error: bad instruction `vld1.32 {d24},[r0,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:72: Error: bad instruction `vadd.f32 d0,d0,d3'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:73: Error: bad instruction `vld1.32 {d25},[r1,:64],r8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:74: Error: bad instruction `vadd.f32 d1,d2,d1'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:75: Error: selected processor does not support `veor q3,q12,q8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:77: Error: bad instruction `vmul.f32 q10,q0,q9'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:79: Error: bad instruction `vadd.f32 d0,d24,d7'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:80: Error: bad instruction `vadd.f32 d1,d6,d25'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:81: Error: bad instruction `vmul.f32 q11,q0,q9'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:82: Error: selected processor does not support `veor d7,d21,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:83: Error: bad instruction `vrev64.32 d3,d21'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:84: Error: selected processor does not support `veor d6,d20,d17'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:85: Error: selected processor does not support `veor d2,d3,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:86: Error: bad instruction `vmla.f32 d20,d3,d4[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:87: Error: bad instruction `vmla.f32 d20,d7,d5[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:88: Error: bad instruction `vmla.f32 d6,d2,d4[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:89: Error: bad instruction `vmla.f32 d6,d21,d5[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:90: Error: bad instruction `vld1.32 {d4},[r2,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:91: Error: selected processor does not support `veor d7,d23,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:92: Error: bad instruction `vld1.32 {d5},[r3,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:93: Error: selected processor does not support `veor d24,d22,d17'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:94: Error: bad instruction `vrev64.32 d3,d23'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:96: Error: selected processor does not support `veor d2,d3,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:98: Error: bad instruction `vmla.f32 d22,d3,d4[0]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:99: Error: bad instruction `vmla.f32 d22,d7,d5[0]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:100: Error: bad instruction `vmla.f32 d24,d2,d4[0]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:101: Error: bad instruction `vmla.f32 d24,d23,d5[0]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:102: Error: bad instruction `vld1.32 {d0},[r0,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:103: Error: bad instruction `vld1.32 {d1},[r1,:64],r8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:104: Error: bad instruction `vst1.32 {d20},[r7,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:105: Error: bad instruction `vst1.32 {d6},[lr,:64],r8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:106: Error: bad instruction `vst1.32 {d22},[r7,:64]!'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:107: Error: bad instruction `vst1.32 {d24},[lr,:64],r8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:111: Error: selected processor does not support `veor q1,q0,q8'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:112: Error: bad instruction `vadd.f32 d0,d0,d3'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:113: Error: bad instruction `vadd.f32 d1,d2,d1'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:115: Error: bad instruction `vmul.f32 q10,q0,q9'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:118: Error: bad instruction `vld1.32 {d0[0]},[r0,:32]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:119: Error: selected processor does not support `veor d7,d21,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:120: Error: bad instruction `vrev64.32 d3,d21'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:121: Error: selected processor does not support `veor d6,d20,d17'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:122: Error: bad instruction `vld1.32 {d22},[r5,:64]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:123: Error: bad instruction `vdup.32 d1,r2'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:124: Error: selected FPU does not support instruction -- `vmov d23,d22'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:125: Error: selected processor does not support `veor d2,d3,d16'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:126: Error: bad instruction `vtrn.32 d22,d23'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:127: Error: selected processor does not support `veor d0,d0,d1'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:128: Error: selected processor does not support `veor d23,d23,d17'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:129: Error: bad instruction `vmla.f32 d20,d3,d4[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:130: Error: bad instruction `vmla.f32 d20,d7,d5[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:131: Error: bad instruction `vmla.f32 d6,d2,d4[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:132: Error: bad instruction `vmla.f32 d6,d21,d5[1]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:133: Error: bad instruction `vadd.f32 d22,d22,d23'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:134: Error: bad instruction `vst1.32 {d20},[r7,:64]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:135: Error: bad instruction `vst1.32 {d6},[lr,:64]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:136: Error: bad instruction `vst1.32 {d0[0]},[r0,:32]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:137: Error: bad instruction `vst1.32 {d22},[r5,:64]'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:142: Error: bad instruction `vmul.f32 d22,d22,d18'
/home/user1/workspace/FFMPEGFinal/jni/libavcodec/arm/rdft_neon.S:143: Error: bad instruction `vst1.32 {d22},[r5,:64]'
make: *** [/home/user1/workspace/FFMPEGFinal/obj/local/armeabi-v7a/objs/ffmpeg/libavcodec/arm/rdft_neon.o] Error 1
Well the assembler obviously doesn't recognize those Neon-specific mnemonics.
According to http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html you need to compile with -mfpu=neon
. Try adding this line to your Android makefile:
CFLAGS += -mfpu=neon
You used something like this in your code-
`vld1.32 {d1},[r1,:64],r8'
Hence a command like -
"vld1.16 q1, [%4] ,%5 \n\t"
should work.(where %4 points to an array and %5 holds an integer value). However i get this error.
Error: Neon quad precision register expected -- `vld1.16 q1,[ip],r4'
精彩评论