feat(isp_hist): Add ISP histogram support and add test for esp32p4(part 2)
This commit is contained in:
@@ -169,17 +169,18 @@ bool isp_hal_ccm_set_matrix(const isp_hal_context_t *hal, bool saturation, const
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
INTR, put in iram
|
||||
Histogram
|
||||
---------------------------------------------------------------*/
|
||||
uint32_t isp_hal_check_clear_intr_event(const isp_hal_context_t *hal, uint32_t mask)
|
||||
void isp_hal_hist_window_config(isp_hal_context_t *hal, const isp_window_t *window)
|
||||
{
|
||||
uint32_t triggered_events = isp_ll_get_intr_status(hal->hw) & mask;
|
||||
uint32_t hist_x_start = window->top_left.x;
|
||||
uint32_t hist_x_bsize = (window->btm_right.x - window-> top_left.x) / SOC_ISP_HIST_BLOCK_X_NUMS;
|
||||
|
||||
if (triggered_events) {
|
||||
isp_ll_clear_intr(hal->hw, triggered_events);
|
||||
}
|
||||
uint32_t hist_y_start = window->top_left.y;
|
||||
uint32_t hist_y_bsize = (window->btm_right.y - window->top_left.y) / SOC_ISP_HIST_BLOCK_Y_NUMS;
|
||||
|
||||
isp_ll_hist_set_window_range(hal->hw, hist_x_start, hist_x_bsize, hist_y_start, hist_y_bsize);
|
||||
|
||||
return triggered_events;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
@@ -213,3 +214,17 @@ void isp_hal_sharpen_config(isp_hal_context_t *hal, isp_hal_sharpen_cfg_t *confi
|
||||
isp_ll_sharp_set_template(hal->hw, default_template);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
INTR, put in iram
|
||||
---------------------------------------------------------------*/
|
||||
uint32_t isp_hal_check_clear_intr_event(const isp_hal_context_t *hal, uint32_t mask)
|
||||
{
|
||||
uint32_t triggered_events = isp_ll_get_intr_status(hal->hw) & mask;
|
||||
|
||||
if (triggered_events) {
|
||||
isp_ll_clear_intr(hal->hw, triggered_events);
|
||||
}
|
||||
|
||||
return triggered_events;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user