From: Hans Verkuil <hans.verk...@cisco.com>

The grayscale values are still full range sRGB, so don't add the
limited range offset.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
---
 drivers/media/platform/vivid/vivid-tpg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vivid/vivid-tpg.c 
b/drivers/media/platform/vivid/vivid-tpg.c
index e2af384..c1476a2 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;
        }
 
        /*
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to