staging/bcm2835-camera: Add support for H264_MIN_QP, H264_MAX_QP
authorsoyer <soyer@irl.hu>
Sat, 23 Oct 2021 10:23:50 +0000 (12:23 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:27 +0000 (16:04 +0000)
Signed-off-by: Gergo Koteles <soyer@irl.hu>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h
drivers/staging/vc04_services/bcm2835-camera/controls.c

index 75524adff0f57b4a858c1f14f9093a29ea609a75..a78973ae94debda1def59581509e37b4eadf3722 100644 (file)
@@ -13,7 +13,7 @@
  * core driver device
  */
 
-#define V4L2_CTRL_COUNT 29 /* number of v4l controls */
+#define V4L2_CTRL_COUNT 31 /* number of v4l controls */
 
 enum {
        COMP_CAMERA = 0,
index f3480a5c517022386d41559df8a551b613fcb51e..de59f435696de46f6bebeda4bf8fc61474a5c82e 100644 (file)
@@ -1270,6 +1270,28 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = {
                .mmal_id = MMAL_PARAMETER_INTRAPERIOD,
                .setter = ctrl_set_video_encode_param_output,
        },
+       {
+               .id = V4L2_CID_MPEG_VIDEO_H264_MIN_QP,
+               .type = MMAL_CONTROL_TYPE_STD,
+               .min = 0,
+               .max = 51,
+               .def = 0,
+               .step = 1,
+               .imenu = NULL,
+               .mmal_id = MMAL_PARAMETER_VIDEO_ENCODE_MIN_QUANT,
+               .setter = ctrl_set_video_encode_param_output,
+       },
+       {
+               .id = V4L2_CID_MPEG_VIDEO_H264_MAX_QP,
+               .type = MMAL_CONTROL_TYPE_STD,
+               .min = 0,
+               .max = 51,
+               .def = 0,
+               .step = 1,
+               .imenu = NULL,
+               .mmal_id = MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT,
+               .setter = ctrl_set_video_encode_param_output,
+       },
 };
 
 int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev)