Skip to contentSkip to conversation

Patch: gspca-spca501-imagesize.patch

PATCH Hans de Goede 1 participant 1 message Jul 15, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi,

When moving the imagesize calculation to the subdrivers, an error was introduced in the bufsize calculation for the spca501, causing the driver to no longer work, this patch fixes this.

Regards,

Hans

When moving the imagesize calculation to the subdrivers, an error was introduced in the bufsize calculation for the spca501, causing the driver to no longer work, this patch fixes this.

linux/drivers/media/video/gspca/spca501.c +3 -3
diff -r 2022d9f2fb55 linux/drivers/media/video/gspca/spca501.c
@@ -104,17 +104,17 @@
 static struct v4l2_pix_format vga_mode[] = {
 	{160, 120, V4L2_PIX_FMT_SPCA501, V4L2_FIELD_NONE,
 		.bytesperline = 160,
-		.sizeimage = 160 * 120 * 3 / 8,
+		.sizeimage = 160 * 120 * 3 / 2,
 		.colorspace = V4L2_COLORSPACE_SRGB,
 		.priv = 2},
 	{320, 240, V4L2_PIX_FMT_SPCA501, V4L2_FIELD_NONE,
 		.bytesperline = 320,
-		.sizeimage = 320 * 240 * 3 / 8,
+		.sizeimage = 320 * 240 * 3 / 2,
 		.colorspace = V4L2_COLORSPACE_SRGB,
 		.priv = 1},
 	{640, 480, V4L2_PIX_FMT_SPCA501, V4L2_FIELD_NONE,
 		.bytesperline = 640,
-		.sizeimage = 640 * 480 * 3 / 8,
+		.sizeimage = 640 * 480 * 3 / 2,
 		.colorspace = V4L2_COLORSPACE_SRGB,
 		.priv = 0},
 };

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list