Hello all,
I posted this initially to Gentoo forums, but after I managed to get a
gdb dump I thought I could post it here.
I have a little box (Epia M6000 with a small 600MHz cpu, basically an
i686 without cmov) that I updated recently after a year of doing nothing
with it. I changed from CHOST=i586 to i686 (that's what the gentoo wiki
suggests for these cpus). The update went fine it seems - no issues
except the one with mjpegtools.
I want to use a script which uses these commands:
png2yuv -n1 -f25 -It -L1 -v0 -j some.png | mpeg2enc -q 2 -a 2 -n p -f 8
-v 0 -o some.m2v
But it fails every time with "Illegal intruction". Here's what happens
when I do it manually:
png2yuv -n1 -f25 -It -L1 -j /usr/share/vdr/burn/sinlich-1.png |
mpeg2enc -q 2 -a 2 -n p -f 8 -o some.m2v
INFO: [png2yuv] Parsing & checking input files.
INFO: [mpeg2enc] SETTING MMX for MOTION!
INFO: [mpeg2enc] SETTING MMX for TRANSFORM!
INFO: [mpeg2enc] SETTING MMX for PREDICTION!
INFO: [png2yuv] Image dimensions are 720x576
INFO: [png2yuv] Movie frame rate is: 25.000000 frames/second
INFO: [png2yuv] Interlaced frames, top field first.
INFO: [png2yuv] Frame size: 720 x 576
INFO: [png2yuv] Now generating YUV4MPEG stream.
INFO: [mpeg2enc] Selecting DVD output profile
INFO: [mpeg2enc] Interlaced input - selecting interlaced encoding.
INFO: [mpeg2enc] Encoding MPEG-2 video to some.m2v
INFO: [mpeg2enc] Horizontal size: 720 pel
INFO: [mpeg2enc] Vertical size: 576 pel
INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display
INFO: [mpeg2enc] Frame rate code: 3 = 25.0 (PAL/SECAM VIDEO /
converted FILM)
INFO: [mpeg2enc] Bitrate: 7500 KBit/s
INFO: [mpeg2enc] Quality factor: 2 (Quantisation = 2) (1=best,
31=worst)
INFO: [mpeg2enc] Field order for input: top-field-first
INFO: [mpeg2enc] Sequence unlimited length
INFO: [mpeg2enc] Search radius: 16
INFO: [mpeg2enc] DualPrime: no
INFO: [mpeg2enc] Using one-pass rate controller
INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15
INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"
INFO: [mpeg2enc] Progressive format frames = 0
INFO: [mpeg2enc] Using default unmodified quantization matrices
INFO: [mpeg2enc] Buffering 33 frames
INFO: [mpeg2enc] Signaling last frame = 0
INFO: [mpeg2enc] SETTING MMX and MMX for QUANTIZER!
INFO: [mpeg2enc] NEW GOP INIT length 15
Illegal instruction
I use gcc-4.1.1, glibc-2.4 and the said cpu which features mmx, 3dnow
and no cmov. For the backtrace my cflags were "-march=c3 -pipe -Os
-m3dnow".
All this is happening on a Gentoo box:
Here's emerge --info:
Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1,
glibc-2.4-r4, 2.6.19.1 i686)
=================================================================
System uname: 2.6.19.1 i686 VIA Samuel 2
Gentoo Base System version 1.12.6
Last Sync: Sun, 31 Dec 2006 08:20:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: 2.4-r6
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=c3 -fomit-frame-pointer -pipe -m3dnow"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild
/etc/terminfo"
CXXFLAGS="-Os -march=c3 -fomit-frame-pointer -pipe -m3dnow"
DISTDIR="/video/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms
strict"
LANG="en_US"
LC_ALL="en_US"
LINGUAS="en"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --delete-after --stats
--timeout=180 --exclude='/distfiles' --exclude='/local'
--exclude='/packages'"
PORTAGE_TMPDIR="/video/portage-tmp"
PORTDIR="/video/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.informatik.rwth-aachen.de/gentoo-portage"
USE="3dnow elibc_glibc
kernel_linux linguas_en lirc_devices_serial logrotate mmx ncurses nptl
readline udev userland_GNU
x86 zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS
And here's the backtrace:
gdb mpeg2enc
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...Using host
libthread_db library "/lib/libthread_db.so.1".
(gdb) run -q 2 -a 2 -n p -f 8 -v 2 -o sinlich.m2v sinlich.yuv
Starting program: /usr/bin/mpeg2enc -q 2 -a 2 -n p -f 8 -v 2 -o
sinlich.m2v sinlich.yuv
[Thread debugging using libthread_db enabled]
[New Thread -1211328848 (LWP 6913)]
INFO: [mpeg2enc] SETTING MMX for MOTION!
INFO: [mpeg2enc] SETTING MMX for TRANSFORM!
INFO: [mpeg2enc] SETTING MMX for PREDICTION!
INFO: [mpeg2enc] Selecting DVD output profile
INFO: [mpeg2enc] Interlaced input - selecting interlaced encoding.
INFO: [mpeg2enc] Encoding MPEG-2 video to sinlich.m2v
INFO: [mpeg2enc] Horizontal size: 720 pel
INFO: [mpeg2enc] Vertical size: 576 pel
INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display
INFO: [mpeg2enc] Frame rate code: 3 = 25.0 (PAL/SECAM VIDEO /
converted FILM)
INFO: [mpeg2enc] Bitrate: 7500 KBit/s
INFO: [mpeg2enc] Quality factor: 2 (Quantisation = 2) (1=best,
31=worst)
INFO: [mpeg2enc] Field order for input: top-field-first
INFO: [mpeg2enc] Sequence unlimited length
INFO: [mpeg2enc] Search radius: 16
INFO: [mpeg2enc] DualPrime: no
INFO: [mpeg2enc] Using one-pass rate controller
INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15
INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"
INFO: [mpeg2enc] Progressive format frames = 0
INFO: [mpeg2enc] Using default unmodified quantization matrices
INFO: [mpeg2enc] Buffering 33 frames
--DEBUG: [mpeg2enc] End of input stream detected
INFO: [mpeg2enc] Signaling last frame = 0
INFO: [mpeg2enc] SETTING MMX and MMX for QUANTIZER!
--DEBUG: [mpeg2enc] Split len = 0
INFO: [mpeg2enc] NEW GOP INIT length 15
--DEBUG: [mpeg2enc] Start 0 I 0 0
--DEBUG: [mpeg2enc] FIRST GOP INIT
--DEBUG: [mpeg2enc] Frame I T=60907 A=562500 Xi=0.00 Xp=0.00 Xb=0.00
Program received signal SIGILL, Illegal instruction.
[Switching to Thread -1211328848 (LWP 6913)]
0xb7e0a528 in fmax () from /lib/libm.so.6
(gdb) bt
#0 0xb7e0a528 in fmax () from /lib/libm.so.6
#1 0xb7f2a1ec in OnTheFlyRateCtl::InitNewPict () from
/usr/lib/libmpeg2encpp-1.8.so.0
#2 0xb7f22ddd in Picture::InitRateControl () from
/usr/lib/libmpeg2encpp-1.8.so.0
#3 0xb7f239c9 in Picture::QuantiseAndEncode () from
/usr/lib/libmpeg2encpp-1.8.so.0
#4 0xb7f27348 in SeqEncoder::EncodePicture () from
/usr/lib/libmpeg2encpp-1.8.so.0
#5 0xb7f2756e in SeqEncoder::Pass1EncodeFrame () from
/usr/lib/libmpeg2encpp-1.8.so.0
#6 0xb7f276bc in SeqEncoder::EncodeStream () from
/usr/lib/libmpeg2encpp-1.8.so.0
#7 0x0804ac75 in main ()
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0xb7e0a508 to 0xb7e0a548:
0xb7e0a508 <__fpclassify+72>: add %al,(%eax)
0xb7e0a50a <__fpclassify+74>: pop %esi
0xb7e0a50b <__fpclassify+75>: pop %ebp
0xb7e0a50c <__fpclassify+76>: ret
0xb7e0a50d <__fpclassify+77>: mov $0x2,%eax
0xb7e0a512 <__fpclassify+82>: jmp 0xb7e0a4f1 <__fpclassify+49>
0xb7e0a514 <__fpclassify+84>: mov $0x3,%al
0xb7e0a516 <__fpclassify+86>: jmp 0xb7e0a4f1 <__fpclassify+49>
0xb7e0a518 <__fpclassify+88>: nop
0xb7e0a519 <__fpclassify+89>: nop
0xb7e0a51a <__fpclassify+90>: nop
0xb7e0a51b <__fpclassify+91>: nop
0xb7e0a51c <__fpclassify+92>: nop
0xb7e0a51d <__fpclassify+93>: nop
0xb7e0a51e <__fpclassify+94>: nop
0xb7e0a51f <__fpclassify+95>: nop
0xb7e0a520 <fmax+0>: fldl 0x4(%esp)
0xb7e0a524 <fmax+4>: fldl 0xc(%esp)
0xb7e0a528 <fmax+8>: fucomi %st(0),%st
0xb7e0a52a <fmax+10>: fcmovu %st(1),%st
0xb7e0a52c <fmax+12>: fxch %st(1)
0xb7e0a52e <fmax+14>: fucomi %st(1),%st
0xb7e0a530 <fmax+16>: fcmovb %st(1),%st
0xb7e0a532 <fmax+18>: fstp %st(1)
0xb7e0a534 <fmax+20>: ret
0xb7e0a535 <fmax+21>: nop
0xb7e0a536 <fmax+22>: nop
0xb7e0a537 <fmax+23>: nop
0xb7e0a538 <fmax+24>: nop
0xb7e0a539 <fmax+25>: nop
0xb7e0a53a <fmax+26>: nop
0xb7e0a53b <fmax+27>: nop
0xb7e0a53c <fmax+28>: nop
0xb7e0a53d <fmax+29>: nop
0xb7e0a53e <fmax+30>: nop
0xb7e0a53f <fmax+31>: nop
0xb7e0a540 <fmin+0>: fldl 0x4(%esp)
0xb7e0a544 <fmin+4>: fldl 0xc(%esp)
End of assembler dump.
(gdb) info all-registers
eax 0x2d 45
ecx 0x76f5d 487261
edx 0x0 0
ebx 0xb7f352ec -1208790292
esp 0xbf8f62a4 0xbf8f62a4
ebp 0xbf8f6310 0xbf8f6310
esi 0xbf8f65a0 -1081121376
edi 0x804f380 134542208
eip 0xb7e0a528 0xb7e0a528 <fmax+8>
eflags 0x210246 2163270
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 2 (raw 0x40008000000000000000)
st1 1.9999649999999999927524640952469781 (raw
0x3ffffffeda6612839000)
st2 -nan(0xe0c0000097b) (raw 0xffff00000e0c0000097b)
st3 -nan(0xffffffff0000ffff) (raw 0xffffffffffff0000ffff)
st4 -nan(0x6ca00000000) (raw 0xffff000006ca00000000)
st5 -nan(0xffff00000000) (raw 0xffff0000ffff00000000)
st6 -nan(0xfff8b80100031eed) (raw 0xfffffff8b80100031eed)
st7 0 (raw 0x00000000000000000000)
fctrl 0x37f 895
fstat 0x3120 12576
ftag 0xfff 4095
fiseg 0x73 115
fioff 0xb7e0a524 -1210014428
foseg 0x7b 123
fooff 0xbf8f62b0 -1081122128
fop 0x544 1348
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
---Type <return> to continue, or q <return> to quit---
xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0,
0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
mxcsr 0x1f80 8064
mm0 {uint64 = 0xfff8b80100031eed, v2_int32 = {0x31eed,
0xfff8b801}, v4_int16 = {0x1eed, 0x3, 0xb801, 0xfff8}, v8_int8 = {0xed,
0x1e, 0x3, 0x0,
0x1, 0xb8, 0xf8, 0xff}}
mm1 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0,
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm2 {uint64 = 0x8000000000000000, v2_int32 = {0x0,
0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x80}}
mm3 {uint64 = 0xfffeda6612839000, v2_int32 = {0x12839000,
0xfffeda66}, v4_int16 = {0x9000, 0x1283, 0xda66, 0xfffe}, v8_int8 =
{0x0, 0x90, 0x83,
0x12, 0x66, 0xda, 0xfe, 0xff}}
mm4 {uint64 = 0xe0c0000097b, v2_int32 = {0x97b, 0xe0c},
v4_int16 = {0x97b, 0x0, 0xe0c, 0x0}, v8_int8 = {0x7b, 0x9, 0x0, 0x0,
0xc, 0xe, 0x0, 0x0}}
mm5 {uint64 = 0xffffffff0000ffff, v2_int32 = {0xffff,
0xffffffff}, v4_int16 = {0xffff, 0x0, 0xffff, 0xffff}, v8_int8 = {0xff,
0xff, 0x0, 0x0,
0xff, 0xff, 0xff, 0xff}}
mm6 {uint64 = 0x6ca00000000, v2_int32 = {0x0, 0x6ca},
v4_int16 = {0x0, 0x0, 0x6ca, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0xca,
0x6, 0x0, 0x0}}
mm7 {uint64 = 0xffff00000000, v2_int32 = {0x0, 0xffff},
v4_int16 = {0x0, 0x0, 0xffff, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0xff,
0xff, 0x0, 0x0}}
(gdb)
Help is appreciated. I just hope it's not all my fault :-)
Regards
Sebastian
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mjpeg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users