[Cogl] Cogl-Gst and color correction

Lionel Landwerlin llandwerlin at gmail.com
Sat Jan 4 11:20:30 PST 2014


Hi there,

After looking at the hardware video decoding side of things in November,
me and a couple of people from Collabora realised there are a few
requirements to get this to work out of the box with playbin.

In summary, we need to be able to support interlaced video stream, color
balance and scaling with hardware acceleration, to prevent software
elements to be inserted into the media pipeline.

Given the fact that we're using OpenGL with Cogl, we're pretty much
covered in term of scaling.

The interlaced video stream support is a bit tricky. We have resolved
the case where no deinterlacing is required :
https://bugzilla.gnome.org/show_bug.cgi?id=719636
And we're starting to look at supporting this with shaders :
https://bugzilla.gnome.org/show_bug.cgi?id=720835

Christmas gave me a little time to spend on color correction. I have a
patch that gives us correction using shaders :
https://github.com/djdeath/cogl/commit/8f1091f26b6274722f044b09bc0fc7623d89b90b
Though this currently only works with YUV input video formats.
I'm looking at supporting this for RGB based formats as well.

My question is related to YUV <-> RGB color conversion algorithms.
Looking at the formulas we have in cogl-gst right now, I can't figure
out what specification has been used to deduce the constants in there.

My few hours spent at looking at this mostly led to wikipedia :

https://en.wikipedia.org/wiki/YUV#BT.709_and_BT.601

But none of these BT.709 or BT.601 format seem to match what we have in
cogl-gst right now.

Could anyone give me a hit on where the cogl-gst constants come from?

Cheers,

-
Lionel



More information about the Cogl mailing list