Commit fc5ec930 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Do not follow the color matrix path that makes it look red

For some reason, GST_VIDEO_COLOR_MATRIX_BT709 seems to be requested for
some cameras unnecessarily.
I can see this addressing using it with ElGato CamLink 4K together with
a Sony a5100.

BUG: 424193
parent a7fdf5d8
......@@ -382,12 +382,15 @@ void VideoMaterial::updateColors(int brightness, int contrast, int hue, int satu
switch (m_colorMatrixType) {
case GST_VIDEO_COLOR_MATRIX_BT709:
m_colorMatrix *= QMatrix4x4(
1.164, 0.000, 1.793, -0.5727,
1.164, -0.534, -0.213, 0.3007,
1.164, 2.115, 0.000, -1.1302,
0.0, 0.000, 0.000, 1.0000);
break;
// With some webcams I see the matrix type falling here, I'm not sure
// if it's a problem with the driver but it seems to happen on some
// hardware.
// m_colorMatrix *= QMatrix4x4(
// 1.164, 0.000, 1.793, -0.5727,
// 1.164, -0.534, -0.213, 0.3007,
// 1.164, 2.115, 0.000, -1.1302,
// 0.0, 0.000, 0.000, 1.0000);
// break;
case GST_VIDEO_COLOR_MATRIX_BT601:
m_colorMatrix *= QMatrix4x4(
1.164, 0.000, 1.596, -0.8708,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment