提交 8946ab3a 编写于 作者: N Nori, Sekhar 提交者: Mauro Carvalho Chehab

[media] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video

For both BT.656 and BT.1120 video, the pixel format
used by VPIF is Y/CbCr 4:2:2 in semi-planar format
(Luma in one plane and Chroma in another). This
corresponds to NV16 pixel format.

This is documented in section 36.2.3 of OMAP-L138
Technical Reference Manual, SPRUH77A.

The VPIF driver incorrectly sets the default format
to V4L2_PIX_FMT_YUV422P. Fix it.
Reported-by: NAlejandro Hernandez <ajhernandez@ti.com>
Signed-off-by: NSekhar Nori <nsekhar@ti.com>
Acked-by: NKevin Hilman <khilman@baylibre.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 b14ac545
......@@ -513,7 +513,7 @@ static int vpif_update_std_info(struct channel_obj *ch)
if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER)
common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8;
else
common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV422P;
common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_NV16;
common->fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
......@@ -917,8 +917,8 @@ static int vpif_enum_fmt_vid_cap(struct file *file, void *priv,
fmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
} else {
fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
strcpy(fmt->description, "YCbCr4:2:2 YC Planar");
fmt->pixelformat = V4L2_PIX_FMT_YUV422P;
strcpy(fmt->description, "YCbCr4:2:2 Semi-Planar");
fmt->pixelformat = V4L2_PIX_FMT_NV16;
}
return 0;
}
......@@ -946,8 +946,8 @@ static int vpif_try_fmt_vid_cap(struct file *file, void *priv,
if (pixfmt->pixelformat != V4L2_PIX_FMT_SBGGR8)
pixfmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
} else {
if (pixfmt->pixelformat != V4L2_PIX_FMT_YUV422P)
pixfmt->pixelformat = V4L2_PIX_FMT_YUV422P;
if (pixfmt->pixelformat != V4L2_PIX_FMT_NV16)
pixfmt->pixelformat = V4L2_PIX_FMT_NV16;
}
common->fmt.fmt.pix.pixelformat = pixfmt->pixelformat;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册