[MPlayer-users] Strange bug with software scaler

Rémi Guyomarch rguyom at pobox.com
Tue Apr 16 09:39:01 CEST 2002


Hi,

I'm using cvs-current under FreeBSD 4.5. There's a strange bug in the
software scaler implementation. When scaling to 572x240, I'm seeing
the U and/or V components shifted to the left, more and more as you
look from top to bottom in the image, as if there's one pixel less
in in U and V planes than the Y plane. White, black or gray isn't
shifted.
Mplayer complain that 'dstStride' is not aligned (see log).

The type of scaler doesn't matter, bug happens whatever I put in
-sws. It seems specific to YUV output. With -vo x11 (rgb output) it
doesn't happen. It's not a bug in my Xv driver because I got this bug
the first time with mencoder and checked with mplayer only later.

In this example the input is a DVD copied to an .avi, but I'm getting
the same bug with every type of input.

rguyom at diabolic-cow ~ # mplayer -v -x 572 -y 240 -vop scale=572:240,crop=704:416:8:80 -sws 0 -nosound 'Les Rois Du Désert (DVD).avi' 


MPlayer CVS-020416-06:29-3.0.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices K6-2 (Type: 5, Stepping: 12)
extended cpuid-level: 5
CPUflags: Type: 5 MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with features: MMX 3DNow
/home/rguyom/.mplayer/config(2): option: vo
/home/rguyom/.mplayer/config(2): parameter: xv
/home/rguyom/.mplayer/config(3): option: fs
/home/rguyom/.mplayer/config(3): parameter: 1
/home/rguyom/.mplayer/config(4): option: quiet
/home/rguyom/.mplayer/config(4): parameter: 1
/home/rguyom/.mplayer/config(5): option: framedrop
/home/rguyom/.mplayer/config(5): parameter: 1
/home/rguyom/.mplayer/config(6): option: osdlevel
/home/rguyom/.mplayer/config(6): parameter: 0
/home/rguyom/.mplayer/config(8): option: cache
/home/rguyom/.mplayer/config(8): parameter: 2048
/home/rguyom/.mplayer/config(9): option: dvd-device
/home/rguyom/.mplayer/config(9): parameter: /dev/acd1c
/home/rguyom/.mplayer/config(10): option: fsmode
/home/rguyom/.mplayer/config(10): parameter: 1
Reading /home/rguyom/.mplayer/codecs.conf: 30 audio & 81 video codecs
CommandLine: '-v' '-x' '572' '-y' '240' '-nofs' '-vop' 'scale=572:240,crop=704:416:8:80' '-sws' '0' '-nosound' 'Les Rois Du Désert (DVD).avi'
get_path('font/font.desc') -> '/home/rguyom/.mplayer/font/font.desc'
Font /home/rguyom/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit 3DNow) Optimized OnScreenDisplay
Using usleep() timing
get_path('input.conf') -> '/home/rguyom/.mplayer/input.conf'
Can't open input config file /home/rguyom/.mplayer/input.conf : No such file or directory
Falling back on default (hardcoded) config
Playing Les Rois Du Désert (DVD).avi
Can't open IFO file: No such file or directory
Not an URL!
File size is 4689070624 bytes
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:172032  
Detected AVI file format!
list_end=0x13C
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 165142   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 576
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25.000
Start: 0   Len: 165142
Suggested BufferSize: 139344
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 576
  biPlanes 1
  biBitCount 24
  biCompression 268435458=''
  biSizeImage 1244160
===========================
list_end=0x13C
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 48000/1 = 48000.000
Start: 0   Len: 317068800
Suggested BufferSize: 24000
Quality 0
Sample size: 1
found 'wf', 20 bytes of 20
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 2
Samplerate: 48000
avg byte/sec: 48000
Block align: 1
bits/sample: 16
cbSize: 0
Broken chunk?  chunksize=1724  (id=JUNK)
list_end=0x0
Found movie at 0x80C - 0xFFFFFFFF
chunksize=-674688368  (id=å ?)
chunksize=-47813150  (id=c5))
chunksize=-2023314122  (id=)b~Ë)
chunksize=-1341976570  (id=S)
chunksize=-46169580  (id=¬0)
chunksize=-253649408  (id=PÀ)
cache_stream_seek: WARNING! Can't seek to 0x12391A556 !
Auto-selected AVI video ID = 0
AVI video length=394101268
VIDEO:  []  720x576  24bpp  25.00 fps  477.3 kbps (58.3 kbyte/s)
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 3)  25.00 fps  9375.0 kbps (1171.9 kbyte/s)
[V] filefmt:3  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
get_path('sub/') -> '/home/rguyom/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask:  FFFF  (R:F800 G:7E0 B:1F)
vo: X11 running at 1024x768 with depth 16 and 16 bits/pixel (":0.0" => local display)
Opening video filter 'scale' with args '572:240'...
SwScale: 572 x 240
Opening video filter 'crop' with args '704:416:8:80'...
Crop: 704 x 416, 8 ; 80
==========================================================================
Opening Video Decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576, Mpeg PES  
[PP] Sorry, postprocessing is not available
vo_debug: query(Mpeg PES) returned 0x0 (i=0) 
SwScale: -1 x -1
vo_debug: query(Mpeg PES) returned 0x0 (i=0) 
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 MMX for IDCT transform
libmpeg2: Using 3DNOW for motion compensation
VDec: vo config request - 720 x 576, Planar YV12  
[PP] Sorry, postprocessing is not available
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 1
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 3
vo_debug: query(Planar YV12) returned 0x477 (i=0) 
video_out->init(720x576->572x240,flags=0,'MPlayer',0x32315659)
crop->config() called
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 1
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 3
REQ: flags=0x477  req=0x400  
scale: query(BGR 32-bit) -> 0
scale: query(BGR 24-bit) -> 1
scale: query(BGR 16-bit) -> 0
scale: query(BGR 15-bit) -> 0
scale: query(Planar YV12) -> 3
SwScale scaling 704x416 Planar YV12 to 572x240 Planar YV12  
SwScaler: reducing / aligning filtersize 2 -> 4
SwScaler: reducing / aligning filtersize 2 -> 4
SwScaler: reducing / aligning filtersize 2 -> 2
SwScaler: reducing / aligning filtersize 2 -> 2

SwScaler: FAST_BILINEAR scaler, from Planar YV12 to Planar YV12 using 3DNOW
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 704x416 -> 572x240
REQ: flags=0x437  req=0x0  
VO: [xv] 572x240 => 572x240 Planar YV12 
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de>
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 55 for hw scaling
[xv] dcx: 3 dcy: 20 dx: 0 dy: 0 dw: 572 dh: 240
crop->config() return 1
Detected video codec: [mpeg12] drv:1 prio:0 (MPEG 1 or 2)
==========================================================================
Audio: no sound!!!
Freeing 0 unused audio chunks
Start playing...
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
X11 Window 3x20-572x240
X11 Window 3x20-572x240
[xv] dcx: 3 dcy: 20 dx: 0 dy: 0 dw: 572 dh: 240
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [scale] Exporting mp_image_t, 704x416x12bpp YUV planar, 439296 bytes
*** [vo] Allocating mp_image_t, 572x240x12bpp YUV planar, 205920 bytes
SwScaler: Warning: dstStride is not aligned!
SwScaler:          ->cannot do aligned memory acesses anymore
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes

*** free_stream() called ***

Exiting... (Quit)

-- 
Rémi





More information about the MPlayer-users mailing list