summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-03-07 12:53:39 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 20:32:58 -0300
commit9c35bd48d54345b2c89426dd2efdb33adaa0aac3 (patch)
treedb6490e9fe8ce7d20bba5524ec43831d55c74c16 /drivers/media/platform
parent1a05d3133f826c9578986d9ec6ffab64ced62a03 (diff)
downloadblackbird-op-linux-9c35bd48d54345b2c89426dd2efdb33adaa0aac3.tar.gz
blackbird-op-linux-9c35bd48d54345b2c89426dd2efdb33adaa0aac3.zip
[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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/vivid/vivid-tpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c
index 8f455681f606..145b6ff2f816 100644
--- a/drivers/media/platform/vivid/vivid-tpg.c
+++ b/drivers/media/platform/vivid/vivid-tpg.c
@@ -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;
}
/*
OpenPOWER on IntegriCloud