wrong white and black levels in xv with i810

Bug #105656 reported by jojo4u
6
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Medium
xserver-xorg-video-intel (Ubuntu)
Fix Released
Wishlist
Bryce Harrington

Bug Description

Binary package hint: xserver-xorg-video-i810

I have an issue with correct black and white levels with Xubuntu/Ubuntu. The most visible symptom is a greyish black in movies.

As introduction a quote from Wikipedia:
Blacker-than-Black - PC RGB, 100% black starts off at 0 and 100% is at 255. Studio RGB, 100% black is at 16, and 100% white is at 235. Anything lower than 16, say from 0 - 15, that's below black, and anything higher than 235, from 236 - 255, that's above white.

I have attached I zip published by Mark Sydow[1] which shows wether you are affected. For convinience, I attached it to this post.
Play the file VTS_01_1.VOB with your favorite media player - I'm using mplayer. Pause on the first black screen. If you own a CRT, crank up the brightness. If you own a TFT, adjust contrast so that the dim white greay are distinguishable.
If I set video output to gl or x11 and play the attached VTS_01_1.VOB everything below level 16 (reference black) is as black as the background. This happens, because the levels 16...235 are expanded to 0...255. If I set video output to xv, I can see bars all the way down to 0, making black in most movies look greyish.
The natural solution to this problem is to adjust you screen, but you can't do this with a machine which is not complety dedicated to video presentation.

Under Windows, this problem was introduced with VMR9 and there are quite a few solutions:
1. video driver update
2. forcing RGB or adjust within FFDShow
3. use AVISynth
4. use a shader for Media Player Classic
Unfortunately, none of this options are available for Linux.

The "ATI Radeon Video Overlay" driver supplies the variable XV_COLORSPACE acessible by xvattr, the i810 does not have this option. gxine exhibits the same behaviour, vlc is wrong at all devices.
So, how to fix? Am I stuck to x11/gl?

setup:
Xubuntu edgy
X 7.1.1ubuntu6.2
i810 1.6.5
mplayer 0.99+1.0pre8-0ubuntu8
Intel i945GM chipset
1024x768 24 bit
DRI enabled

[1] http://www.avsforum.com/avs-vb/showthread.php?p=5525270&&#post5525270

Revision history for this message
jojo4u (bugzilla-freedom-x) wrote :
Revision history for this message
unggnu (unggnu) wrote :

Could you please recheck it with Gutsy Final Live CD? In Gutsy i810 driver is deprecated and intel driver is used instead.
Btw. I am not sure but this report seems similar to bug #32963.

Changed in xserver-xorg-video-i810:
status: New → Incomplete
Revision history for this message
jojo4u (bugzilla-freedom-x) wrote :

Problem still present in gutsy. This is a missing upstream feature and more subtle than bug #32963. Gamma and constrast are fine on my machine.

xserver-xorg-video-intel: 2:2.1.1-0ubuntu9
xserver-xorg: 1:7.2-5ubuntu13

unggnu (unggnu)
Changed in xserver-xorg-video-i810:
status: Incomplete → New
Revision history for this message
Jeffrey Baker (jwbaker) wrote :

I have the same version of the driver on gutsy (2.1.1) and blacker-than-black checks out fine with all three gl, x11, and xv.

Revision history for this message
jojo4u (bugzilla-freedom-x) wrote :

Jeffrey: interesting! You use mplayer and which version? What intel graphics hardware do you have?

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

jojo4u, before I forward this request upstream, can you provide the Wikipedia link for the quote you provided? I did a cursory search but couldn't find it.

Changed in xserver-xorg-video-intel:
status: Confirmed → Incomplete
Revision history for this message
jojo4u (bugzilla-freedom-x) wrote :

Bryce, it got deleted from http://en.wikipedia.org/wiki/BTB (see [1]). About upstream: I wrote on the xorg mailing list[2]. There where two replies but I didn't come to look into it. From my experience, though, building the intel driver is not easy. Robert says, it should be fixed on 2.2, so we might wait for Hardy.

[1] http://en.wikipedia.org/w/index.php?title=BTB&oldid=158138747
[2] http://lists.freedesktop.org/archives/xorg/2007-December/031330.html

Revision history for this message
Bryce Harrington (bryce) wrote :

From the link:
"Blacker-than-Black - PC RGB, 100% black starts off at 0 and 100% is at 255. Studio RGB, 100% black is at 16, and 100% white is at 235. Anything lower than 16, say from 0 - 15, that's below black, and anything higher than 235, from 236 - 255, that's above white. If the dvd player inaccuratedly decodes sRGB to PC RGB level, it clips below black (0-15) and above white (236 - 255). This means the darker shades of gray and brighter white will not show. Instead it will look very dark gray. Anything that are lower than 16 will be clipped as 16 and anything higher than 235 will be clipped as 235."

Changed in xserver-xorg-video-intel:
status: Incomplete → Triaged
Revision history for this message
David Schleef (dschleef) wrote :

I fixed this recently in https://bugs.freedesktop.org/show_bug.cgi?id=15219

Please apply this before the hardy release. It annoys the crap out of me, now that the textured overlay is disabled by default. :)

Revision history for this message
David Schleef (dschleef) wrote :

As a workaround, run:

xvattr -a XV_BRIGHTNESS -v -19
xvattr -a XV_CONTRAST -v 75
xvattr -a XV_SATURATION -v 146

unggnu (unggnu)
Changed in xserver-xorg-video-intel:
status: New → Unknown
Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Changed in xserver-xorg-video-intel:
status: Confirmed → In Progress
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi David,

Thanks for proposing a patch upstream. I think I'd like to wait until upstream has reached a solution they are happy with, even if it may mean postponing the patch to Hardy. Wang Zhenyu mentioned that some aspects may not be supported on older intel chips, which we definitely care about (we're working hard to try to get everyone finally off of -i810, which is still needed for some early 8xx cards), so want to avoid anything that would risk setting us back for Hardy. With Intrepid we'll be a bit more open to experimentation. But hopefully upstream will find a solution that they are 100% comfortable committing to their tree in time for us to cherry pick for hardy.

Changed in xserver-xorg-video-intel:
status: In Progress → Fix Released
Revision history for this message
jojo4u (bugzilla-freedom-x) wrote :

I applied the patch from David on xserver-xorg-video-intel_2.2.1-1ubuntu13_i386 and the levels seem all good now - thanks David! Eric committed the change, so let's hope it will make it into intrepid! This would be one package less in my local repo ;)

unggnu (unggnu)
Changed in xserver-xorg-video-intel:
assignee: nobody → bryceharrington
Revision history for this message
Bryce Harrington (bryce) wrote :

Should be in intrepid by now.

Changed in xserver-xorg-video-intel:
status: Triaged → Fix Released
Changed in xserver-xorg-video-intel:
importance: Unknown → Medium
Changed in xserver-xorg-video-intel:
importance: Medium → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.