diff options
author | Luca Bonissi <lucabon@scarsita.it> | 2015-01-26 05:38:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-01-29 15:28:46 -0500 |
commit | 91de062f50c969d1613dd9881c275e58f228b3ac (patch) | |
tree | 081fd3affbfda536b5bc6fd2a74073d8916fe059 /drivers/media/usb | |
parent | c7e5a726d5fbf453c49fc8326a6580402643c900 (diff) |
[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=91181
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/gspca/vc032x.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/usb/gspca/vc032x.c b/drivers/media/usb/gspca/vc032x.c index c00ac57de510..b4efb2fb36fa 100644 --- a/drivers/media/usb/gspca/vc032x.c +++ b/drivers/media/usb/gspca/vc032x.c | |||
@@ -68,12 +68,12 @@ enum sensors { | |||
68 | 68 | ||
69 | static const struct v4l2_pix_format vc0321_mode[] = { | 69 | static const struct v4l2_pix_format vc0321_mode[] = { |
70 | {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, | 70 | {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, |
71 | .bytesperline = 320, | 71 | .bytesperline = 320 * 2, |
72 | .sizeimage = 320 * 240 * 2, | 72 | .sizeimage = 320 * 240 * 2, |
73 | .colorspace = V4L2_COLORSPACE_SRGB, | 73 | .colorspace = V4L2_COLORSPACE_SRGB, |
74 | .priv = 1}, | 74 | .priv = 1}, |
75 | {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, | 75 | {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, |
76 | .bytesperline = 640, | 76 | .bytesperline = 640 * 2, |
77 | .sizeimage = 640 * 480 * 2, | 77 | .sizeimage = 640 * 480 * 2, |
78 | .colorspace = V4L2_COLORSPACE_SRGB, | 78 | .colorspace = V4L2_COLORSPACE_SRGB, |
79 | .priv = 0}, | 79 | .priv = 0}, |
@@ -97,17 +97,17 @@ static const struct v4l2_pix_format vc0323_mode[] = { | |||
97 | }; | 97 | }; |
98 | static const struct v4l2_pix_format bi_mode[] = { | 98 | static const struct v4l2_pix_format bi_mode[] = { |
99 | {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, | 99 | {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
100 | .bytesperline = 320, | 100 | .bytesperline = 320 * 2, |
101 | .sizeimage = 320 * 240 * 2, | 101 | .sizeimage = 320 * 240 * 2, |
102 | .colorspace = V4L2_COLORSPACE_SRGB, | 102 | .colorspace = V4L2_COLORSPACE_SRGB, |
103 | .priv = 2}, | 103 | .priv = 2}, |
104 | {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, | 104 | {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
105 | .bytesperline = 640, | 105 | .bytesperline = 640 * 2, |
106 | .sizeimage = 640 * 480 * 2, | 106 | .sizeimage = 640 * 480 * 2, |
107 | .colorspace = V4L2_COLORSPACE_SRGB, | 107 | .colorspace = V4L2_COLORSPACE_SRGB, |
108 | .priv = 1}, | 108 | .priv = 1}, |
109 | {1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, | 109 | {1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
110 | .bytesperline = 1280, | 110 | .bytesperline = 1280 * 2, |
111 | .sizeimage = 1280 * 1024 * 2, | 111 | .sizeimage = 1280 * 1024 * 2, |
112 | .colorspace = V4L2_COLORSPACE_SRGB, | 112 | .colorspace = V4L2_COLORSPACE_SRGB, |
113 | .priv = 0}, | 113 | .priv = 0}, |