[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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Hans Verkuil 2015-03-07 12:53:39 -03:00 committed by Mauro Carvalho Chehab
parent 1a05d3133f
commit 9c35bd48d5

View file

@ -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;
}
/*