[MPlayer-dev-eng] [PATCH] VDPAU: add studio level RGB output

Lauri Mylläri lauri.myllari at gmail.com
Sun Oct 11 09:07:38 CEST 2009


Attached patch modifies vo_vdpau to calculate the CSC matrix based on
desired colorspace and output levels. A new parameter "studio" is
added to request RGB values between 16-235. This is useful (or
sometimes required) for digital output to a TV or video monitor.

My previous Panasonic TV always expected studio levels and feeding it
PC level RGB lead to crushed blacks and whites. My current Pioneer
monitor has an option to select between studio and PC levels. Using
studio levels is more convenient as all input arrives on one input
through the receiver and some other devices are not capable of
outputting PC levels.

A grayscale ramp from a test DVD shows less banding when using studio
levels. This may give a slight image quality improvement.

I've left a long comment in with the CSC matrices VDPAU provides to
make it easy to compare results. Also I left in the complete matrix
showing how I calculate things. Apologies as it makes the patch a bit
ugly, but hopefully it is useful if anyone wants to modify other vo
modules to include similar functionality. The eq is disabled as I
first wanted to make sure I got the basic calculations correct.

I will add a similar eq that vo_gl uses if the idea otherwise seems ok
for inclusion. Again, comments,fixes and improvements would be
welcome.

--lauri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-vo_vdpau-studio.patch
Type: text/x-patch
Size: 5543 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20091011/e72b335f/attachment.bin>


More information about the MPlayer-dev-eng mailing list