[MPlayer-dev-eng] [BUGREPORT] mecoder with -mf option

Jens Taprogge taprogge at idg.rwth-aachen.de
Sat Jun 8 00:30:42 CEST 2002


Hi,

I have two problems using mencoder to encode jpg files to an avi stream.

First of all when I am using lots of files (somewhere between 2162 and 3078)
not all of them get encoded. (3078 files leads to 626 frames)

The other problem is that using the lavc encoder family leads to a
segfault in memcopy. 

Please let me know if you need more info.

Best Regards 
Jens


---------------------------- system info -----------------------------

* CVS version as of about 1 hour ago. The same goes for libavcodec.
* CPU detection enabled
* Distribution: Debian sid.

$ uname -a
Linux maggie 2.4.18 #2 Fri Apr 26 12:18:48 CEST 2002 i686 unknown

$ ls -l /lib/libc[.-]*
-rwxr-xr-x    1 root     root      1153784 Apr 28 11:57 /lib/libc-2.2.5.so
lrwxrwxrwx    1 root     root           13 May  2 00:33 /lib/libc.so.6 -> libc-2.2.5.so

$ X -version
This is a pre-release version of XFree86, and is not supported in any
way.  Bugs may be reported to XFree86 at XFree86.Org and patches submitted
to fixes at XFree86.Org.  Before reporting bugs in pre-release versions,
please check the latest version in the XFree86 CVS repository
(http://www.XFree86.Org/cvs)

XFree86 Version 4.1.0.1 / X Window System
(protocol Version 11, revision 0, vendor release 6510)
Release Date: 21 December 2001
        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/FAQ)
Build Operating System: Linux 2.4.18 i686 [ELF] 
Module Loader present

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

$ ld -v
GNU ld version 2.12.90.0.7 20020423 Debian GNU/Linux

$ as --version
GNU assembler 2.12.90.0.7 20020423 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'.



---------------------------- GDB output -----------------------------

(gdb) run
Starting program: /mnt/discs/hda5/usr/bin/mencoder -v -mf on:h=480:w=640 \*.jpg -ovc lavc -lavcopts vcodec=mpeg4:vhq:vpass=1 -o webcam1.avi
[New Thread 1024 (LWP 31046)]


MEncoder CVS-020607-09:51-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU: Advanced Micro Devices Athlon TB Thunderbird (Family: 6, Stepping: 4)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Reading /home/ln/.mplayer/codecs.conf: can't open '/home/ln/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 34 audio & 94 video codecs
File not found: 'frameno.avi'
get_path('font/font.desc') -> '/home/ln/.mplayer/font/font.desc'
font: can't open file: /home/ln/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
[mf] search expr: *.jpg
[mf] number of files: 3073 (12292)
success: format: 0  data: 0x0 - 0x0
forced mf.
[demuxer] mf support.
==> Found video stream: 0
[V] filefmt:16  fourcc:0x47504A49  size:640x480  fps:25.00  ftime:=0.0400
libavcodec: CPU flags: mmx mmxext 3dnow
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ijpg] JPEG Images decoder
Detected video codec: [ijpg] drv:22 (IJPG codec)
==========================================================================
Writing AVI header...
VDec: vo config request - 640 x 480 (preferred csp: RGB 24-bit)  
vo_debug: query(RGB 24-bit) returned 0x0 (i=0) 
vo_debug: query(BGR 24-bit) returned 0x0 (i=1) 
vo_debug: query(BGR 32-bit) returned 0x0 (i=2) 
Couldn't find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(RGB 24-bit) returned 0x441 (i=0) 
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(BGR 24-bit) returned 0x441 (i=1) 
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
vo_debug: query(BGR 32-bit) returned 0x441 (i=2) 
Movie-Aspect is undefined - no prescaling applied.
video_out->init(640x480->640x480,flags=0,'MPlayer',0x52474218)
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 0
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 1
scale: query(Planar I420) -> 1
scale: query(Planar IYUV) -> 1
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: BICUBIC scaler, 640x480 RGB 24-bit -> 640x480 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 1-tap MMX "scaler" for vertical scaling (YV12 like)
SwScaler: 640x480 -> 640x480
REQ: flags=0x401  req=0x0  
REQ: flags=0x401  req=0x0  
videocodec: libavcodec (640x480 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
*** [scale] Allocating mp_image_t, 640x480x24bpp RGB packed, 921600 bytes
*** [lavc] Allocating mp_image_t, 640x480x24bpp RGB packed, 921600 bytes

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 31046)]
0x08073621 in fast_memcpy ()
(gdb) bt
#0  0x08073621 in fast_memcpy ()
#1  0x080b6a32 in reorder_input ()
#2  0x080b6bd0 in MPV_encode_picture ()
#3  0x080b494f in avcodec_encode_video ()
#4  0x080787fc in vf_open_encoder ()
#5  0x080826e1 in vf_next_put_image ()
#6  0x080837b6 in vf_list_plugins ()
#7  0x0807c421 in decode_video ()
#8  0x08061065 in main ()
#9  0x4055314f in __libc_start_main () from /lib/libc.so.6
(gdb) disass $eip-32 $eip+32
Dump of assembler code from 0x8073601 to 0x8073641:
0x8073601 <fast_memcpy+289>:    cmpl   $0x3f,0xfffffffc(%ebp)
0x8073605 <fast_memcpy+293>:    jbe    0x8073783 <fast_memcpy+675>
0x807360b <fast_memcpy+299>:    mov    0x8(%ebp),%ecx
0x807360e <fast_memcpy+302>:    and    $0x3f,%ecx
0x8073611 <fast_memcpy+305>:    je     0x8073623 <fast_memcpy+323>
0x8073613 <fast_memcpy+307>:    mov    $0x40,%eax
0x8073618 <fast_memcpy+312>:    sub    %ecx,%eax
0x807361a <fast_memcpy+314>:    mov    %eax,%ecx
0x807361c <fast_memcpy+316>:    sub    %ecx,%ebx
0x807361e <fast_memcpy+318>:    mov    %ebx,0xfffffffc(%ebp)
0x8073621 <fast_memcpy+321>:    repz movsb %ds:(%esi),%es:(%edi)
0x8073623 <fast_memcpy+323>:    mov    0xfffffffc(%ebp),%ecx
0x8073626 <fast_memcpy+326>:    shr    $0x6,%ecx
0x8073629 <fast_memcpy+329>:    andl   $0x3f,0xfffffffc(%ebp)
0x807362d <fast_memcpy+333>:    jmp    0x807367c <fast_memcpy+412>
0x807362f <fast_memcpy+335>:    nop    
0x8073630 <fast_memcpy+336>:    prefetchnta 0x140(%esi)
0x8073637 <fast_memcpy+343>:    movq   (%esi),%mm0
0x807363a <fast_memcpy+346>:    movq   0x8(%esi),%mm1
0x807363e <fast_memcpy+350>:    movq   0x10(%esi),%mm2
End of assembler dump.
(gdb) disass 0x080b6a32-32 0x080b6a32+32
Dump of assembler code from 0x80b6a12 to 0x80b6a52:
0x80b6a12 <reorder_input+530>:  jge    0x80b6a04 <reorder_input+516>
0x80b6a14 <reorder_input+532>:  sarl   0xffffffec(%ebp)
0x80b6a17 <reorder_input+535>:  sar    %edx
0x80b6a19 <reorder_input+537>:  mov    0xffffffc0(%ebp),%ebx
0x80b6a1c <reorder_input+540>:  mov    %esi,(%ebx)
0x80b6a1e <reorder_input+542>:  test   %edx,%edx
0x80b6a20 <reorder_input+544>:  jle    0x80b6a3e <reorder_input+574>
0x80b6a22 <reorder_input+546>:  mov    %edx,%ebx
0x80b6a24 <reorder_input+548>:  mov    0xffffffec(%ebp),%eax
0x80b6a27 <reorder_input+551>:  add    $0xfffffffc,%esp
0x80b6a2a <reorder_input+554>:  push   %eax
0x80b6a2b <reorder_input+555>:  push   %edi
0x80b6a2c <reorder_input+556>:  push   %esi
0x80b6a2d <reorder_input+557>:  call   0x80734e0 <fast_memcpy>
0x80b6a32 <reorder_input+562>:  add    0xfffffff0(%ebp),%esi
0x80b6a35 <reorder_input+565>:  add    0xfffffff4(%ebp),%edi
0x80b6a38 <reorder_input+568>:  add    $0x10,%esp
0x80b6a3b <reorder_input+571>:  dec    %ebx
0x80b6a3c <reorder_input+572>:  jne    0x80b6a24 <reorder_input+548>
0x80b6a3e <reorder_input+574>:  addl   $0x4,0xffffffc0(%ebp)
0x80b6a42 <reorder_input+578>:  addl   $0x4,0xffffffbc(%ebp)
0x80b6a46 <reorder_input+582>:  incl   0xfffffffc(%ebp)
0x80b6a49 <reorder_input+585>:  cmpl   $0x2,0xfffffffc(%ebp)
0x80b6a4d <reorder_input+589>:  jle    0x80b69b0 <reorder_input+432>
End of assembler dump.
(gdb) disass 0x080b6bd0-32 0x080b6bd0+32
Dump of assembler code from 0x80b6bb0 to 0x80b6bf0:
0x80b6bb0 <MPV_encode_picture+196>:     cmpl   $0x1,0x290(%esi)
0x80b6bb7 <MPV_encode_picture+203>:     jne    0x80b6bc3 <MPV_encode_picture+215>
0x80b6bb9 <MPV_encode_picture+205>:     movl   $0x0,0xa8(%esi)
0x80b6bc3 <MPV_encode_picture+215>:     mov    0x14(%ebp),%eax
0x80b6bc6 <MPV_encode_picture+218>:     add    $0xfffffff8,%esp
0x80b6bc9 <MPV_encode_picture+221>:     push   %eax
0x80b6bca <MPV_encode_picture+222>:     push   %esi
0x80b6bcb <MPV_encode_picture+223>:     call   0x80b6800 <reorder_input>
0x80b6bd0 <MPV_encode_picture+228>:     add    $0x10,%esp
0x80b6bd3 <MPV_encode_picture+231>:     cmpl   $0x0,0x128(%esi)
0x80b6bda <MPV_encode_picture+238>:     je     0x80b6cfb <MPV_encode_picture+527>
0x80b6be0 <MPV_encode_picture+244>:     mov    0x134(%esi),%eax
0x80b6be6 <MPV_encode_picture+250>:     mov    %eax,0x2a0(%esi)
0x80b6bec <MPV_encode_picture+256>:     cmpl   $0x0,0x3c(%esi)
End of assembler dump.
(gdb) disass 0x080b494f-32 0x080b494f+32
Dump of assembler code from 0x80b492f to 0x80b496f:
0x80b492f <avcodec_encode_video+3>:     sub    $0x10,%esp
0x80b4932 <avcodec_encode_video+6>:     push   %esi
0x80b4933 <avcodec_encode_video+7>:     push   %ebx
0x80b4934 <avcodec_encode_video+8>:     mov    0x8(%ebp),%ebx
0x80b4937 <avcodec_encode_video+11>:    mov    0xc(%ebp),%esi
0x80b493a <avcodec_encode_video+14>:    mov    0x10(%ebp),%edx
0x80b493d <avcodec_encode_video+17>:    mov    0x14(%ebp),%eax
0x80b4940 <avcodec_encode_video+20>:    mov    0x90(%ebx),%ecx
0x80b4946 <avcodec_encode_video+26>:    push   %eax
0x80b4947 <avcodec_encode_video+27>:    push   %edx
0x80b4948 <avcodec_encode_video+28>:    push   %esi
0x80b4949 <avcodec_encode_video+29>:    push   %ebx
0x80b494a <avcodec_encode_video+30>:    mov    0x14(%ecx),%eax
0x80b494d <avcodec_encode_video+33>:    call   *%eax
0x80b494f <avcodec_encode_video+35>:    incl   0x4c(%ebx)
0x80b4952 <avcodec_encode_video+38>:    lea    0xffffffe8(%ebp),%esp
0x80b4955 <avcodec_encode_video+41>:    pop    %ebx
0x80b4956 <avcodec_encode_video+42>:    pop    %esi
0x80b4957 <avcodec_encode_video+43>:    mov    %ebp,%esp
0x80b4959 <avcodec_encode_video+45>:    pop    %ebp
0x80b495a <avcodec_encode_video+46>:    ret    


-- 
Jens Taprogge



More information about the MPlayer-dev-eng mailing list