[media] vivid-tpg.c: fix wrong Bt.2020 coefficients
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 20 Mar 2015 16:23:06 +0000 (13:23 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 3 Apr 2015 01:08:19 +0000 (22:08 -0300)
Mistyping 0.2627 as 0.2726 I can understand, but -0.4598 as -0.4629? No idea how
I managed that. Anyway, these coefficients are now correct again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-tpg.c

index 9656e4dbd5e7557637654197416cd01a3cad9e75..cb766eb154e71eff55004bbf0e667fc44964dde7 100644 (file)
@@ -480,9 +480,9 @@ static void color_to_ycbcr(struct tpg_data *tpg, int r, int g, int b,
                { COEFF(0.5, 224),    COEFF(-0.445, 224), COEFF(-0.055, 224) },
        };
        static const int bt2020[3][3] = {
-               { COEFF(0.2726, 219),  COEFF(0.6780, 219),  COEFF(0.0593, 219)  },
+               { COEFF(0.2627, 219),  COEFF(0.6780, 219),  COEFF(0.0593, 219)  },
                { COEFF(-0.1396, 224), COEFF(-0.3604, 224), COEFF(0.5, 224)     },
-               { COEFF(0.5, 224),     COEFF(-0.4629, 224), COEFF(-0.0405, 224) },
+               { COEFF(0.5, 224),     COEFF(-0.4598, 224), COEFF(-0.0402, 224) },
        };
        bool full = tpg->real_quantization == V4L2_QUANTIZATION_FULL_RANGE;
        unsigned y_offset = full ? 0 : 16;