提交 5f9826e8 编写于 作者: P Philipp Zabel 提交者: Mauro Carvalho Chehab

[media] coda: fix try_fmt_vid_out colorspace setting

v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 f77fd8a9
......@@ -592,7 +592,11 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv,
if (ret < 0)
return ret;
if (!f->fmt.pix.colorspace) {
switch (f->fmt.pix.colorspace) {
case V4L2_COLORSPACE_REC709:
case V4L2_COLORSPACE_JPEG:
break;
default:
if (f->fmt.pix.pixelformat == V4L2_PIX_FMT_JPEG)
f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册