[MPlayer-users] re: libvo\aspect.c buggy? - full bugreport + patch(?)

Frank Leavis f.t.leavis at student.utwente.nl
Tue May 7 00:31:02 CEST 2002


Bugreport for .avi files (maybe others as well?) rescaling to sizes greater than framebuffer size, which causes black screen on playback on my tv:

Distribution: Slackware 8.0
Kernel Version: 2.4.18-rc2 #2 Wed Feb 20 17:57:19 CET 2002 i686 unknown
/lib/libc[.-]* : -rwxr-xr-x    1 root     root      4783716 May 26  2001 /lib/libc-2.2.3.so
	lrwxrwxrwx    1 root     root           13 Aug 19  2001 /lib/libc.so.6 -> libc-2.2.3.so
gcc: gcc version 2.95.3 20010315 (release)
ld: GNU ld version 2.11.90.0.19 (with BFD 2.11.90.0.19)
as --version: GNU assembler 2.11.90.0.19
cat /proc/cpuinfo: 
	processor       : 0
	vendor_id       : GenuineIntel
	cpu family      : 6
	model           : 6
	model name      : Celeron (Mendocino)
	stepping        : 0
	cpu MHz         : 334.097
	cache size      : 128 KB
	fdiv_bug        : no
	hlt_bug         : no
	f00f_bug        : no
	coma_bug        : no
	fpu             : yes
	fpu_exception   : yes
	cpuid level     : 2
	wp              : yes
	flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr
	bogomips        : 666.82
Videocard: Matrox Millennium G400 16MB SGRAM DH
Videodriver: kernel I2C fb driver
Soundcard & driver: SB Live! Player 1024, built-in kernel driver

mplayer -v -vo mga -a oss -fs -monitoraspect 16:9 Hellsing\ 01.avi &> Mplayer.log
------------------------------------
MPlayer CVS-020506-06:00-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU vendor name: GenuineIntel  max cpuid level: 2
CPU: Intel Celeron A Mendocino/Pentium II Dixon (Type: 6, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with features: MMX
Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/share/mplayer/codecs.conf: 34 audio & 91 video codecs
CommandLine:get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
 '-v' '-vo' 'mga' '-ao' 'oss' '-fs' '-monitoraspect' '16:9' 'Hellsing 01.avi'
Using MMX Optimized OnScreenDisplay
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Linux RTC init error: No such device
Using usleep() timing
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 Hellsing 01.avi
Not an URL!
File size is 181276672 bytes
Detected AVI file format!
list_end=0x2292
list_end=0x10F4
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 32848   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  640 x 480
==> Found video stream: 0
found 'bih', 40 bytes of 40
======= STREAM Header =======
Type: vids   FCC: div3 (33766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 119880/5000 = 23.976
Start: 0   Len: 32848
Suggested BufferSize: 62788
Quality 10000
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
===========================
list_end=0x2186
==> Found audio stream: 1
found 'wf', 30 bytes of 20
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 12000/1 = 12000.000
Start: 0   Len: 16440292
Suggested BufferSize: 6000
Quality -1
Sample size: 1
list_end=0x2292
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 12000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=288
mp3.nFramesPerBlock=1
mp3.nCodecDelay=1393
list_end=0x22B6
hdr=Software  size=15
Software  : Nandub v1.0rc2
Broken chunk?  chunksize=1346  (id=JUNK)
list_end=0xABE01DC
Found movie at 0x280C - 0xABE01DC
Reading INDEX block, 65686 chunks for 32848 frames
Broken chunk?  chunksize=0  (id=idx1)
Reading INDEX block, 65686 chunks for 32848 frames
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x177C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=163248452
VIDEO:  [DIV3]  640x480  24bpp  23.98 fps  953.2 kbps (116.4 kbyte/s)
[V] filefmt:3  fourcc:0x33564944  size:640x480  fps:23.98  ftime:=0.0417
Clip info: 
 Software: Nandub v1.0rc2
get_path('sub/') -> '/root/.mplayer/sub/'
Detected audio codec: [mp3] drv:1 (MPEG layer-2, layer-3)
Initializing audio codec...
Selecting Audio Decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
AUDIO: srate=48000  chans=2  bps=2  sfmt=0x10  ratio: 12000->192000
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 96 kbit Joint-Stereo, BPF: 288
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
==========================================================================
Requested video codec family [ffdivx] (vfm=5) not available (enable it at compile time!)
Requested video codec family [odivx] (vfm=3) not available (enable it at compile time!)
Requested video codec family [divx4] (vfm=7) not available (enable it at compile time!)
Opening Video Decoder: [dshow] DirectShow video codecs
get_path('registry') -> '/root/.mplayer/registry'
Loading DLL: 'divx_c32.ax'
Loaded divx_c32.ax to address 0x64640000
VDec: vo config request - 640 x 480, Packed YUY2  
Using DirectShow codec: divx_c32.ax
Decoder is capable of YUV output ( flags 0x9)
[PP] Using codec's postprocessing, max q = 4
vo_debug: query(Packed YUY2) returned 0x37 (i=0) 
Movie-Aspect is undefined - no prescaling applied.
video_out->init(640x480->640x480,flags=1,'MPlayer',0x32595559)
VO: [mga] 640x480 => 640x480 Packed YUY2 fs 
VO: Description: Matrox G200/G400 overlay (/dev/mga_vid)
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
INFO: Win32/DShow video codec init OK!
aspect(0) fitin: 800x600 zoom: 1 
aspect(1) wh: 640x480 (org: 640x480)
aspect(2) wh: 800x800 (org: 640x480)
aspect(3) wh: 800x800 (org: 640x480)
vo_mga aspect(): resized to 800x800
[mga] Using 3 buffers.
Detected video codec: [divxds] drv:4 prio:0 (DivX ;-) (MS MPEG-4 v3))
==========================================================================
Error in mga_vid_config ioctl(): Invalid argument
Could not get luma values from the kernel module!
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
*** [vo] Allocating mp_image_t, 640x480x16bpp YUV packed, 614400 bytes
A:   0.1 V:   0.0 A-V:  0.058 ct:  0.000    1/  1   0%  0%  0.0% 0 0 0%
XXX initial  v_pts=0.000  a_pos=6000 (0.500) 
<cut>
Exiting... (Quit)

*** free_stream() called ***
vo: uninit!
----------------------------------------------------------------------------

in this particular case the image should be rescaled to 600x600 vs. 800x800, imho. Playing with -aspect -monitoraspect shows that there are plenty of other scenarios where 
rescaling goes outside framebuffer size.

Patch (please check wether it's not full of broken, stupid & wrong code, as it probably will be, as my first
C file ever ;) ), is included as attachment.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: aspect.c.diff
Type: application/octet-stream
Size: 2405 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20020507/f13a789a/attachment.obj>


More information about the MPlayer-users mailing list