Commit 91de062f authored by Luca Bonissi's avatar Luca Bonissi Committed by Mauro Carvalho Chehab

[media] gspca_vc032x: Fix wrong bytesperline

I found a problem on vc032x gspca usb webcam subdriver: "bytesperline"
property is wrong for YUYV and YVYU formats.
With recent v4l-utils library (>=0.9.1), that uses "bytesperline" for
pixel format conversion, the result is a wrong jerky image.

Patch tested on my laptop (USB webcam Logitech Orbicam 046d:0892).

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=91181Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent c7e5a726
...@@ -68,12 +68,12 @@ enum sensors { ...@@ -68,12 +68,12 @@ enum sensors {
static const struct v4l2_pix_format vc0321_mode[] = { static const struct v4l2_pix_format vc0321_mode[] = {
{320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320 * 2,
.sizeimage = 320 * 240 * 2, .sizeimage = 320 * 240 * 2,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1}, .priv = 1},
{640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
.bytesperline = 640, .bytesperline = 640 * 2,
.sizeimage = 640 * 480 * 2, .sizeimage = 640 * 480 * 2,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0}, .priv = 0},
...@@ -97,17 +97,17 @@ static const struct v4l2_pix_format vc0323_mode[] = { ...@@ -97,17 +97,17 @@ static const struct v4l2_pix_format vc0323_mode[] = {
}; };
static const struct v4l2_pix_format bi_mode[] = { static const struct v4l2_pix_format bi_mode[] = {
{320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320 * 2,
.sizeimage = 320 * 240 * 2, .sizeimage = 320 * 240 * 2,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 2}, .priv = 2},
{640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
.bytesperline = 640, .bytesperline = 640 * 2,
.sizeimage = 640 * 480 * 2, .sizeimage = 640 * 480 * 2,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1}, .priv = 1},
{1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, {1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
.bytesperline = 1280, .bytesperline = 1280 * 2,
.sizeimage = 1280 * 1024 * 2, .sizeimage = 1280 * 1024 * 2,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0}, .priv = 0},
......
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