* [PATCH] media: gspca_vc032x - wrong bytesperline
@ 2015-01-26 10:38 Luca Bonissi
2015-01-27 23:37 ` Luca Bonissi
2015-01-28 8:11 ` Hans de Goede
0 siblings, 2 replies; 3+ messages in thread
From: Luca Bonissi @ 2015-01-26 10:38 UTC (permalink / raw)
To: Linux Media
Hi!
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).
--- drivers/media/usb/gspca/vc032x.c.orig 2014-08-04
00:25:02.000000000 +0200
+++ drivers/media/usb/gspca/vc032x.c 2015-01-12 00:28:39.423311693 +0100
@@ -68,12 +68,12 @@
static const struct v4l2_pix_format vc0321_mode[] = {
{320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
- .bytesperline = 320,
+ .bytesperline = 320 * 2,
.sizeimage = 320 * 240 * 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1},
{640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
- .bytesperline = 640,
+ .bytesperline = 640 * 2,
.sizeimage = 640 * 480 * 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0},
@@ -97,12 +97,12 @@
};
static const struct v4l2_pix_format bi_mode[] = {
{320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
- .bytesperline = 320,
+ .bytesperline = 320 * 2,
.sizeimage = 320 * 240 * 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 2},
{640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
- .bytesperline = 640,
+ .bytesperline = 640 * 2,
.sizeimage = 640 * 480 * 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1},
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: gspca_vc032x - wrong bytesperline
2015-01-26 10:38 [PATCH] media: gspca_vc032x - wrong bytesperline Luca Bonissi
@ 2015-01-27 23:37 ` Luca Bonissi
2015-01-28 8:11 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Luca Bonissi @ 2015-01-27 23:37 UTC (permalink / raw)
To: Linux Media
Sorry, forgot to include related link to kernel bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=91181
Ciao!
Luca
On 26/01/2015 11:38, Luca Bonissi wrote:
> Hi!
>
> 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).
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: gspca_vc032x - wrong bytesperline
2015-01-26 10:38 [PATCH] media: gspca_vc032x - wrong bytesperline Luca Bonissi
2015-01-27 23:37 ` Luca Bonissi
@ 2015-01-28 8:11 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2015-01-28 8:11 UTC (permalink / raw)
To: Luca Bonissi, Linux Media
Hi,
On 26-01-15 11:38, Luca Bonissi wrote:
> Hi!
>
> 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).
Thanks, I've added this patch to my gspca tree, and send a pull-req to
Mauro to get it added to 3.20 .
Regards,
Hans
>
> --- drivers/media/usb/gspca/vc032x.c.orig 2014-08-04 00:25:02.000000000 +0200
> +++ drivers/media/usb/gspca/vc032x.c 2015-01-12 00:28:39.423311693 +0100
> @@ -68,12 +68,12 @@
>
> static const struct v4l2_pix_format vc0321_mode[] = {
> {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
> - .bytesperline = 320,
> + .bytesperline = 320 * 2,
> .sizeimage = 320 * 240 * 2,
> .colorspace = V4L2_COLORSPACE_SRGB,
> .priv = 1},
> {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
> - .bytesperline = 640,
> + .bytesperline = 640 * 2,
> .sizeimage = 640 * 480 * 2,
> .colorspace = V4L2_COLORSPACE_SRGB,
> .priv = 0},
> @@ -97,12 +97,12 @@
> };
> static const struct v4l2_pix_format bi_mode[] = {
> {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
> - .bytesperline = 320,
> + .bytesperline = 320 * 2,
> .sizeimage = 320 * 240 * 2,
> .colorspace = V4L2_COLORSPACE_SRGB,
> .priv = 2},
> {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
> - .bytesperline = 640,
> + .bytesperline = 640 * 2,
> .sizeimage = 640 * 480 * 2,
> .colorspace = V4L2_COLORSPACE_SRGB,
> .priv = 1},
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-28 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 10:38 [PATCH] media: gspca_vc032x - wrong bytesperline Luca Bonissi
2015-01-27 23:37 ` Luca Bonissi
2015-01-28 8:11 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).