Commit 9c35bd48 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vivid-tpg: don't add offset when switching to monochrome

The grayscale values are still full range sRGB, so don't add the
limited range offset.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1a05d313
......@@ -530,7 +530,7 @@ static void precalculate_color(struct tpg_data *tpg, int k)
if (tpg->qual == TPG_QUAL_GRAY) {
/* Rec. 709 Luma function */
/* (0.2126, 0.7152, 0.0722) * (255 * 256) */
r = g = b = ((13879 * r + 46688 * g + 4713 * b) >> 16) + (16 << 4);
r = g = b = (13879 * r + 46688 * g + 4713 * b) >> 16;
}
/*
......
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