Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#140 closed defect (fixed)

MPEG2 YUV4:2:2 file not playing correctly

Reported by: jason.geng@… Owned by: r_togni@…
Priority: normal Component: vd
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

Hello,

I am experiencing some problems with mplayer when playing
some MPEG2 files of yuv 422 format. For MPlayer-1.0pre5, the
video output is full of random color blocks . For the current CVS
build, there will be a segmentation fault when decoding.

I have tested the current CVS build on two x86 and a PowerPC
machine. The problem seems same.

My command line is "./mplayer test422.m2v". When added "-vc ffmpeg12",
mplayers plays the sample well, but with more CPU usage.

Following is the detailed information about the problem. I have upload
the first 5M of the test file to
ftp://mplayerhq.hu/MPlayer/incoming/test422.m2v

system information *
OS:
Redhat 9.0

uname -a:
Linux server 2.4.20-8 #1 Thu Mar 13 17:18:24 EST 2003 i686 athlon i386 GNU/Linux

ls -l /lib/libc[.-]*:
-rwxr-xr-x 1 root root 1549556 Mar 14 2003 /lib/libc-2.3.2.so
lrwxrwxrwx 1 root root 13 Jun 17 06:35 /lib/libc.so.6 -> libc-
2.3.2.so

gcc -v:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-
checking --with-system-zlib --enable-cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

ld -v:
GNU ld version 2.13.90.0.18 20030206

as --version:
GNU assembler 2.13.90.0.18 20030206
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-redhat-linux'.

cat /proc/cpuinfo:
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) XP 2600+
stepping : 0
cpu MHz : 1913.215
cache size : 512 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 : 3814.19

*gdb information*

[~/tmp/MPlayer-20041115]$ gdb -v ./mplayer
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-redhat-linux-gnu"...
(gdb) run -v ~/sample/test422.m2v
Starting program: /home/gph/tmp/MPlayer-20041115/mplayer -v ~/sample/test422.m2v
[New Thread 1077758656 (LWP 29693)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MPlayer dev-CVS-041115-13:00-3.2.2 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or
directory
Reading config file /home/gph/.mplayer/config
Reading /home/gph/.mplayer/codecs.conf: Can't
open '/home/gph/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't
open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
CommandLine?: '-v' '/home/gph/sample/test422.m2v'
init_freetype
get_path('font/font.desc') -> '/home/gph/.mplayer/font/font.desc'
Font /home/gph/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay?
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using nanosleep() timing
get_path('input.conf') -> '/home/gph/.mplayer/input.conf'
Can't open input config file /home/gph/.mplayer/input.conf: No such file or
directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or
directory
Falling back on default (hardcoded) input config
get_path('test422.m2v.conf') -> '/home/gph/.mplayer/test422.m2v.conf'

Playing /home/gph/sample/test422.m2v.
[file] File size is 4959840 bytes
STREAM: [file] /home/gph/sample/test422.m2v
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
DEMUXER: freeing demuxer at 0x85cee58
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x85cf6c0
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x85cf6c0
Checking for Nullsoft Streaming Video
DEMUXER: freeing demuxer at 0x85cf6c0
Checking for NuppelVideo?
DEMUXER: freeing demuxer at 0x85cf6c0
Checking for REAL
DEMUXER: freeing demuxer at 0x85cf6c0
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x85cf6c0
DEMUXER: freeing demuxer at 0x85cff28
DEMUXER: freeing demuxer at 0x85cff28
Searching demuxer type for filename /home/gph/sample/test422.m2v ext: .m2v
Trying demuxer 2 based on filename extension
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 38 p101: 38 p1B6: 0 p12x: 185 sli: 75 a: 75 b: 75 c:
0 idr: 0 sps: 0 pps: 0 PES: 0 MP3: 350
MPEG-ES file format detected.
==> Found video stream: 0
Searching for sequence header... OK!
VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 31000.0 kbps (3875.0
kbyte/s)
[V] filefmt:1 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400
get_path('sub/') -> '/home/gph/.mplayer/sub/'
get_path('default.sub') -> '/home/gph/.mplayer/default.sub'
X11 opening display: :1.0
Xlib: extension "XFree86-VidModeExtension?" missing on display ":1.0".
vo: X11 color mask: FFFF (R:F800 G:7E0 B:1F)
vo: X11 running at 800x600 with depth 16 and 16 bpp (":1.0" => local display)
[x11] Detected wm supports layers.
[x11] Using workaround for Metacity bugs.
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
Xlib: extension "XVideo" missing on display ":1.0".
Sorry, Xv not supported by this X11 version/driver
Try with -vo x11 or -vo sdl *
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale? params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x576->768x576,flags=0,'MPlayer',0x32315659)
VO: [x11] 720x576 => 768x576 Planar YV12
VO: Description: X11 ( XImage/Shm )
VO: Author: Aaron Holtzman <aholtzma@…>
Sharing memory.
SwScaler?: using unscaled Planar YV12 -> BGR 16-bit special converter
* [vo] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1077758656 (LWP 29693)]
0x083a86ce in block_copy (block=0x85d2990, dest=0x40a26088 <Address 0x40a26088
out of bounds>,

stride=360) at idct_mmx.c:619

619 COPY_MMX (6*8, mm0, mm1, mm2);
(gdb) bt
#0 0x083a86ce in block_copy (block=0x85d2990, dest=0x40a26088 <Address
0x40a26088 out of bounds>,

stride=360) at idct_mmx.c:619

#1 0x083a7b58 in mpeg2_idct_copy_mmxext (block=0x85d2990,
dest=0x85d2990 "\200", stride=140323216)

at idct_mmx.c:759

#2 0x083a7382 in slice_intra_DCT (decoder=0x85d28c0, cc=1,
dest=0x85d2990 "\200", stride=140323216)

at slice.c:955

#3 0x083a6307 in mpeg2_slice (decoder=0x85d28c0, code=140323216,

buffer=0x40a26088 <Address 0x40a26088 out of bounds>) at slice.c:1856

#4 0x0839bcd9 in mpeg2_parse (mpeg2dec=0x85d28c0) at decode.c:188
#5 0x080a7f88 in decode (sh=0x85cdc00, data=0x40696008, len=167292, flags=0)
at vd_libmpeg2.c:126
#6 0x080a6153 in decode_video (sh_video=0x85cdc00, start=0x85d2990 "\200",
in_size=140323216,

drop_frame=0) at dec_video.c:309

#7 0x0805813f in main (argc=3, argv=0xbfffe954) at mplayer.c:2280
#8 0x42015574 in libc_start_main () from /lib/tls/libc.so.6
(gdb) info all-registers
eax 0x85d2990 140323216
ecx 0x168 360
edx 0x40a26088 1084383368
ebx 0x85d2990 140323216
esp 0xbfffd4b8 0xbfffd4b8
ebp 0xbfffd4b8 0xbfffd4b8
esi 0x40a25980 1084381568
edi 0x1 1
eip 0x83a86ce 0x83a86ce
eflags 0x210206 2163206
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x33 51
st0 -nan(0x81007f0080007f) (raw 0xffff0081007f0080007f)
st1 -nan(0x84008700870085) (raw 0xffff0084008700870085)
st2 -nan(0x84878785827f807f) (raw 0xffff84878785827f807f)
st3 -nan(0x84008700870085) (raw 0xffff0084008700870085)
st4 -nan(0x83008400840084) (raw 0xffff0083008400840084)
st5 -nan(0x850080007e0080) (raw 0xffff00850080007e0080)
st6 -nan(0x84008700870085) (raw 0xffff0084008700870085)
st7 -nan(0x83008700860084) (raw 0xffff0083008700860084)
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 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x8000000000000000,

0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 =

{0xffff, 0xffff, 0xffff,

0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff,

0xffffffff, 0xffffffff,

0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffffffffffffffff}

mxcsr 0x1f80 8064
mm0 {uint64 = 0x81007f0080007f, v2_int32 = {0x80007f, 0x81007f},
v4_int16 = {0x7f, 0x80,

0x7f, 0x81}, v8_int8 = {0x7f, 0x0, 0x80, 0x0, 0x7f, 0x0, 0x81, 0x0}}

mm1 {uint64 = 0x84008700870085, v2_int32 = {0x870085, 0x840087},
v4_int16 = {0x85, 0x87,

0x87, 0x84}, v8_int8 = {0x85, 0x0, 0x87, 0x0, 0x87, 0x0, 0x84, 0x0}}

mm2 {uint64 = 0x84878785827f807f, v2_int32 = {0x827f807f,
0x84878785}, v4_int16 = {

0x807f, 0x827f, 0x8785, 0x8487}, v8_int8 = {0x7f, 0x80, 0x7f, 0x82, 0x85,

0x87, 0x87, 0x84}}
mm3 {uint64 = 0x84008700870085, v2_int32 = {0x870085, 0x840087},
v4_int16 = {0x85, 0x87,

0x87, 0x84}, v8_int8 = {0x85, 0x0, 0x87, 0x0, 0x87, 0x0, 0x84, 0x0}}

mm4 {uint64 = 0x83008400840084, v2_int32 = {0x840084, 0x830084},
v4_int16 = {0x84, 0x84,

0x84, 0x83}, v8_int8 = {0x84, 0x0, 0x84, 0x0, 0x84, 0x0, 0x83, 0x0}}

mm5 {uint64 = 0x850080007e0080, v2_int32 = {0x7e0080, 0x850080},
v4_int16 = {0x80, 0x7e,

0x80, 0x85}, v8_int8 = {0x80, 0x0, 0x7e, 0x0, 0x80, 0x0, 0x85, 0x0}}

mm6 {uint64 = 0x84008700870085, v2_int32 = {0x870085, 0x840087},
v4_int16 = {0x85, 0x87,

0x87, 0x84}, v8_int8 = {0x85, 0x0, 0x87, 0x0, 0x87, 0x0, 0x84, 0x0}}

mm7 {uint64 = 0x83008700860084, v2_int32 = {0x860084, 0x830087},
v4_int16 = {0x84, 0x86,

0x87, 0x83}, v8_int8 = {0x84, 0x0, 0x86, 0x0, 0x87, 0x0, 0x83, 0x0}}

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x83a86ae to 0x83a86ee:
0x083a86ae <block_copy+78>: movq %mm2,(%edx)
0x083a86b1 <block_copy+81>: packuswb %mm1,%mm0
0x083a86b4 <block_copy+84>: movq 0x50(%eax),%mm2
0x083a86b8 <block_copy+88>: add %ecx,%edx
0x083a86ba <block_copy+90>: movq 0x58(%eax),%mm3
0x083a86be <block_copy+94>: movq %mm0,(%edx)
0x083a86c1 <block_copy+97>: packuswb %mm3,%mm2
0x083a86c4 <block_copy+100>: movq 0x60(%eax),%mm0
0x083a86c8 <block_copy+104>: add %ecx,%edx
0x083a86ca <block_copy+106>: movq 0x68(%eax),%mm1
0x083a86ce <block_copy+110>: movq %mm2,(%edx)
0x083a86d1 <block_copy+113>: packuswb %mm1,%mm0
0x083a86d4 <block_copy+116>: movq 0x70(%eax),%mm2
0x083a86d8 <block_copy+120>: add %ecx,%edx
0x083a86da <block_copy+122>: movq 0x78(%eax),%mm3
0x083a86de <block_copy+126>: movq %mm0,(%edx)
0x083a86e1 <block_copy+129>: packuswb %mm3,%mm2
0x083a86e4 <block_copy+132>: movq %mm2,(%ecx,%edx,1)
0x083a86e8 <block_copy+136>: leave
0x083a86e9 <block_copy+137>: ret
0x083a86ea <block_copy+138>: lea 0x0(%esi),%esi
End of assembler dump.

Change History (1)

comment:1 Changed 15 years ago by jason.geng@…

  • Resolution set to fixed
  • Status changed from new to closed

I think the bug has been fixed in CVS.

-- Jason Geng
2004.11.23

Note: See TracTickets for help on using tickets.