提交 3b2c1ece 编写于 作者: N Naushir Patuck 提交者: Zheng Zengkai

staging: vc04_services: ISP: Add colour denoise control

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

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: NNaushir Patuck <naush@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e04a3193
...@@ -56,6 +56,11 @@ static const struct bcm2835_isp_custom_ctrl custom_ctrls[] = { ...@@ -56,6 +56,11 @@ static const struct bcm2835_isp_custom_ctrl custom_ctrls[] = {
.id = V4L2_CID_USER_BCM2835_ISP_DENOISE, .id = V4L2_CID_USER_BCM2835_ISP_DENOISE,
.size = sizeof(struct bcm2835_isp_denoise), .size = sizeof(struct bcm2835_isp_denoise),
.flags = 0 .flags = 0
}, {
.name = "Colour Denoise",
.id = V4L2_CID_USER_BCM2835_ISP_CDN,
.size = sizeof(struct bcm2835_isp_cdn),
.flags = 0
}, { }, {
.name = "Defective Pixel Correction", .name = "Defective Pixel Correction",
.id = V4L2_CID_USER_BCM2835_ISP_DPC, .id = V4L2_CID_USER_BCM2835_ISP_DPC,
......
...@@ -764,6 +764,11 @@ static int bcm2835_isp_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -764,6 +764,11 @@ static int bcm2835_isp_s_ctrl(struct v4l2_ctrl *ctrl)
ctrl->p_new.p_u8, ctrl->p_new.p_u8,
sizeof(struct bcm2835_isp_denoise)); sizeof(struct bcm2835_isp_denoise));
break; break;
case V4L2_CID_USER_BCM2835_ISP_CDN:
ret = set_isp_param(node, MMAL_PARAMETER_CDN,
ctrl->p_new.p_u8,
sizeof(struct bcm2835_isp_cdn));
break;
case V4L2_CID_USER_BCM2835_ISP_SHARPEN: case V4L2_CID_USER_BCM2835_ISP_SHARPEN:
ret = set_isp_param(node, MMAL_PARAMETER_SHARPEN, ret = set_isp_param(node, MMAL_PARAMETER_SHARPEN,
ctrl->p_new.p_u8, ctrl->p_new.p_u8,
......
...@@ -277,6 +277,8 @@ enum mmal_parameter_camera_type { ...@@ -277,6 +277,8 @@ enum mmal_parameter_camera_type {
MMAL_PARAMETER_DPC, MMAL_PARAMETER_DPC,
/**< Tales a @ref MMAP_PARAMETER_GAMMA_T */ /**< Tales a @ref MMAP_PARAMETER_GAMMA_T */
MMAL_PARAMETER_GAMMA, MMAL_PARAMETER_GAMMA,
/**< Takes a @ref MMAL_PARAMETER_CDN_T */
MMAL_PARAMETER_CDN,
}; };
struct mmal_parameter_rational { struct mmal_parameter_rational {
...@@ -913,6 +915,17 @@ struct mmal_parameter_gamma { ...@@ -913,6 +915,17 @@ struct mmal_parameter_gamma {
u16 y[MMAL_NUM_GAMMA_PTS]; u16 y[MMAL_NUM_GAMMA_PTS];
}; };
enum mmal_parameter_cdn_mode {
MMAL_PARAM_CDN_FAST = 0,
MMAL_PARAM_CDN_HIGH_QUALITY = 1,
MMAL_PARAM_CDN_DUMMY = 0x7FFFFFFF
};
struct mmal_parameter_colour_denoise {
u32 enabled;
enum mmal_parameter_cdn_mode mode;
};
struct mmal_parameter_denoise { struct mmal_parameter_denoise {
u32 enabled; u32 enabled;
u32 constant; u32 constant;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册