Commit 9b1d3cae authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

V4L/DVB: gspca - sn9c20x: Better image sizes

When compressed, the images take less than one byte per pixel.
Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b1e4665b
...@@ -348,7 +348,7 @@ static const struct ctrl sd_ctrls[] = { ...@@ -348,7 +348,7 @@ static const struct ctrl sd_ctrls[] = {
static const struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 240 * 120, .sizeimage = 160 * 120 * 4 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0 | MODE_JPEG}, .priv = 0 | MODE_JPEG},
{160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -363,7 +363,7 @@ static const struct v4l2_pix_format vga_mode[] = { ...@@ -363,7 +363,7 @@ static const struct v4l2_pix_format vga_mode[] = {
.priv = 0}, .priv = 0},
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 480 * 240 , .sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1 | MODE_JPEG}, .priv = 1 | MODE_JPEG},
{320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -378,7 +378,7 @@ static const struct v4l2_pix_format vga_mode[] = { ...@@ -378,7 +378,7 @@ static const struct v4l2_pix_format vga_mode[] = {
.priv = 1}, .priv = 1},
{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640, .bytesperline = 640,
.sizeimage = 960 * 480, .sizeimage = 640 * 480 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 2 | MODE_JPEG}, .priv = 2 | MODE_JPEG},
{640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -396,7 +396,7 @@ static const struct v4l2_pix_format vga_mode[] = { ...@@ -396,7 +396,7 @@ static const struct v4l2_pix_format vga_mode[] = {
static const struct v4l2_pix_format sxga_mode[] = { static const struct v4l2_pix_format sxga_mode[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 240 * 120, .sizeimage = 160 * 120 * 4 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0 | MODE_JPEG}, .priv = 0 | MODE_JPEG},
{160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -411,7 +411,7 @@ static const struct v4l2_pix_format sxga_mode[] = { ...@@ -411,7 +411,7 @@ static const struct v4l2_pix_format sxga_mode[] = {
.priv = 0}, .priv = 0},
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 480 * 240 , .sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1 | MODE_JPEG}, .priv = 1 | MODE_JPEG},
{320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -426,7 +426,7 @@ static const struct v4l2_pix_format sxga_mode[] = { ...@@ -426,7 +426,7 @@ static const struct v4l2_pix_format sxga_mode[] = {
.priv = 1}, .priv = 1},
{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640, .bytesperline = 640,
.sizeimage = 960 * 480, .sizeimage = 640 * 480 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 2 | MODE_JPEG}, .priv = 2 | MODE_JPEG},
{640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
...@@ -441,7 +441,7 @@ static const struct v4l2_pix_format sxga_mode[] = { ...@@ -441,7 +441,7 @@ static const struct v4l2_pix_format sxga_mode[] = {
.priv = 2}, .priv = 2},
{1280, 1024, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {1280, 1024, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 1280, .bytesperline = 1280,
.sizeimage = (1280 * 1024) + 64, .sizeimage = 1280 * 1024,
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 3 | MODE_RAW | MODE_SXGA}, .priv = 3 | MODE_RAW | MODE_SXGA},
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment