brcm2708: update against latest rpi-3.10.y branch
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.10 / 0142-V4L2-Enable-MJPEG-encoding.patch
1 From 9878725ea0cedbc79d962e0ac041acdc1135d79c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dsteve@broadcom.com>
3 Date: Mon, 23 Dec 2013 15:42:21 +0000
4 Subject: [PATCH 142/174] V4L2: Enable MJPEG encoding
5
6 Requires GPU firmware update to support MJPEG encoder.
7
8 Signed-off-by: Dave Stevenson <dsteve@broadcom.com>
9 ---
10 drivers/media/platform/bcm2835/bcm2835-camera.c | 7 +++++++
11 drivers/media/platform/bcm2835/mmal-encodings.h | 1 +
12 2 files changed, 8 insertions(+)
13
14 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c
15 +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
16 @@ -100,6 +100,13 @@ static struct mmal_fmt formats[] = {
17 .mmal = MMAL_ENCODING_H264,
18 .depth = 8,
19 .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
20 + },
21 + {
22 + .name = "MJPEG",
23 + .fourcc = V4L2_PIX_FMT_MJPEG,
24 + .mmal = MMAL_ENCODING_MJPEG,
25 + .depth = 8,
26 + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
27 }
28 };
29
30 --- a/drivers/media/platform/bcm2835/mmal-encodings.h
31 +++ b/drivers/media/platform/bcm2835/mmal-encodings.h
32 @@ -27,6 +27,7 @@
33 #define MMAL_ENCODING_VP6 MMAL_FOURCC('V', 'P', '6', ' ')
34 #define MMAL_ENCODING_THEORA MMAL_FOURCC('T', 'H', 'E', 'O')
35 #define MMAL_ENCODING_SPARK MMAL_FOURCC('S', 'P', 'R', 'K')
36 +#define MMAL_ENCODING_MJPEG MMAL_FOURCC('M', 'J', 'P', 'G')
37
38 #define MMAL_ENCODING_JPEG MMAL_FOURCC('J', 'P', 'E', 'G')
39 #define MMAL_ENCODING_GIF MMAL_FOURCC('G', 'I', 'F', ' ')