b2ac1c3fa932806eeec7cf5f8293ba806c0c91af
[openwrt/staging/stintel.git] /
1 From df55c9751bddc12633eecb01d233ca775b111dc4 Mon Sep 17 00:00:00 2001
2 From: soyer <soyer@irl.hu>
3 Date: Sat, 23 Oct 2021 12:23:50 +0200
4 Subject: [PATCH] staging/bcm2835-camera: Add support for H264_MIN_QP,
5 H264_MAX_QP
6
7 Signed-off-by: Gergo Koteles <soyer@irl.hu>
8 ---
9 .../bcm2835-camera/bcm2835-camera.h | 2 +-
10 .../vc04_services/bcm2835-camera/controls.c | 22 +++++++++++++++++++
11 2 files changed, 23 insertions(+), 1 deletion(-)
12
13 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
14 +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
15 @@ -13,7 +13,7 @@
16 * core driver device
17 */
18
19 -#define V4L2_CTRL_COUNT 29 /* number of v4l controls */
20 +#define V4L2_CTRL_COUNT 31 /* number of v4l controls */
21
22 enum {
23 COMP_CAMERA = 0,
24 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
25 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
26 @@ -1270,6 +1270,28 @@ static const struct bm2835_mmal_v4l2_ctr
27 .mmal_id = MMAL_PARAMETER_INTRAPERIOD,
28 .setter = ctrl_set_video_encode_param_output,
29 },
30 + {
31 + .id = V4L2_CID_MPEG_VIDEO_H264_MIN_QP,
32 + .type = MMAL_CONTROL_TYPE_STD,
33 + .min = 0,
34 + .max = 51,
35 + .def = 0,
36 + .step = 1,
37 + .imenu = NULL,
38 + .mmal_id = MMAL_PARAMETER_VIDEO_ENCODE_MIN_QUANT,
39 + .setter = ctrl_set_video_encode_param_output,
40 + },
41 + {
42 + .id = V4L2_CID_MPEG_VIDEO_H264_MAX_QP,
43 + .type = MMAL_CONTROL_TYPE_STD,
44 + .min = 0,
45 + .max = 51,
46 + .def = 0,
47 + .step = 1,
48 + .imenu = NULL,
49 + .mmal_id = MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT,
50 + .setter = ctrl_set_video_encode_param_output,
51 + },
52 };
53
54 int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev)