[MPlayer-users] Which YCbCr version does MPlayer use?

Grzegorz Borowiak gborowiak at gmail.com
Tue Feb 27 12:44:45 CET 2007


Which YCbCr version does MPlayer use in YCbCr<-->RGB conversions? BT-601 or
BT-709?

and:

Is there a function in MPlayer code that converts YCbCr to RGB and does not
clip R, G, and B to [0..255] range?
Or is there a function in MPlayer code that converts YCbCr to RGB preserving
luma (e.g. converts Y<=16, Cb=128, Cr=240 to black rather than dark red) and
hue?

I searched the sources and found only clipping functions.

I wrote some advanced colour correction filter for MPlayer, but the problem
is that video players generally show bizarre behaviour if maximum saturation
for given luma and hue is exceeded (and they are allowed - it's up to player
to handle an illegal YCbCr triplet). To counter that, by now, I convert the
resulting YCbCr to RGB by multiplication by matrix (plain x86 code does
this), find out where the [0..255] range is exceeded, then clip saturation
by proportional reduction of Cb and Cr; this leaves luma and hue unchanged.
However, this method is a placeholder, because it is ineffective - the whole
clipping is much more CPU-consuming than actual colour correction. I need
some faster replacement, and those function in question would help me much.

Grzegorz Borowiak



More information about the MPlayer-users mailing list