feat(isp_color): support ISP color on P4
This commit is contained in:
@@ -84,6 +84,17 @@ typedef struct {
|
||||
void isp_hal_init(isp_hal_context_t *hal, int isp_id);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Color configurations
|
||||
*/
|
||||
typedef struct {
|
||||
isp_color_contrast_t color_contrast; ///< The color contrast value, range 0~1, decimal value should be 0~127
|
||||
isp_color_saturation_t color_saturation; ///< The color saturation value, range 0~1, decimal value should be 0~127
|
||||
uint32_t color_hue; ///< The color hue angle value, range 0-360
|
||||
int color_brightness; ///< The color brightness value, range -128~127
|
||||
} isp_hal_color_cfg_t;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
AF
|
||||
---------------------------------------------------------------*/
|
||||
@@ -225,6 +236,18 @@ void isp_hal_sharpen_config(isp_hal_context_t *hal, isp_hal_sharpen_cfg_t *confi
|
||||
*/
|
||||
void isp_hal_hist_window_config(isp_hal_context_t *hal, const isp_window_t *window);
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Color
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Set the color config
|
||||
*
|
||||
* @param[in] hal Context of the HAL layer
|
||||
* @param[in] config Color config, set NULL to de-config the ISP color
|
||||
*/
|
||||
void isp_hal_color_config(isp_hal_context_t *hal, const isp_hal_color_cfg_t *config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -359,6 +359,39 @@ typedef struct {
|
||||
uint32_t hist_value[ISP_HIST_SEGMENT_NUMS]; ///< Histogram value, represents the number of pixels that the histogram window's brightness results fall into the segment X.
|
||||
} isp_hist_result_t;
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Color
|
||||
---------------------------------------------------------------*/
|
||||
#define ISP_COLOR_CONTRAST_INT_BITS 1
|
||||
#define ISP_COLOR_CONTRAST_DEC_BITS 7
|
||||
#define ISP_COLOR_CONTRAST_RES_BITS 24
|
||||
#define ISP_COLOR_SATURATION_INT_BITS 1
|
||||
#define ISP_COLOR_SATURATION_DEC_BITS 7
|
||||
#define ISP_COLOR_SATURATION_RES_BITS 24
|
||||
|
||||
/**
|
||||
* @brief Color contrast value
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t decimal:ISP_COLOR_CONTRAST_DEC_BITS; ///< Decimal part
|
||||
uint32_t integer:ISP_COLOR_CONTRAST_INT_BITS; ///< Integer part
|
||||
uint32_t reserved:ISP_COLOR_CONTRAST_RES_BITS; ///< Reserved
|
||||
};
|
||||
uint32_t val; ///< 32-bit color contrast value
|
||||
} isp_color_contrast_t;
|
||||
|
||||
/**
|
||||
* @brief Color saturation value
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
uint32_t decimal:ISP_COLOR_SATURATION_DEC_BITS; ///< Decimal part
|
||||
uint32_t integer:ISP_COLOR_SATURATION_INT_BITS; ///< Integer part
|
||||
uint32_t reserved:ISP_COLOR_SATURATION_RES_BITS; ///< Reserved
|
||||
};
|
||||
uint32_t val; ///< 32-bit color saturation value
|
||||
} isp_color_saturation_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user