Skip to content

Commit a815184

Browse files
naushirpopcornmix
authored andcommitted
staging: vc04_services: ISP: Add colour denoise control
Add colour denoise control to the bcm2835 driver through a new v4l2 control: V4L2_CID_USER_BCM2835_ISP_CDN. Add the accompanying MMAL configuration structure definitions as well. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent 55ddf58 commit a815184

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-ctrls.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ static const struct bcm2835_isp_custom_ctrl custom_ctrls[] = {
5656
.id = V4L2_CID_USER_BCM2835_ISP_DENOISE,
5757
.size = sizeof(struct bcm2835_isp_denoise),
5858
.flags = 0
59+
}, {
60+
.name = "Colour Denoise",
61+
.id = V4L2_CID_USER_BCM2835_ISP_CDN,
62+
.size = sizeof(struct bcm2835_isp_cdn),
63+
.flags = 0
5964
}, {
6065
.name = "Defective Pixel Correction",
6166
.id = V4L2_CID_USER_BCM2835_ISP_DPC,

‎drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,11 @@ static int bcm2835_isp_s_ctrl(struct v4l2_ctrl *ctrl)
766766
ctrl->p_new.p_u8,
767767
sizeof(struct bcm2835_isp_denoise));
768768
break;
769+
case V4L2_CID_USER_BCM2835_ISP_CDN:
770+
ret = set_isp_param(node, MMAL_PARAMETER_CDN,
771+
ctrl->p_new.p_u8,
772+
sizeof(struct bcm2835_isp_cdn));
773+
break;
769774
case V4L2_CID_USER_BCM2835_ISP_SHARPEN:
770775
ret = set_isp_param(node, MMAL_PARAMETER_SHARPEN,
771776
ctrl->p_new.p_u8,

‎drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ enum mmal_parameter_camera_type {
277277
MMAL_PARAMETER_DPC,
278278
/**< Tales a @ref MMAP_PARAMETER_GAMMA_T */
279279
MMAL_PARAMETER_GAMMA,
280+
/**< Takes a @ref MMAL_PARAMETER_CDN_T */
281+
MMAL_PARAMETER_CDN,
280282
};
281283

282284
struct mmal_parameter_rational {
@@ -913,6 +915,17 @@ struct mmal_parameter_gamma {
913915
u16 y[MMAL_NUM_GAMMA_PTS];
914916
};
915917

918+
enum mmal_parameter_cdn_mode {
919+
MMAL_PARAM_CDN_FAST = 0,
920+
MMAL_PARAM_CDN_HIGH_QUALITY = 1,
921+
MMAL_PARAM_CDN_DUMMY = 0x7FFFFFFF
922+
};
923+
924+
struct mmal_parameter_colour_denoise {
925+
u32 enabled;
926+
enum mmal_parameter_cdn_mode mode;
927+
};
928+
916929
struct mmal_parameter_denoise {
917930
u32 enabled;
918931
u32 constant;

0 commit comments

Comments
 (0)