aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0142-V4L2-Enable-MJPEG-encoding.patch
blob: 556919ced66c4504c7e3da1f068d6d6b3b09b6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 9878725ea0cedbc79d962e0ac041acdc1135d79c Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dsteve@broadcom.com>
Date: Mon, 23 Dec 2013 15:42:21 +0000
Subject: [PATCH 142/174] V4L2: Enable MJPEG encoding

Requires GPU firmware update to support MJPEG encoder.

Signed-off-by: Dave Stevenson <dsteve@broadcom.com>
---
 drivers/media/platform/bcm2835/bcm2835-camera.c | 7 +++++++
 drivers/media/platform/bcm2835/mmal-encodings.h | 1 +
 2 files changed, 8 insertions(+)

--- a/drivers/media/platform/bcm2835/bcm2835-camera.c
+++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
@@ -100,6 +100,13 @@ static struct mmal_fmt formats[] = {
 	 .mmal = MMAL_ENCODING_H264,
 	 .depth = 8,
 	 .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
+	 },
+	{
+	 .name = "MJPEG",
+	 .fourcc = V4L2_PIX_FMT_MJPEG,
+	 .mmal = MMAL_ENCODING_MJPEG,
+	 .depth = 8,
+	 .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE,
 	 }
 };
 
--- a/drivers/media/platform/bcm2835/mmal-encodings.h
+++ b/drivers/media/platform/bcm2835/mmal-encodings.h
@@ -27,6 +27,7 @@
 #define MMAL_ENCODING_VP6              MMAL_FOURCC('V', 'P', '6', ' ')
 #define MMAL_ENCODING_THEORA           MMAL_FOURCC('T', 'H', 'E', 'O')
 #define MMAL_ENCODING_SPARK            MMAL_FOURCC('S', 'P', 'R', 'K')
+#define MMAL_ENCODING_MJPEG            MMAL_FOURCC('M', 'J', 'P', 'G')
 
 #define MMAL_ENCODING_JPEG             MMAL_FOURCC('J', 'P', 'E', 'G')
 #define MMAL_ENCODING_GIF              MMAL_FOURCC('G', 'I', 'F', ' ')