[MPlayer-users] [BUGREPORT] mencoder libavcodec B-frames crash
Corey Hickey
bugfood-ml at fatooh.org
Wed Feb 5 01:25:26 CET 2003
Hello,
I've run into a problem with B-frame encoding in lavc. I searched the
archives, and found a couple threads similar to mine (especially this
one:
http://www.mplayerhq.hu/pipermail/mplayer-users/2003-January/026935.html
) but there didn't seem to have been any resolution yet.
So far, I can only reproducibly crash mencoder with one dvd-dump
(uploaded to the ftp server) and vmax_b_frames=1 in conjunction with
certain crop/scaling parameters. This command results in a segmentation
fault:
$ mencoder bframescrash.vob -vop scale=720:304,crop=720:359 -ovc lavc \
-lavcopts vcodec=mpeg4:vmax_b_frames=1 -nosound
... quite reliably at about a minute into the movie. I can change the
scaling/cropping values slightly and have mencoder still crash, but if I
change them too far mencoder doesn't crash.
Scroll down for system info and a gdb report.
Thanks,
Corey
################################################
The files (in ftp.mplayerhq.hu/MPlayer/incoming):
bframescrash.vob mplayer -dvd 1 -dumpstream, cut to first 5 megs
bframescrash.avi mencoder bframescrash.vob -vop \
scale=720:304,crop=720:359 -ovc lavc -lavcopts \
vcodec=mpeg4:vmax_b_frames=1 -nosound
bframescrash.txt the text of this email.
################################################
My system:
Debian Sarge
Linux bugfood 2.4.21-pre4 #1 Thu Jan 30 00:31:39 PST 2003 i686 AMD
Athlon(tm) AuthenticAMD GNU/Linux
bugfood at bugfood:~$ ls -l /lib/libc[.-]*
-rwxr-xr-x 1 root root 1145456 Sep 17 19:50 /lib/libc-2.2.5.so
lrwxrwxrwx 1 root root 14 Oct 4 03:52 /lib/libc.so.5
-> libc.so.5.4.46
-rw-r--r-- 1 root root 563068 Feb 4 2002 /lib/libc.so.5.4.46
lrwxrwxrwx 1 root root 13 Nov 6 18:00 /lib/libc.so.6
-> libc-2.2.5.so
bugfood at bugfood:~$ X -version
XFree86 Version 4.2.1 (Debian 4.2.1-3 20021016191246
branden at deadbeast.net) / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 3 September 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.18 i686 [ELF]
Module Loader present
bugfood at bugfood:/usr/local/src/mplayer$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
bugfood at bugfood:~$ ld -v
GNU ld version 2.13.90.0.10 20021010 Debian GNU/Linux
bugfood at bugfood:~$ as --version
GNU assembler 2.13.90.0.10 20021010 Debian GNU/Linux
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `i386-linux'.
bugfood at bugfood:~$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : AMD Athlon(tm)
stepping : 0
cpu MHz : 1875.377
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 3735.55
####################################################
bugfood at bugfood:/oliphaunt/enc$ gdb mencoder
gdb: Symbol `emacs_ctlx_keymap' has different size in shared object,
consider re-linking
GNU gdb 2002-04-01-cvs
Copyright 2002 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 "i386-linux"...(no debugging symbols found)...
(gdb) run -v bframescrash.vob -vop scale=720:304,crop=720:359 -ovc lavc
-lavcopts vcodec=mpeg4:vmax_b_frames=1 -nosound
Starting program: /usr/bin/mencoder -v bframescrash.vob -vop
scale=720:304,crop=720:359 -ovc lavc -lavcopts
vcodec=mpeg4:vmax_b_frames=1 -nosound
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...[New
Thread 1024 (LWP 9414)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale
MEncoder CVS-030204-12:28-2.95.4 (C) 2000-2003 Arpad Gereoffy (see DOCS)
CPU: Advanced Micro Devices (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/bugfood/.mplayer/codecs.conf: 50 audio & 130 video codecs
File not found: 'frameno.avi'
Reading config file /home/bugfood/.mplayer/mencoder: No such file or
directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 5242880 bytes
success: format: 0 data: 0x0 - 0x500000
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x83e62a8
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x83e62a8
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x83e62a8
Checking for REAL
DEMUXER: freeing demuxer at 0x83e62a8
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x83e62a8
Searching demuxer type for filename bframescrash.vob ext: .vob
Trying demuxer 2 based on filename extension
system stream synced at 0xD (0)!
==> Found video stream: 0
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO: MPEG2 720x480 (aspect 3) 29.97 fps 9375.0 kbps (1171.9 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x480 fps:29.97 ftime:=0.0334
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
Opening video filter: [scale=720:304]
SwScale params: 720 x 304 (-1=no scaling)
Opening video filter: [crop=720:359]
Crop: 720 x 359, -1 ; -1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred csp: Mpeg PES)
Trying filter chain: crop scale expand lavc
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale crop scale expand lavc
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder v2.0
libmpeg2: Using MMXEXT for IDCT transform
libmpeg2: Using MMXEXT for motion compensation
VDec: vo config request - 720 x 480 (preferred csp: Planar YV12)
Trying filter chain: crop scale expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (720x480->854x480,flags=0,'MPlayer',0x32315659)
REQ: flags=0x441 req=0x400
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 6 -> 5
SwScaler: reducing / aligning filtersize 6 -> 5
SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 720x359 -> 720x304
REQ: flags=0x401 req=0x0
REQ: flags=0x401 req=0x0
videocodec: libavcodec (720x304 fourcc=58564944 [DIVX])
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Writing AVI header...
*** [crop] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
*** [crop] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400
bytesms 0/2 D/B/S 0/1/0
*** [scale] Exporting mp_image_t, 720x359x12bpp YUV planar, 387720 bytes
*** [lavc] Allocating mp_image_t, 720x304x12bpp YUV planar, 328320 bytes
*** [expand] Direct Rendering mp_image_t, 720x304x12bpp YUV planar,
328320 bytes
get_path('subfont.ttf') -> '/home/bugfood/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
==> Found audio stream: 130 0fps Trem: 0min 1mb A-V:0.000 [0:0]
A/Vms 0/8 D/B/S 1/1/0
==> Found audio stream: 131
==> Found audio stream: 129
==> Found audio stream: 128
*** [crop] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400
bytesms 0/8 D/B/S 1/1/0
Pos: 0.5s 12f ( 1%) 0fps Trem: 0min 0mb A-V:0.000 [0:0]
A/Vms 0/9 D/B/S 3/1/0
demux_mpg: 3:2 TELECINE detected, enabling inverse telecine fx. FPS
changed to 23.976!
==> Found audio stream: 132 0fps Trem: 0min 0mb A-V:0.000 [28:0]
A/Vms 0/9 D/B/S 8/1/0
==> Found subtitle: 546%) 76fps Trem: 0min 0mb A-V:0.000 [589:0]
A/Vms 0/12 D/B/S 29/1/0
==> Found subtitle: 4
==> Found subtitle: 1
==> Found subtitle: 0
Pos: 6.0s 144f (76%) 66fps Trem: 0min 0mb A-V:0.000 [1006:0]
A/Vms 0/14 D/B/S 37/1/0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 9414)]
0x0822517b in rv10_encode_picture_header ()
(gdb) bt
#0 0x0822517b in rv10_encode_picture_header ()
#1 0x0822537e in rv10_encode_picture_header ()
#2 0x081d18ad in avcodec_set_bit_exact ()
#3 0x081e4aa6 in ff_estimate_b_frame_motion ()
#4 0x08187f8b in ff_copy_bits ()
#5 0x0817ab1b in MPV_encode_picture ()
#6 0x0817751c in avcodec_encode_video ()
#7 0x0809a958 in vf_open_encoder ()
#8 0x080afcd1 in vf_next_put_image ()
#9 0x080b0fe8 in vf_list_plugins ()
#10 0x080afcd1 in vf_next_put_image ()
#11 0x080b1c21 in revertPPOpt ()
#12 0x080afcd1 in vf_next_put_image ()
#13 0x080b0512 in vf_list_plugins ()
#14 0x080a21d0 in decode_video ()
#15 0x0807934d in main ()
#16 0x4040d0bf in __libc_start_main () from /lib/libc.so.6
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x822515b to 0x822519b:
0x822515b <rv10_encode_picture_header+21163>: pavgb %mm1,%mm0
0x822515e <rv10_encode_picture_header+21166>: pavgb %mm2,%mm1
0x8225161 <rv10_encode_picture_header+21169>: movq (%edi,%ecx,1),%mm3
0x8225165 <rv10_encode_picture_header+21173>: movq (%edi,%eax,1),%mm4
0x8225169 <rv10_encode_picture_header+21177>: pavgb %mm3,%mm0
0x822516c <rv10_encode_picture_header+21180>: pavgb %mm4,%mm1
0x822516f <rv10_encode_picture_header+21183>: movq %mm0,(%edi,%ecx,1)
0x8225173 <rv10_encode_picture_header+21187>: movq %mm1,(%edi,%eax,1)
0x8225177 <rv10_encode_picture_header+21191>: movq (%esi,%ecx,1),%mm1
0x822517b <rv10_encode_picture_header+21195>: movq (%esi,%eax,1),%mm0
0x822517f <rv10_encode_picture_header+21199>: pavgb %mm1,%mm2
0x8225182 <rv10_encode_picture_header+21202>: pavgb %mm0,%mm1
0x8225185 <rv10_encode_picture_header+21205>: add %eax,%edi
0x8225187 <rv10_encode_picture_header+21207>: add %eax,%esi
0x8225189 <rv10_encode_picture_header+21209>: movq (%edi,%ecx,1),%mm3
0x822518d <rv10_encode_picture_header+21213>: movq (%edi,%eax,1),%mm4
0x8225191 <rv10_encode_picture_header+21217>: pavgb %mm3,%mm2
0x8225194 <rv10_encode_picture_header+21220>: pavgb %mm4,%mm1
0x8225197 <rv10_encode_picture_header+21223>: movq %mm2,(%edi,%ecx,1)
End of assembler dump.
(gdb) info all-registers
eax 0x5e0 1504
ecx 0x2f0 752
edx 0x4 4
ebx 0x40efe1bd 1089462717
esp 0xbffe46e4 0xbffe46e4
ebp 0xbffe46ec 0xbffe46ec
esi 0x40f00add 1089473245
edi 0x8438eb0 138645168
eip 0x822517b 0x822517b
eflags 0x10206 66054
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x0 0
st0 -nan(0x21201f2021212120) (raw 0xffff21201f2021212120)
st1 -0e+4922 (raw 0xffff0000000000000000)
st2 -nan(0x191716181a191917) (raw 0xffff191716181a191917)
st3 -nan(0x2828282828282828) (raw 0xffff2828282828282828)
st4 -nan(0x2828282828282828) (raw 0xffff2828282828282828)
st5 -nan(0x2626262626262626) (raw 0xffff2626262626262626)
st6 -nan(0x101010101010101) (raw 0xffff0101010101010101)
st7 -0e+4922 (raw 0xffff0000000000000000)
fctrl 0x37f 895
fstat 0x120 288
ftag 0xaaaa 43690
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
xmm0 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm1 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm2 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm3 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm4 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm5 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm6 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
xmm7 {f = {0x0, 0x0, 0x0, 0x0}} {f = {-nan(0x7fffff),
-nan(0x7fffff), -nan(0x7fffff),
-nan(0x7fffff)}}
mxcsr 0x1f80 8064
orig_eax 0xffffffff -1
More information about the MPlayer-users
mailing list