Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1697 closed defect (invalid)

quantized colors in -vo gl / OS X / GeForce GT 330M

Reported by: astrange@… Owned by: reimar
Priority: normal Component: vo
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Playing back any video with -vo gl on a GeForce GT 330M has extremely bad banding, as if it's being rendered in rgb16. The same binary and environment worked on an 8600M GT.

Console output looks normal. (One other problem - it doesn't seem to autodetect rectangle=2, which I'd expect to be faster.)

mplayer -vo gl -v 5cm.mp4

MPlayer SVN-r30971-4.2.1 (C) 2000-2010 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 11
CPU: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz (Family: 6, Model: 37, Stepping: 2)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/Users/astrange/.mplayer/codecs.conf'
Reading /Users/astrange/.mplayer/codecs.conf: Can't open '/Users/astrange/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --enable-liba52-internal --disable-sdl --extra-ldflags=-ltheora --extra-cflags=--param max-completely-peel-times=2 -g
CommandLine: '-vo' 'gl' '-v' '5cm.mp4'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/Users/astrange/.mplayer/fonts'
Using Darwin accurate timing
get_path('input.conf') -> '/Users/astrange/.mplayer/input.conf'
Can't open input config file /Users/astrange/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('5cm.mp4.conf') -> '/Users/astrange/.mplayer/5cm.mp4.conf'

Playing 5cm.mp4.
get_path('sub/') -> '/Users/astrange/.mplayer/sub/'
[file] File size is 7319491 bytes
STREAM: [file] 5cm.mp4
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
==> Found video stream: 0
[lavf] Video stream found, -vid 0
======= VIDEO Format ======

biSize 79
biWidth 1280
biHeight 720
biPlanes 0
biBitCount 24
biCompression 875967048='H264'
biSizeImage 2764800

Unknown extra header dump: [1] [64] [0] [33] [ff] [e1] [0] [18] [67] [64] [0] [33] [ac] [34] [e3] [80] [50] [5] [b2] [10] [0] [32] [dc] [d0] [9] [89] [68] [8] [f1] [83] [18] [e8] [1] [0] [4] [68] [ee] [bc] [b0]
===========================
==> Found audio stream: 1
[lavf] Audio stream found, -aid 1
======= WAVE Format =======
Format Tag: 20557 (0x504D)
Channels: 2
Samplerate: 44100
avg byte/sec: 16139
Block align: 1
bits/sample: 16
cbSize: 7
Unknown extra header dump: [13] [90] [56] [e5] [a5] [48] [0]
==========================================================================
LAVF: 1 audio and 1 video streams found
LAVF: build 3422465
VIDEO: [H264] 1280x720 24bpp 24.000 fps 1157.8 kbps (141.3 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:1280x720 fps:24.000 ftime:=0.0417
Clip info:

major_brand: isom
minor_version: 1
compatible_brands: isom

get_path('sub/') -> '/Users/astrange/.mplayer/sub/'
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
dvdsublang...5cm en
X11 opening display: /tmp/launch-NqmfR5/org.x:0
Xlib: extension "XFree86-VidModeExtension" missing on display "/tmp/launch-NqmfR5/org.x:0".
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1440x878 with depth 24 and 32 bpp ("/tmp/launch-NqmfR5/org.x:0" => remote display)
[x11] Unknown wm type...
[x11] Current fstype setting doesn't honour any X atoms
[gl] GLX chose visual with ID 0x7a
[gl] Running on OpenGL by 'NVIDIA Corporation', versions '2.1 NVIDIA-1.6.10'
[gl] Settings after autodetection: ati-hack = 0, force-pbo = 0, rectangle = 0, yuv = 2
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
[gl] Using 0 as slice height (0 means image height).
[vo] query(Planar YV12) -> 3
Couldn't open video filter 'ass'.
ASS: cannot add video filter
[ass] Init
get_path('fonts') -> '/Users/astrange/.mplayer/fonts'
get_path('subfont.ttf') -> '/Users/astrange/.mplayer/subfont.ttf'
[ass] Updating font cache
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "aac" init OK!
AUDIO: 44100 Hz, 2 ch, s16le, 129.1 kbit/9.15% (ratio: 16139->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying every known audio driver...
AO: [coreaudio] init([44100Hz][2ch][s16le][0])
AO: [coreaudio] source: 44100.0Hz 16bit [lpcm][12][4][1][4][2] int LE S packed
AO: [coreaudio] using 44 chunks of 4096 bytes (buffer len 180224 bytes)
AO: [coreaudio] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: Darwin/Mac OS X native audio output
AO: Author: Timothy J. Wood & Dan Christiansen & Chris Roccati
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 65536
[h264 @ 0x100aea9e0]no picture
[h264 @ 0x100aea9e0]no picture
[ffmpeg] aspect_ratio: 0.000000
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (1280x720->1280x720,flags=0,'MPlayer',0x32315659)
VO: [gl] 1280x720 => 1280x720 Planar YV12
VO: Description: OpenGL
VO: Author: Reimar Doeffinger <Reimar.Doeffinger@…>
[gl] GLX chose visual with ID 0x7a
[gl] Running on OpenGL by 'NVIDIA Corporation', versions '2.1 NVIDIA-1.6.10'
[gl] Settings after autodetection: ati-hack = 0, force-pbo = 0, rectangle = 0, yuv = 2
[gl] Creating 2048x1024 texture...
[gl] Resize: 1280x720
* [vo] Exporting mp_image_t, 1280x720x12bpp YUV planar, 1382400 bytes

Attachments (1)

Screen shot 2010-05-10 at 6.08.00 AM.png (456.4 KB ) - added by astrange@… 15 years ago.
screenshot

Download all attachments as: .zip

Change History (7)

by astrange@…, 15 years ago

screenshot

comment:1 by astrange@…, 15 years ago

comment:2 by astrange@…, 14 years ago

X11 bug. The GL driver doesn't have a 24-bit format; X11 thinks it does but picks a 16-bit one instead. Requesting GL_ALPHA_BITS >=1 from glXChooseVisual fixes it but seems unoptimal for other cards.

comment:3 by compn, 14 years ago

Owner: changed from beastd to reimar

comment:4 by reimar, 14 years ago

Resolution: invalid
Status: newclosed

rectangle=2 is not chosen because I've only seen it being (a lot) slower, but I've never seen a case where it was faster.
It would save a lot if we were using glTexImage instead of glTexSubImage, however contrary to what every claims I also have _never_ seen glTexImage being faster than glTexSubImage either.
And yes the documentation clearly says "the largest available red buffer of at least the minimum size is preferred", and we do not specify GLX_ALPHA_SIZE so even the conflict with the definition of a GLX_ALPHA_SIZE of 0 does not exist.
So I think there's nothing for us to do here...

comment:5 by astrange@…, 14 years ago

It turned out to be a GLX bug. GLX thinks the context it chose is 24-bit but it's actually 16-bit. The X11 guy didn't believe me when I filed a bug about it, I'll redo it sometime with more testcases.

comment:6 by reimar, 14 years ago

I find it hard to blame him for not believing it, it sounds just too ridiculous :-)

Note: See TracTickets for help on using tickets.