Skip to content

Commit 08ae2dd

Browse files
naushirpelwell
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 <[email protected]>
1 parent 6887817 commit 08ae2dd

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,11 @@ static int bcm2835_isp_s_ctrl(struct v4l2_ctrl *ctrl)
776776
ctrl->p_new.p_u8,
777777
sizeof(struct bcm2835_isp_denoise));
778778
break;
779+
case V4L2_CID_USER_BCM2835_ISP_CDN:
780+
ret = set_isp_param(node, MMAL_PARAMETER_CDN,
781+
ctrl->p_new.p_u8,
782+
sizeof(struct bcm2835_isp_cdn));
783+
break;
779784
case V4L2_CID_USER_BCM2835_ISP_SHARPEN:
780785
ret = set_isp_param(node, MMAL_PARAMETER_SHARPEN,
781786
ctrl->p_new.p_u8,

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/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 {
@@ -910,6 +912,17 @@ struct mmal_parameter_gamma {
910912
u16 y[MMAL_NUM_GAMMA_PTS];
911913
};
912914

915+
enum mmal_parameter_cdn_mode {
916+
MMAL_PARAM_CDN_FAST = 0,
917+
MMAL_PARAM_CDN_HIGH_QUALITY = 1,
918+
MMAL_PARAM_CDN_DUMMY = 0x7FFFFFFF
919+
};
920+
921+
struct mmal_parameter_colour_denoise {
922+
u32 enabled;
923+
enum mmal_parameter_cdn_mode mode;
924+
};
925+
913926
struct mmal_parameter_denoise {
914927
u32 enabled;
915928
u32 constant;

0 commit comments

Comments
 (0)