Skip to content

Commit

Permalink
[media] s2255drv: adding MJPEG format
Browse files Browse the repository at this point in the history
adding MJPEG format

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sensoray Linux Development authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent b01ff50 commit d0ef854
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d0ef854

Please sign in to comment.