Opened 4 years ago

Closed 4 years ago

#1107 closed defect (invalid)

Illegal instructions with ffmpeg on ARMv5tel CPU (Marvell SheevaPlug Reference Board)

Reported by: rydgaze Owned by:
Priority: normal Component: undetermined
Version: 0.9.1 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I have compiled the latest ffmpeg using the following configuration

--enable-libfaac --enable-libx264 --enable-nonfree --enable-gpl --enable-libmp3lame --extra-cflags=-I../x264 --extra-ldflags=-L../x264 --arch=armv5t --disable-armv6 --disable-armv6t2 --disable-neon

When I run ffmpeg to transcode a video to mp4, I see that the application fails with illegal instructions. The backtrace indicates armv7 instructions. I have the arch set to armv5te and
have used the disable options available and I still hit this issue.

Here is the GDB output
(gdb) r -i "video.mkv" -acodec libfaac -ac 2 -ab 160k -s 1080x720 -vcodec libx264 -fpre ./ffpresets/libx264-ipod640.ffpreset -b 1200k -f mp4 -threads 0 -y "video.mp4"
Starting program: /media/disk1part1/data/tmp_store/src/ffmpeg/ffmpeg_g -i "video.mkv" -acodec libfaac -ac 2 -ab 160k -s 1080x720 -vcodec libx264 -fpre ./ffpresets/libx264-ipod640.ffpreset -b 1200k -f mp4 -threads 0 -y "video.mp4"
[Thread debugging using libthread_db enabled]
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers

built on Mar 19 2012 22:21:00 with gcc 4.3.3
configuration: --enable-libfaac --enable-libx264 --enable-nonfree --enable-gpl --enable-libmp3lame --extra-cflags=-I../x264 --extra-ldflags=-L../x264 --arch=armv5t --disable-armv6 --disable-armv6t2 --disable-neon
libavutil 51. 42.100 / 51. 42.100
libavcodec 54. 10.100 / 54. 10.100
libavformat 54. 2.100 / 54. 2.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 64.101 / 2. 64.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100

Input #0, matroska,webm, from 'video.mkv':


creation_time : 2010-09-29 10:58:56

Duration: 00:04:34.50, start: 0.000000, bitrate: 6662 kb/s

Chapter #0.0: start 0.000000, end 274.500000

title : 01:32:27.000

Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x544 [SAR 1:1 DAR 40:17], 24 fps, 24 tbr, 1k tbn, 48 tbc

title : DDR

Stream #0:1(hin): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s

title : DDR

Stream #0:2(eng): Subtitle: text

title : DDR

Stream #0:3(ara): Subtitle: dvd_subtitle

title : DDR

Please use -b:a or -b:v, -b is ambiguous
[buffer @ 0x11055d0] w:1280 h:544 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 0x1111ec0] w:1280 h:544 fmt:yuv420p -> w:1080 h:720 fmt:yuv420p flags:0x4
[New Thread 0x402fe500 (LWP 32507)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x402fe500 (LWP 32507)]
0x0083bd9c in x264_cpu_neon_test ()
Current language: auto; currently asm
(gdb) bt
#0 0x0083bd9c in x264_cpu_neon_test ()
#1 0x007c49c0 in x264_cpu_detect ()
#2 0x00786a74 in x264_param_default ()
#3 0x004a92ec in X264_init (avctx=0xfd1c60) at libavcodec/libx264.c:281
#4 0x005f1868 in avcodec_open2 (avctx=0xfd1c60, codec=0x9a5ebc, options=0x10ccb88) at libavcodec/utils.c:911
#5 0x00010938 in transcode_init (output_files=0x2, nb_output_files=10116796, input_files=0xfd28b0, nb_input_files=1) at ffmpeg.c:2722
#6 0x00016d1c in transcode (output_files=0xfb7240, nb_output_files=1, input_files=0xfd28b0, nb_input_files=<value optimized out>) at ffmpeg.c:2851
#7 0x00018b60 in main (argc=<value optimized out>, argv=0xbedcf7a4) at ffmpeg.c:5185
(gdb) disass $pc-32,$pc+32
Dump of assembler code for function x264_cpu_enable_armv7_counter:
0x0083bda4 <x264_cpu_enable_armv7_counter+0>: mrc 15, 0, r2, cr9, cr12, {0}
0x0083bda8 <x264_cpu_enable_armv7_counter+4>: ands r0, r2, #1 ; 0x1
0x0083bdac <x264_cpu_enable_armv7_counter+8>: andne r0, r2, #9 ; 0x9
0x0083bdb0 <x264_cpu_enable_armv7_counter+12>: orr r2, r2, #1 ; 0x1
0x0083bdb4 <x264_cpu_enable_armv7_counter+16>: bic r2, r2, #8 ; 0x8
0x0083bdb8 <x264_cpu_enable_armv7_counter+20>: mcreq 15, 0, r2, cr9, cr12, {0}
0x0083bdbc <x264_cpu_enable_armv7_counter+24>: mov r2, #-2147483648 ; 0x80000000
0x0083bdc0 <x264_cpu_enable_armv7_counter+28>: mcr 15, 0, r2, cr9, cr12, {1}
0x0083bdc4 <x264_cpu_enable_armv7_counter+32>: bx lr
End of assembler dump.
(gdb) info all-registers
r0 0x0 0
r1 0x0 0
r2 0xe74e7c 15158908
r3 0x1 1
r4 0xe74d70 15158640
r5 0x0 0
r6 0x9a5ebc 10116796
r7 0x10ccb88 17615752
r8 0x10cc350 17613648
r9 0xdf0bac 14617516
r10 0xfd1c60 16587872
r11 0x10cc354 17613652
r12 0xe74da0 15158688
sp 0xbedccaf0 0xbedccaf0
lr 0x7c49c0 8145344
pc 0x83bd9c 0x83bd9c <x264_cpu_neon_test>
f0 0 (raw 0x000000000000000000000000)
f1 0 (raw 0x000000000000000000000000)
f2 0 (raw 0x000000000000000000000000)
f3 0 (raw 0x000000000000000000000000)
f4 0 (raw 0x000000000000000000000000)
f5 0 (raw 0x000000000000000000000000)
f6 0 (raw 0x000000000000000000000000)
f7 0 (raw 0x000000000000000000000000)
fps 0x0 0
cpsr 0x60000010 1610612752
(gdb) q

Am I doing something wrong? is there a specific setting I should be using?

The version I am using is: #define FFMPEG_VERSION "0.9.1.git"

Thanks in advance and regards

Change History (1)

comment:1 in reply to: ↑ description Changed 4 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Resolution set to invalid
  • Status changed from new to closed

Replying to rydgaze:

(gdb) bt
#0 0x0083bd9c in x264_cpu_neon_test ()
#1 0x007c49c0 in x264_cpu_detect ()
#2 0x00786a74 in x264_param_default ()
#3 0x004a92ec in X264_init (avctx=0xfd1c60) at libavcodec/libx264.c:281

This indicates that you did not find a bug in FFmpeg, but in x264 (or you did not compile x264 correctly).

Please reopen the ticket if you can also reproduce a crash without --enable-libx264.

Note: See TracTickets for help on using tickets.