[MPlayer-dev-eng] SwScaler bug

Arpi arpi at thot.banki.hu
Sun Apr 7 23:41:18 CEST 2002


Hi,

I've just implemented swscale filter (vf_scale.c), it also supports limited
colorspace conversion.
It worked when in and out fourcc is teh same, but just sig11 when scaling
(or converting, dest size == src size) yv12 -> bgr32.

Logs:

GNU gdb 5.0
Copyright 2000 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-slackware-linux"...
(gdb) run Coyote.Ugly.Sample-highbitrate-atmos.avi -vop scale -vo x11 -v         
             
Starting program: /usr/local/bin/mplayer Coyote.Ugly.Sample-highbitrate-atmos.avi -vop scale -vo x11 -v


MPlayer CVS-020407-20:17-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
CPU vendor name: GenuineIntel  max cpuid level: 2
CPU: Intel Pentium 4 Xeon Foster (Type: 8, Stepping: 2)
extended cpuid-level: 4
Testing OS support for SSE... yes.
Testing OS support for SSE unmasked exceptions... yes.
Tests of OS support for SSE passed.
Compiled with RUNTIME CPU Detection - warning, it's not optimal! To get best performance, recompile mplayer from sources with --disable-runtime-cpudetection
CommandLine:Reading /root/.mplayer/codecs.conf: 30 audio & 81 video codecs
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
 'Coyote.Ugly.Sample-highbitrate-atmos.avi' '-vop' 'scale' '-vo' 'x11' '-v'
Using Linux's hardware RTC timing (1024Hz)
Font /root/.mplayer/font/font.desc loaded successfully! (206 chars)
get_path('input.conf') -> '/root/.mplayer/input.conf'
Can't open input config file /root/.mplayer/input.conf : No such file or directory
Falling back on default (hardcoded) config
Playing Coyote.Ugly.Sample-highbitrate-atmos.avi
Can't open IFO file: No such file or directory
File size is 19185664 bytes
Not an URL!
Detected AVI file format!
==> Found video stream: 0
list_end=0x2292
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 1913   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  640 x 480
list_end=0x10F4
found 'bih', 40 bytes of 40
======= STREAM Header =======
Type: vids   FCC: div3 (33766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 1913
Suggested BufferSize: 48632
Quality 5000
Sample size: 0
Regenerating keyframe table for DIVX 3 video
======= VIDEO Format ======
  biSize 40
  biWidth 640
  biHeight 480
  biPlanes 1
  biBitCount 24
  biCompression 861292868='DIV3'
  biSizeImage 921600
===========================
==> Found audio stream: 1
list_end=0x2186
found 'wf', 30 bytes of 20
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 16000/1 = 16000.000
Start: 0   Len: 1224320
Suggested BufferSize: 8000
Quality -1
Sample size: 1
Broken chunk?  chunksize=1382  (id=JUNK)
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 16000
Block align: 1
bits/sample: 0
cbSize: 12
list_end=0x2292
Found movie at 0x280C - 0x123CEF8
list_end=0x123CEF8
Reading INDEX block, 3815 chunks for 1913 frames
Broken chunk?  chunksize=0  (id=idx1)
Reading INDEX block, 3815 chunks for 1913 frames
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x1F4C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=17858876
VIDEO:  [DIV3]  640x480  24bpp  25.00 fps  1867.1 kbps (227.9 kbyte/s)
[V] filefmt:3  fourcc:0x33564944  size:640x480  fps:25.00  ftime:=0.0400
get_path('sub/') -> '/root/.mplayer/sub/'
Detected audio codec: [mp3] drv:1 (MPEG layer-2, layer-3)
Initializing audio codec...
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
Selecting Audio Decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: srate=48000  chans=2  bps=2  sfmt=0x10  ratio: 16000->192000
CPU vendor name: GenuineIntel  max cpuid level: 2
CPU: Intel Pentium 4 Xeon Foster (Type: 8, Stepping: 2)
extended cpuid-level: 4
Testing OS support for SSE... yes.
Testing OS support for SSE unmasked exceptions... yes.
Tests of OS support for SSE passed.
mp3lib: made decode tables with MMX optimization
init layer2&3 finished, tables done
mp3lib: using MMX optimized decore!

MPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
Opening video filter 'scale' with args '(null)'...
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1024x768 with depth 24 and 32 bits/pixel (":0.0" => local display)
==========================================================================
SwScale: -1 x -1
INFO: libavcodec init OK!
Opening Video Decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec: CPU flags: mmx mmxext sse sse2
Detected video codec: [ffdivx] drv:5 prio:0 (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
AO: [oss] 48000Hz Stereo Signed 16-bit (Little-Endian)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Start playing...
ao2: 48000 Hz  2 chans  Signed 16-bit (Little-Endian)
audio_setup: using '/dev/dsp' dsp device
audio_setup: sample format: Signed 16-bit (Little-Endian) (requested: Signed 16-bit (Little-Endian))
audio_setup: using 2 channels (requested: 2)
audio_setup: using 48000 Hz samplerate (requested: 48000)
audio_setup: frags:  16/16  (4096 bytes/frag)  free:  65536
VDec: vo config request - 640 x 480, Planar YV12  
Movie-Aspect is undefined - no prescaling applied.
video_out->init(640x480->640x480,flags=0,'MPlayer',0x32315659)
scale: query(BGR 32-bit) -> 3
A:   0.1 V:   0.0 A-V:  0.105 ct:  0.000    1/  1   0%  0%  0.0% 0 0 0%
SwScale scaling 640x480 Planar YV12 to -1x-1 BGR 32-bit  
Using MMX2 for colorspace transform
SwScaler: using unscaled Planar YV12 -> BGR 32-bit special converter
Sharing memory.
Using MMX2 for colorspace transform
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
XXX initial  v_pts=0.000  a_pos=8000 (0.500) 
*** [scale] Exporting mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [vo] Allocating mp_image_t, 640x480x32bpp RGB packed, 1228800 bytes
[New Thread 1024 (LWP 20811)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 20811)]
0x81bbf8c in yuv420_argb32_MMX2 () at eval.c:88
88	eval.c: No such file or directory.
(gdb) bt
#0  0x81bbf8c in yuv420_argb32_MMX2 () at eval.c:88
#1  0x40708000 in ?? ()
#2  0x1e0 in ?? () at eval.c:88
Cannot access memory at address 0x280
(gdb) disass $eip-32 $eip+32
Dump of assembler code from 0x81bbf6c to 0x81bbfac:
0x81bbf6c <yuv420_argb32_MMX2+24>:	out    %eax,(%dx)
0x81bbf6d <yuv420_argb32_MMX2+25>:	in     $0x8b,%al
0x81bbf6f <yuv420_argb32_MMX2+27>:	
    jl     0x81bbf95 <yuv420_argb32_MMX2+65>
0x81bbf71 <yuv420_argb32_MMX2+29>:	inc    %esp
0x81bbf72 <yuv420_argb32_MMX2+30>:	dec    %edi
0x81bbf73 <yuv420_argb32_MMX2+31>:	
    js     0x81bc0f0 <yuv420_argb32_MMX2+412>
0x81bbf79 <yuv420_argb32_MMX2+37>:	lea    0x0(%esi,1),%esi
0x81bbf80 <yuv420_argb32_MMX2+44>:	mov    0x38(%esp,1),%ebx
0x81bbf84 <yuv420_argb32_MMX2+48>:	mov    %eax,%esi
0x81bbf86 <yuv420_argb32_MMX2+50>:	mov    %edx,%eax
0x81bbf88 <yuv420_argb32_MMX2+52>:	mov    0x3c(%esp,1),%edx
0x81bbf8c <yuv420_argb32_MMX2+56>:	movd   (%ebx),%mm0
0x81bbf8f <yuv420_argb32_MMX2+59>:	movd   (%edx),%mm1
0x81bbf92 <yuv420_argb32_MMX2+62>:	movq   (%eax),%mm6
0x81bbf95 <yuv420_argb32_MMX2+65>:	mov    0x40(%esp,1),%ecx
0x81bbf99 <yuv420_argb32_MMX2+69>:	dec    %edi
0x81bbf9a <yuv420_argb32_MMX2+70>:	mov    %edi,0x18(%esp,1)
0x81bbf9e <yuv420_argb32_MMX2+74>:	mov    0x4c(%esp,1),%edi
0x81bbfa2 <yuv420_argb32_MMX2+78>:	mov    0x48(%esp,1),%ebp
0x81bbfa6 <yuv420_argb32_MMX2+82>:	sar    $0x3,%ecx
0x81bbfa9 <yuv420_argb32_MMX2+85>:	add    %eax,%edi
0x81bbfab <yuv420_argb32_MMX2+87>:	mov    %edi,0x14(%esp,1)
End of assembler dump.
(gdb) printf "eax=%08lX\n",$eax
eax=40834040
(gdb) printf "ebx=%08lX\n",$ebx
ebx=00000000
(gdb) printf "ecx=%08lX\n",$ecx
ecx=00000A00
(gdb) printf "edx=%08lX\n",$edx
edx=00000000
(gdb) printf "esp=%08lX\n",$esp
esp=BFFFE3B4
(gdb) printf "ebp=%08lX\n",$ebp
ebp=0839B3C0
(gdb) printf "edi=%08lX\n",$edi
edi=000001DF
(gdb) printf "esi=%08lX\n",$esi
esi=40708000
(gdb) q
The program is running.  Exit anyway? (y or n) 


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list