[MEncoder-users] assertion and abort in swScale-MMX2

Thomas ollo.diab at gmx.de
Sat Jan 21 17:07:22 CET 2006


while I'm converting DVB MPEG2 video to MPEG4 for my Palm/TCPMP, I came across
an issue in mencoder. Below follows the command line I'm using in gdb using CVS
mencoder built with --enable-debug=3. The video seems to contain dublicate
frames, at least they get reported by mencoder and it crashes on such occurence.
It plays fine in mplayer.
Interesting enough, the crash doe not happen if I change the video filter order
from crop,scale,rotate to crop,rotate,scale.

Regards,  Thomas

# gdb ./mencoder
GNU gdb 6.3-debian
Copyright 2004 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 "i486-linux-gnu"...Using host libthread_db library

(gdb) r James.mpg -nosound -ovc x264 -x264encopts
bitrate=400:nocabac:pass=1:turbo=2 -vf crop=520:428:92:74,scale=-2:480,rotate=2
-o /dev/null
Starting program: /root/mmbox/main/mencoder James.mpg -nosound -ovc x264
-x264encopts bitrate=400:nocabac:pass=1:turbo=2 -vf
crop=520:428:92:74,scale=-2:480,rotate=2 -o /dev/null
[Thread debugging using libthread_db enabled]
[New Thread -1214544192 (LWP 13859)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MEncoder dev-CVS-060121-10:19-4.0.2 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Sempron/Athlon MP/XP/XP-M Barton,Thorton (Family: 6,
Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

success: format: 0  data: 0x0 - 0xdf8a7fe
MPEG-PS file format detected.
VIDEO:  MPEG2  704x576  (aspect 3)  25.000 fps  15000.0 kbps (1875.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:704x576  fps:25.00  ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [rotate=2]
Opening video filter: [scale w=-2 h=480]
Opening video filter: [crop w=520 h=428 x=92 y=74]
Crop: 520 x 428, 92 ; 74
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 704 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
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))
VDec: vo config request - 704 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
x264 [info]: no need for a SAR
x264 [info]: using cpu capabilities MMX MMXEXT SSE 3DNow!
New_Face failed. Maybe the font path is wrong.n   0mb  A-V:0.000 [0:0]
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: vprp aspect is 9273:16384.
Writing header...
ODML: vprp aspect is 9273:16384.

1 duplicate frame(s)!
mencoder: swscale_template.c:2725: swScale_MMX2: Assertion `lastInChrBuf + 1 -
chrSrcSliceY >= 0' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1214544192 (LWP 13859)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7a029b1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7a042c9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb79fbf51 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4  0x081b697b in swScale_MMX2 (c=0x87deb80, src=0xbfb438f0,
srcStride=0xbfb437fc, srcSliceY=278, srcSliceH=16,
    dst=0x891e588, dstStride=0xbfb43808) at swscale_template.c:2725
#5  0x081b074b in sws_scale_ordered (c=0x87deb80, src=0xbfb438f0,
srcStride=0xbfb43930, srcSliceY=278, srcSliceH=16,
    dst=0x891e588, dstStride=0x891e598) at swscale.c:2292
#6  0x080e33d0 in scale (sws1=0x87deb80, sws2=0x0, src=Variable "src" is not
) at vf_scale.c:302
#7  0x080c2246 in draw_slice (vf=0x87da358, src=0x87da40c, stride=0xbfb43930,
w=520, h=16, x=Variable "x" is not available.
) at vf_crop.c:135
#8  0x080b5418 in draw_slice (_sh=0x87d7970, src=0x0, y=352) at vd_libmpeg2.c:107
#9  0x085182cd in mpeg2_slice (decoder=0x87da400, code=23, buffer=0x6 <Address
0x6 out of bounds>) at slice.c:2017
#10 0x085097f7 in mpeg2_parse (mpeg2dec=0x87da400) at decode.c:192
#11 0x080b54b8 in decode (sh=0x87d7970, data=0xb78b7008, len=9816, flags=0) at
#12 0x080b3493 in decode_video (sh_video=0x87d7970, start=0x0, in_size=0,
drop_frame=0) at dec_video.c:316
#13 0x080799ea in main (argc=0, argv=0x0) at mencoder.c:1315

More information about the MEncoder-users mailing list