Skip to content

Commit e202e51

Browse files
hverkuilmchehab
authored andcommitted
[media] vivid-tpg.c: fix wrong Bt.2020 coefficients
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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 486e56b commit e202e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/platform/vivid/vivid-tpg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,9 @@ static void color_to_ycbcr(struct tpg_data *tpg, int r, int g, int b,
480480
{ COEFF(0.5, 224), COEFF(-0.445, 224), COEFF(-0.055, 224) },
481481
};
482482
static const int bt2020[3][3] = {
483-
{ COEFF(0.2726, 219), COEFF(0.6780, 219), COEFF(0.0593, 219) },
483+
{ COEFF(0.2627, 219), COEFF(0.6780, 219), COEFF(0.0593, 219) },
484484
{ COEFF(-0.1396, 224), COEFF(-0.3604, 224), COEFF(0.5, 224) },
485-
{ COEFF(0.5, 224), COEFF(-0.4629, 224), COEFF(-0.0405, 224) },
485+
{ COEFF(0.5, 224), COEFF(-0.4598, 224), COEFF(-0.0402, 224) },
486486
};
487487
bool full = tpg->real_quantization == V4L2_QUANTIZATION_FULL_RANGE;
488488
unsigned y_offset = full ? 0 : 16;

0 commit comments

Comments
 (0)