mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
Merge branch 'feature/support_isp_color' into 'master'
feat(isp): support color on P4 Closes IDF-10495 See merge request espressif/esp-idf!32901
This commit is contained in:
@@ -69,6 +69,7 @@ extern "C" {
|
||||
#define ISP_LL_EVENT_AWB_MASK (ISP_LL_EVENT_AWB_FDONE)
|
||||
#define ISP_LL_EVENT_SHARP_MASK (ISP_LL_EVENT_SHARP_FRAME)
|
||||
#define ISP_LL_EVENT_HIST_MASK (ISP_LL_EVENT_HIST_FDONE)
|
||||
#define ISP_LL_EVENT_COLOR_MASK (ISP_LL_EVENT_COLOR_FRAME)
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
AF
|
||||
@@ -92,6 +93,15 @@ extern "C" {
|
||||
#define ISP_LL_DVP_DATA_TYPE_RAW10 0x2B
|
||||
#define ISP_LL_DVP_DATA_TYPE_RAW12 0x2C
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Color
|
||||
---------------------------------------------------------------*/
|
||||
#define ISP_LL_COLOR_CONTRAST_MAX 0x80
|
||||
#define ISP_LL_COLOR_SATURATION_MAX 0x80
|
||||
#define ISP_LL_COLOR_HUE_MAX 360
|
||||
#define ISP_LL_COLOR_BRIGNTNESS_MIN -128
|
||||
#define ISP_LL_COLOR_BRIGNTNESS_MAX 127
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
AWB
|
||||
---------------------------------------------------------------*/
|
||||
@@ -859,6 +869,50 @@ static inline void isp_ll_color_enable(isp_dev_t *hw, bool enable)
|
||||
hw->cntl.color_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set color contrast
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] color_contrast Color contrast value
|
||||
*/
|
||||
static inline void isp_ll_color_set_contrast(isp_dev_t *hw, isp_color_contrast_t color_contrast)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->color_ctrl, color_contrast, color_contrast.val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set color saturation
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] color_saturation Color saturation value
|
||||
*/
|
||||
static inline void isp_ll_color_set_saturation(isp_dev_t *hw, isp_color_saturation_t color_saturation)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->color_ctrl, color_saturation, color_saturation.val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set color hue
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] color_hue Color hue angle
|
||||
*/
|
||||
static inline void isp_ll_color_set_hue(isp_dev_t *hw, uint32_t color_hue)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->color_ctrl, color_hue, color_hue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set color brightness
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] color_brightness Color brightness value, signed 2's complement
|
||||
*/
|
||||
static inline void isp_ll_color_set_brigntness(isp_dev_t *hw, int8_t color_brightness)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->color_ctrl, color_brightness, color_brightness);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
DVP Camera
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user