mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(isp): added isp bf driver
This commit is contained in:
@@ -19,12 +19,26 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief BF configurations
|
||||
*/
|
||||
typedef struct {
|
||||
isp_bf_edge_padding_mode_t padding_mode; ///< BF edge padding mode
|
||||
uint8_t padding_data; ///< BF edge padding pixel data
|
||||
uint8_t bf_template[ISP_BF_TEMPLATE_X_NUMS][ISP_BF_TEMPLATE_Y_NUMS]; ///< BF template data
|
||||
uint8_t denoising_level; ///< BF denoising level, from 2 to 20, the bigger the better denoising performance, but the worse detailed
|
||||
uint8_t padding_line_tail_valid_start_pixel; ///< BF edge padding line tail valid start pixel
|
||||
uint8_t padding_line_tail_valid_end_pixel; ///< BF edge padding line tail valid end pixel
|
||||
} isp_hal_bf_cfg_t;
|
||||
|
||||
/**
|
||||
* Context that should be maintained by both the driver and the HAL
|
||||
* @brief Context that should be maintained by both the driver and the HAL
|
||||
*/
|
||||
typedef struct {
|
||||
void *hw; ///< Beginning address of the ISP registers
|
||||
|
||||
/* BF */
|
||||
isp_hal_bf_cfg_t bf_cfg; ///< BF configurations
|
||||
} isp_hal_context_t;
|
||||
|
||||
/**
|
||||
@@ -61,6 +75,16 @@ void isp_hal_af_window_config(const isp_hal_context_t *hal, int window_id, const
|
||||
*/
|
||||
uint32_t isp_hal_check_clear_intr_event(const isp_hal_context_t *hal, uint32_t mask);
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
BF
|
||||
---------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Configure ISP BF registers
|
||||
*
|
||||
* @param[in] hal Context of the HAL layer
|
||||
* @param[in] config BF config, set NULL to de-config the ISP BF
|
||||
*/
|
||||
void isp_hal_bf_config(isp_hal_context_t *hal, isp_hal_bf_cfg_t *config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -72,6 +72,25 @@ typedef struct {
|
||||
int luminance[ISP_AF_WINDOW_NUM]; ///< Luminance, it refers how luminant an image is
|
||||
} isp_af_result_t;
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
BF
|
||||
---------------------------------------------------------------*/
|
||||
#if SOC_ISP_BF_SUPPORTED
|
||||
#define ISP_BF_TEMPLATE_X_NUMS SOC_ISP_BF_TEMPLATE_X_NUMS // BF template x field nums
|
||||
#define ISP_BF_TEMPLATE_Y_NUMS SOC_ISP_BF_TEMPLATE_Y_NUMS // BF template y field nums
|
||||
#else
|
||||
#define ISP_BF_TEMPLATE_X_NUMS 0
|
||||
#define ISP_BF_TEMPLATE_Y_NUMS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ISP BF edge padding mode
|
||||
*/
|
||||
typedef enum {
|
||||
ISP_BF_EDGE_PADDING_MODE_SRND_DATA, ///< Fill BF edge padding data with surrounding pixel data
|
||||
ISP_BF_EDGE_PADDING_MODE_CUSTOM_DATA, ///< Fill BF edge padding data with custom pixel data
|
||||
} isp_bf_edge_padding_mode_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user