Commit d0ef8540 authored by Sensoray Linux Development's avatar Sensoray Linux Development Committed by Mauro Carvalho Chehab

[media] s2255drv: adding MJPEG format

adding MJPEG format
Signed-off-by: default avatarDean Anderson <linux-dev@sensoray.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b01ff500
......@@ -432,6 +432,10 @@ static const struct s2255_fmt formats[] = {
.name = "JPG",
.fourcc = V4L2_PIX_FMT_JPEG,
.depth = 24
}, {
.name = "MJPG",
.fourcc = V4L2_PIX_FMT_MJPEG,
.depth = 24
}, {
.name = "8bpp GREY",
.fourcc = V4L2_PIX_FMT_GREY,
......@@ -653,6 +657,7 @@ static void s2255_fillbuff(struct s2255_channel *channel,
memcpy(vbuf, tmpbuf, buf->vb.width * buf->vb.height);
break;
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_MJPEG:
buf->vb.size = jpgsize;
memcpy(vbuf, tmpbuf, buf->vb.size);
break;
......@@ -1037,6 +1042,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
mode.color |= COLOR_Y8;
break;
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_MJPEG:
mode.color &= ~MASK_COLOR;
mode.color |= COLOR_JPG;
mode.color |= (channel->jc.quality << 8);
......
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