diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2019-05-21 18:03:17 -0700 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2019-06-14 15:33:02 +0200 |
commit | 4791bd7d6adc406e12e4f69588ef201d39c3d8ac (patch) | |
tree | cda3576e8b66ec29b0f8d6257a79a6c6d669f07a /drivers/staging/media/imx/imx-ic-prpencvf.c | |
parent | 614014cfc148031df2ce49fa93740ae9770ae339 (diff) | |
download | linux-stable-4791bd7d6adc406e12e4f69588ef201d39c3d8ac.tar.gz linux-stable-4791bd7d6adc406e12e4f69588ef201d39c3d8ac.tar.bz2 linux-stable-4791bd7d6adc406e12e4f69588ef201d39c3d8ac.zip |
media: imx: Try colorimetry at both sink and source pads
Retask imx_media_fill_default_mbus_fields() to try colorimetry parameters,
renaming it to to imx_media_try_colorimetry(), and call it at both sink and
source pad try_fmt's. The unrelated check for uninitialized field value is
moved out to appropriate places in each subdev try_fmt.
The IC now supports Rec.709 and BT.601 Y'CbCr encoding, and both limited
and full range quantization for both YUV and RGB space, so allow those
for pipelines that route through the IC.
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/staging/media/imx/imx-ic-prpencvf.c')
-rw-r--r-- | drivers/staging/media/imx/imx-ic-prpencvf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index e8b36a181ccc..f2fe3c11c70e 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -907,8 +907,6 @@ static void prp_try_fmt(struct prp_priv *priv, /* propagate colorimetry from sink */ sdformat->format.colorspace = infmt->colorspace; sdformat->format.xfer_func = infmt->xfer_func; - sdformat->format.quantization = infmt->quantization; - sdformat->format.ycbcr_enc = infmt->ycbcr_enc; } else { v4l_bound_align_image(&sdformat->format.width, MIN_W_SINK, MAX_W_SINK, W_ALIGN_SINK, @@ -916,9 +914,11 @@ static void prp_try_fmt(struct prp_priv *priv, MIN_H_SINK, MAX_H_SINK, H_ALIGN_SINK, S_ALIGN); - imx_media_fill_default_mbus_fields(&sdformat->format, infmt, - true); + if (sdformat->format.field == V4L2_FIELD_ANY) + sdformat->format.field = V4L2_FIELD_NONE; } + + imx_media_try_colorimetry(&sdformat->format, true); } static int prp_set_fmt(struct v4l2_subdev *sd, |