mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[media] gspca_xirlink_cit: Frames have a 4 byte footer
At least on the ibm netcam pro frames have a 4 byte footer, take this into account when calculating sizeimage. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
bc46bae637
commit
2c4e776aa3
1 changed files with 12 additions and 12 deletions
|
@ -185,60 +185,60 @@ static const struct ctrl sd_ctrls[] = {
|
||||||
static const struct v4l2_pix_format cif_yuv_mode[] = {
|
static const struct v4l2_pix_format cif_yuv_mode[] = {
|
||||||
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 176,
|
.bytesperline = 176,
|
||||||
.sizeimage = 176 * 144 * 3 / 2,
|
.sizeimage = 176 * 144 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{352, 288, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{352, 288, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 352,
|
.bytesperline = 352,
|
||||||
.sizeimage = 352 * 288 * 3 / 2,
|
.sizeimage = 352 * 288 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct v4l2_pix_format vga_yuv_mode[] = {
|
static const struct v4l2_pix_format vga_yuv_mode[] = {
|
||||||
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 160,
|
.bytesperline = 160,
|
||||||
.sizeimage = 160 * 120 * 3 / 2,
|
.sizeimage = 160 * 120 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{320, 240, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{320, 240, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 320,
|
.bytesperline = 320,
|
||||||
.sizeimage = 320 * 240 * 3 / 2,
|
.sizeimage = 320 * 240 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{640, 480, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{640, 480, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 640,
|
.bytesperline = 640,
|
||||||
.sizeimage = 640 * 480 * 3 / 2,
|
.sizeimage = 640 * 480 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct v4l2_pix_format model0_mode[] = {
|
static const struct v4l2_pix_format model0_mode[] = {
|
||||||
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 160,
|
.bytesperline = 160,
|
||||||
.sizeimage = 160 * 120 * 3 / 2,
|
.sizeimage = 160 * 120 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 176,
|
.bytesperline = 176,
|
||||||
.sizeimage = 176 * 144 * 3 / 2,
|
.sizeimage = 176 * 144 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{320, 240, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{320, 240, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 320,
|
.bytesperline = 320,
|
||||||
.sizeimage = 320 * 240 * 3 / 2,
|
.sizeimage = 320 * 240 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct v4l2_pix_format model2_mode[] = {
|
static const struct v4l2_pix_format model2_mode[] = {
|
||||||
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{160, 120, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 160,
|
.bytesperline = 160,
|
||||||
.sizeimage = 160 * 120 * 3 / 2,
|
.sizeimage = 160 * 120 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
{176, 144, V4L2_PIX_FMT_CIT_YYVYUY, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 176,
|
.bytesperline = 176,
|
||||||
.sizeimage = 176 * 144 * 3 / 2,
|
.sizeimage = 176 * 144 * 3 / 2 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{320, 240, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
|
{320, 240, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 320,
|
.bytesperline = 320,
|
||||||
.sizeimage = 320 * 240,
|
.sizeimage = 320 * 240 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
{352, 288, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
|
{352, 288, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
|
||||||
.bytesperline = 352,
|
.bytesperline = 352,
|
||||||
.sizeimage = 352 * 288,
|
.sizeimage = 352 * 288 + 4,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB},
|
.colorspace = V4L2_COLORSPACE_SRGB},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue