diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2019-04-08 08:32:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-04-22 12:10:52 -0400 |
commit | 01ba2e65e445d9cc5fb87ba1136f7b693dfb92dc (patch) | |
tree | 49ac4e8d7c6b29b868548aa9e19e6bb2d8b817f9 /drivers/media/platform | |
parent | b03abe535d3734601d2e926b2f5e31745b29825b (diff) | |
download | linux-01ba2e65e445d9cc5fb87ba1136f7b693dfb92dc.tar.bz2 |
media: coda: allow encoder to set colorimetry on the output queue
v4l2-compliance sets colorimetry on the output queue and then verifies
that querying colorimetry on the capture queue returns the same
configuration. For this to work, the encoder must allow setting context
colorimetry parameters on the output queue.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 943f003c26c4..a89d92f5539f 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -819,6 +819,11 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, if (ret) return ret; + ctx->colorspace = f->fmt.pix.colorspace; + ctx->xfer_func = f->fmt.pix.xfer_func; + ctx->ycbcr_enc = f->fmt.pix.ycbcr_enc; + ctx->quantization = f->fmt.pix.quantization; + if (ctx->inst_type != CODA_INST_DECODER) return 0; @@ -831,11 +836,6 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, } ctx->codec = codec; - ctx->colorspace = f->fmt.pix.colorspace; - ctx->xfer_func = f->fmt.pix.xfer_func; - ctx->ycbcr_enc = f->fmt.pix.ycbcr_enc; - ctx->quantization = f->fmt.pix.quantization; - dst_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); if (!dst_vq) return -EINVAL; |