[Ffmpeg-devel] Illegal instruction in ff_fdct_sse2 () from libavcodec.so.51

Matthew Houliston lists
Mon Jul 17 04:15:32 CEST 2006


Hello,

First off, thanks to all who put their time and effort into ffmpeg - 
I've been using it for a while and it's a much appreciated tool.
Unfortunately, I'm getting systematic core dumps on one box (the 
production server, of course). Hope someone can help me out.



OS is FreeBSD (4.11 stable) on Xeon 3ghz
FFMPeg is the latest SVN checkout  :

FFmpeg version SVN-r5773, Copyright (c) 2000-2004 Fabrice Bellard
   configuration:  --enable-mp3lame --enable-gpl --enable-shared 
--enable-pp --enable-memalign-hack
   libavutil version: 49.0.0
   libavcodec version: 51.10.0
   libavformat version: 50.5.0
   built on Jul 17 2006 03:03:56, gcc: 2.95.4 20020320 [FreeBSD]
ffmpeg      SVN-r5773
libavutil   3211264
libavcodec  3344896
libavformat 3278080



Installation went ok once I'd put the Lame mp3 libraries in the right 
place. But I get core dumps when running the following (or indeed 
anything else) :

ffmpeg -i phpNWsTti.MOV -ar 22050 phpNWsTti.flv



Output is as follows:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'phpNWsTti.MOV':
   Duration: 00:00:10.8, start: 0.000000, bitrate: 2202 kb/s
   Stream #0.0(eng): Video: mpeg4, yuv420p, 640x480, 13.01 fps(r)
   Stream #0.1(eng): Audio: pcm_mulaw, 16000 Hz, mono, 128 kb/s
Output #0, flv, to 'phpNWsTti.flv':
   Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 13.01 
fps(c)
   Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
[flv @ 0x2843d9fc]removing common factors from framerate
Press [q] to stop encoding
Illegal instruction (core dumped)





gdb reports :


(gdb) r -i phpNWsTti.MOV -ar 22050 tmp.flv
Starting program: /usr/ports/devel/subversion/ffmpeg/ffmpeg_g -i 
phpNWsTti.MOV -ar 22050 tmp.flv
FFmpeg version SVN-r5773, Copyright (c) 2000-2004 Fabrice Bellard
   configuration:  --enable-mp3lame --enable-gpl --enable-shared 
--enable-pp --enable-memalign-hack
   libavutil version: 49.0.0
   libavcodec version: 51.10.0
   libavformat version: 50.5.0
   built on Jul 17 2006 03:03:56, gcc: 2.95.4 20020320 [FreeBSD]
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'phpNWsTti.MOV':
   Duration: 00:00:10.8, start: 0.000000, bitrate: 2202 kb/s
   Stream #0.0(eng): Video: mpeg4, yuv420p, 640x480, 13.01 fps(r)
   Stream #0.1(eng): Audio: pcm_mulaw, 16000 Hz, mono, 128 kb/s
Output #0, flv, to 'tmp.flv':
   Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 13.01 
fps(c)
   Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
[flv @ 0x2843d9fc]removing common factors from framerate
Press [q] to stop encoding

Program received signal SIGILL, Illegal instruction.
0x2825786f in ff_fdct_sse2 () from /usr/local/lib/libavcodec.so.51

(gdb) bt
#0  0x2825786f in ff_fdct_sse2 () from /usr/local/lib/libavcodec.so.51
#1  0x282c32b1 in prefetch_3dnow () from /usr/local/lib/libavcodec.so.51
#2  0x28164e8f in ff_h263_round_chroma () from 
/usr/local/lib/libavcodec.so.51
#3  0x28145b5f in ff_copy_bits () from /usr/local/lib/libavcodec.so.51
#4  0x281370ca in avcodec_default_execute ()
    from /usr/local/lib/libavcodec.so.51
#5  0x28146e6a in ff_copy_bits () from /usr/local/lib/libavcodec.so.51
#6  0x2813ef65 in MPV_encode_picture () from 
/usr/local/lib/libavcodec.so.51
#7  0x281372ea in avcodec_encode_video () from 
/usr/local/lib/libavcodec.so.51
#8  0x804bbe9 in do_video_out (s=0x8083010, ost=0x806d210, ist=0x8174090,
     in_picture=0xbfbff5f0, frame_size=0xbfbff49c) at ffmpeg.c:906
#9  0x804d018 in output_packet (ist=0x8174090, ist_index=0,
     ost_table=0x805b1f0, nb_ostreams=2, pkt=0xbfbff780) at ffmpeg.c:1296
#10 0x804f15f in av_encode (output_files=0x805a120, nb_output_files=1,
     input_files=0x805a020, nb_input_files=1, stream_maps=0x805a180,
     nb_stream_maps=0) at ffmpeg.c:2010
#11 0x8052471 in main (argc=6, argv=0xbfbffc70) at ffmpeg.c:4271

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x2825784f to 0x2825788f:
0x2825784f <ff_fdct_sse2+595>:  movq   %mm0,0x18(%ebx)
0x28257853 <ff_fdct_sse2+599>:  paddsw %mm4,%mm5
0x28257856 <ff_fdct_sse2+602>:  movq   %mm7,0x38(%ebx)
0x2825785a <ff_fdct_sse2+606>:  psubsw %mm1,%mm3
0x2825785d <ff_fdct_sse2+609>:  movq   %mm5,0x58(%ebx)
0x28257861 <ff_fdct_sse2+613>:  movq   %mm3,0x78(%ebx)
0x28257865 <ff_fdct_sse2+617>:  mov    $0x284406a0,%edx
0x2825786a <ff_fdct_sse2+622>:  mov    $0x28440680,%eax
0x2825786f <ff_fdct_sse2+627>:  movdqa (%eax),%xmm6
0x28257873 <ff_fdct_sse2+631>:  movq   0x0(%ebx),%xmm2
0x28257878 <ff_fdct_sse2+636>:  movq   0x8(%ebx),%xmm0
0x2825787d <ff_fdct_sse2+641>:  movdqa 0x20(%edx),%xmm3
0x28257882 <ff_fdct_sse2+646>:  movdqa 0x30(%edx),%xmm7
0x28257887 <ff_fdct_sse2+651>:  movdqa 0x0(%edx),%xmm4
0x2825788c <ff_fdct_sse2+656>:  movdqa 0x10(%edx),%xmm5
End of assembler dump.

(gdb) info all-registers
eax            0x28440680       675546752
ecx            0x8387010        137916432
edx            0x284406a0       675546784
ebx            0xbfbf5310       -1077980400
esp            0xbfbf52f8       0xbfbf52f8
ebp            0xbfbf5390       0xbfbf5390
esi            0x8387010        137916432
edi            0x0      0
eip            0x2825786f       0x2825786f
eflags         0x10296  66198
cs             0x1f     31
ss             0x2f     47
ds             0x2f     47
es             0x2f     47
fs             0x2f     47
gs             0x2f     47
(gdb)


How can I fix my libavcodec.so.51? Missing dependency perhaps? FWIW, I 
had similar problems with the FreeBSD port of ffmpeg, which is a very 
old build (0.4.9-pre1, 4718). I assumed it was the old build that was 
broken, but now I wonder if it's something specific to the system...

Grateful for any advice (it's been a long night ;))


best regards
Matthew




More information about the ffmpeg-devel mailing list