All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.