[MPlayer-dev-eng] [bug] another ratecontrol issue

Moritz Bunkus moritz at bunkus.org
Wed Oct 30 23:24:07 CET 2002


Hi.

> i cannot find that file :(

:( I definitely remember uploading the file and the bugreport, but
that's no problem, I still have everything here. I'll just try with a
current CVS version in order to make sure it still occurs... (busy
compiling & testing, hold on :))

I'm currently upload a 50Megs chunk to
/MPlayer/incoming/charmed.504-short.mpg (I'm seeing my FTP client
uploading, so I'm pretty sure that it's not just my imagination :)).
Here's the text I wrote last time, modified to include the output from
a current MPlayer version.

(Other persons also reported exactly the same message with mencoder,
although there seemed to be several temporary fixes: do not use any B
frames, use at most one B frame and so on. I don't use any B frames and
never have, but the bug is there nevertheless.)

--------------
The following happens:

When I use mencoder to convert from MPG(1) to MPEG4 (lavc) I get an error.
It happens with three of four MPGs that I downloaded recently. A sample file
(well the first 50 megs only, but the bug shows itself somewhere near the
end of this file) is uploaded as well, its name is 'charmed.504-short.mpg'.
I can provide more files that show the same behaviour.

The command line used is:

mencoder -v -nosound -ovc lavc \
  -lavcopts vcodec=mpeg4:vbitrate=700:vhq:vqmin=2:vpass=1 \
  -vop scale=320:240 \
  -o /dev/null charmed.504-short.mpg

The error message shown at the end is:
mencoder: ratecontrol.c:635: ff_rate_estimate_qscale: Assertion `q>0.0' failed.
Aborting.

(The complete and verbose output is at the end of this file.)

If I use the same command line WITHOUT the rescaling (without any "-vop...")
the bug does NOT occur. Changing -nosound to audio processing has no effect
upon the results.

This bug shows itself with both mplayer 0.9pre8 and with today's CVS version
along with ffmpeg's CVS version from today.

Here's my system information:

 - Debian Sid

 - kernel is 2.4.18-xfs-1.1

 - libc:
-rwxr-xr-x    1 root     root      1145456 2002-08-14 18:26 /lib/libc-2.2.5.so
lrwxrwxrwx    1 root     root           13 2002-08-17 17:13 /lib/libc.so.6 -> libc-2.2.5.so

 - X is not applicable in this case, nor is it running

 - gcc, ld, as:
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

GNU ld version 2.13.90.0.4 20020814 Debian GNU/Linux

GNU assembler version 2.13.90.0.4 (i386-linux) using BFD version 2.13.90.0.4 20020814 Debian GNU/Linux

 - CPU:
 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 6
model		: 7
model name	: AMD Duron(tm) processor
stepping	: 0
cpu MHz		: 1000.055
cache size	: 64 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 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips	: 1992.29

 - No information about video/sound cards/drivers applicable in this case.

The command listed above produces the following output:

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale


MEncoder 0.90pre9-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices Duron MG Morgan (Family: 6, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/mosu/.mplayer/mencoder_codecs.conf: can't open '/home/mosu/.mplayer/mencoder_codecs.conf': No such file or directory
Reading /etc/mencoder_codecs.conf: 38 audio & 110 video codecs
File not found: 'frameno.avi'
font: can't open file: /home/mosu/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 0  data: 0x0 - 0x3200000
Detected MPEG-PS file format!
VIDEO:  MPEG1  352x240  (aspect 12)  29.97 fps  1437.5 kbps (179.7 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:352x240  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=320:240]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 352 x 240 (preferred csp: Mpeg PES)
Sorry, 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 - 352 x 240 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (320x240 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2)
==========================================================================
Writing AVI header...
(a lot of progress output deleted)
mencoder: ratecontrol.c:635: ff_rate_estimate_qscale: Assertion `q>0.0' failed.

-----------------
That's the old error I got. If I use today's CVS I even get a
reproducable segfault :) Everyone cheer :)

gdb log following:
-----------------
(gdb) r -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=700:vhq:vqmin=2:vpass=1 -o /dev/null -vop scale=320:240 charmed.504-short.mpg
Starting program: /usr/local/bin/mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=700:vhq:vqmin=2:vpass=1 -o /dev/null -vop scale=320:240 charmed.504-short.mpg
[New Thread 16384 (LWP 24977)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MEncoder CVS-021030-06:00-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices Duron MG Morgan (Family: 6, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/mosu/.mplayer/codecs.conf: can't open '/home/mosu/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: 40 audio & 110 video codecs
File not found: 'frameno.avi'
font: can't open file: /home/mosu/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 0  data: 0x0 - 0x3200000
Detected MPEG-PS file format!
VIDEO:  MPEG1  352x240  (aspect 12)  29.97 fps  1437.5 kbps (179.7 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:352x240  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=320:240]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 352 x 240 (preferred csp: Mpeg PES)
Sorry, 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 - 352 x 240 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 24977)]
0x0807e399 in config (vf=0x830d298, width=352, height=240, d_width=352, d_height=264, flags=0, outfmt=842094169) at vf_scale.c:154
154         vf->priv->ctx=getSwsContext(width,height,
gdb) bt
#0  0x0807e399 in config (vf=0x830d298, width=352, height=240, d_width=352, d_height=264, flags=0, outfmt=842094169)
    at vf_scale.c:154
#1  0x08071454 in mpcodecs_config_vo (sh=0x8304b80, w=352, h=240, preferred_outfmt=842094169) at vd.c:277
#2  0x080747c2 in init (sh=0x8304b80) at vd_libmpeg2.c:85
#3  0x08070b25 in init_video (sh_video=0x8304b80, codecname=0x0, vfm=0x0, status=1) at dec_video.c:196
#4  0x08070ca7 in init_best_video_codec (sh_video=0x8304b80, video_codec_list=0xbfffe164, video_fm_list=0x0) at dec_video.c:240
#5  0x0804ea54 in main (argc=11, argv=0xbffff5a4) at mencoder.c:635
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x807e379 to 0x807e3b9:
0x807e379 <config+729>: push   %ebp
0x807e37a <config+730>: push   %esi
0x807e37b <config+731>: cmovne 0x20(%ebp),%eax
0x807e37f <config+735>: cmpl   $0x30323449,0x20(%ebp)
0x807e386 <config+742>: cmovne %eax,%ecx
0x807e389 <config+745>: push   %ecx
0x807e38a <config+746>: mov    0x10(%ebp),%ebx
0x807e38d <config+749>: push   %ebx
0x807e38e <config+750>: push   %edi
0x807e38f <config+751>: call   0x81178b8 <getSwsContext>
0x807e394 <config+756>: mov    %eax,%edx
0x807e396 <config+758>: mov    0x40(%esi),%eax
0x807e399 <config+761>: mov    %edx,0x14(%eax)
0x807e39c <config+764>: mov    0x40(%esi),%eax
0x807e39f <config+767>: add    $0x40,%esp
0x807e3a2 <config+770>: cmpl   $0x0,0x14(%eax)
0x807e3a6 <config+774>: jne    0x807e3c1 <config+801>
0x807e3a8 <config+776>: add    $0xfffffff8,%esp
0x807e3ab <config+779>: push   $0x81c3a00
0x807e3b0 <config+784>: push   $0x1d02
0x807e3b5 <config+789>: call   0x80512c0 <mp_msg_c>

----------------

I'm not sure that these two are related at all - but you probably know,
so I leave this annoying bug in your capable hands.

Oh, the file I'm uploading should be complete in approx 15 minutes
(11:40pm CET).

-- 
 ==> Ciao, Mosu (Moritz Bunkus)



More information about the MPlayer-dev-eng mailing list