Commit 01ba2e65 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

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: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent b03abe53
...@@ -819,6 +819,11 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, ...@@ -819,6 +819,11 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv,
if (ret) if (ret)
return 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) if (ctx->inst_type != CODA_INST_DECODER)
return 0; return 0;
...@@ -831,11 +836,6 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, ...@@ -831,11 +836,6 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv,
} }
ctx->codec = codec; 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); dst_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);
if (!dst_vq) if (!dst_vq)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment