This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: imx: utils: Default colorspace to SRGB
Author:  Steve Longerbeam <slongerb...@gmail.com>
Date:    Tue Apr 21 18:29:40 2020 +0200

The function imx_media_init_mbus_fmt() initializes the imx subdevice
mbus colorimetry to some sane defaults when the subdevice is registered.
Currently it guesses at a colorspace based on the passed mbus pixel
format. If the format is RGB, it chooses colorspace V4L2_COLORSPACE_SRGB,
and if the format is YUV, it chooses V4L2_COLORSPACE_SMPTE170M.

While that might be a good guess, it's not necessarily true that a RGB
pixel format encoding uses a SRGB colorspace, or that a YUV encoding
uses a SMPTE170M colorspace. Instead of making this dubious guess,
just default the colorspace to SRGB.

Reported-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Signed-off-by: Steve Longerbeam <slongerb...@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+hua...@kernel.org>

 drivers/staging/media/imx/imx-media-utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

---

diff --git a/drivers/staging/media/imx/imx-media-utils.c 
b/drivers/staging/media/imx/imx-media-utils.c
index 42e64b618a61..4ba6a5310f76 100644
--- a/drivers/staging/media/imx/imx-media-utils.c
+++ b/drivers/staging/media/imx/imx-media-utils.c
@@ -388,8 +388,7 @@ int imx_media_init_mbus_fmt(struct v4l2_mbus_framefmt *mbus,
 
        mbus->code = code;
 
-       mbus->colorspace = (lcc->cs == IPUV3_COLORSPACE_RGB) ?
-               V4L2_COLORSPACE_SRGB : V4L2_COLORSPACE_SMPTE170M;
+       mbus->colorspace = V4L2_COLORSPACE_SRGB;
        mbus->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(mbus->colorspace);
        mbus->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(mbus->colorspace);
        mbus->quantization =

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to