mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
Revert "change(isp): enable yuv submodules"
This reverts commit e4a44970940ceeff0e6f3e425c03eded9505b2d5.
This commit is contained in:
parent
b07ffe1e1c
commit
338b0c707d
@ -111,7 +111,6 @@ bool esp_isp_ae_isr(isp_proc_handle_t proc, uint32_t ae_events);
|
||||
bool esp_isp_awb_isr(isp_proc_handle_t proc, uint32_t awb_events);
|
||||
bool esp_isp_sharpen_isr(isp_proc_handle_t proc, uint32_t sharp_events);
|
||||
bool esp_isp_hist_isr(isp_proc_handle_t proc, uint32_t hist_events);
|
||||
esp_err_t esp_isp_enable_yuv_submodules(isp_proc_handle_t proc, bool en);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -81,7 +81,6 @@ esp_err_t esp_isp_new_af_controller(isp_proc_handle_t isp_proc, const esp_isp_af
|
||||
{
|
||||
esp_err_t ret = ESP_FAIL;
|
||||
ESP_RETURN_ON_FALSE(isp_proc && af_config && ret_hdl, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(isp_proc, true), TAG, "failed to enable YUV submodules");
|
||||
|
||||
bool rgb2yuv_en = isp_ll_is_rgb2yuv_enabled(isp_proc->hal.hw);
|
||||
bool demosaic_en = isp_ll_is_demosaic_enabled(isp_proc->hal.hw);
|
||||
@ -155,7 +154,6 @@ esp_err_t esp_isp_del_af_controller(isp_af_ctlr_t af_ctlr)
|
||||
|
||||
// Deregister the AF ISR
|
||||
ESP_RETURN_ON_FALSE(esp_isp_deregister_isr(af_ctlr->isp_proc, ISP_SUBMODULE_AF) == ESP_OK, ESP_FAIL, TAG, "fail to deregister ISR");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(af_ctlr->isp_proc, false), TAG, "failed to disable YUV submodules");
|
||||
|
||||
s_isp_declaim_af_controller(af_ctlr);
|
||||
s_isp_af_free_controller(af_ctlr);
|
||||
|
@ -49,7 +49,6 @@ esp_err_t esp_isp_color_enable(isp_proc_handle_t proc)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
ESP_RETURN_ON_FALSE(proc->color_fsm == ISP_FSM_INIT, ESP_ERR_INVALID_STATE, TAG, "color is enabled already");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(proc, true), TAG, "failed to enable YUV submodules");
|
||||
|
||||
isp_ll_color_clk_enable(proc->hal.hw, true);
|
||||
isp_ll_color_enable(proc->hal.hw, true);
|
||||
@ -62,7 +61,6 @@ esp_err_t esp_isp_color_disable(isp_proc_handle_t proc)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
ESP_RETURN_ON_FALSE(proc->color_fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "color isn't enabled yet");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(proc, false), TAG, "failed to disable YUV submodules");
|
||||
|
||||
isp_ll_color_enable(proc->hal.hw, false);
|
||||
isp_ll_color_clk_enable(proc->hal.hw, false);
|
||||
|
@ -390,29 +390,3 @@ esp_err_t esp_isp_deregister_isr(isp_proc_handle_t proc, isp_submodule_t submodu
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_isp_enable_yuv_submodules(isp_proc_handle_t proc, bool en)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
|
||||
bool rgb2yuv = false;
|
||||
bool yuv2rgb = false;
|
||||
|
||||
if (proc->out_color_format.color_space == COLOR_SPACE_RGB) {
|
||||
rgb2yuv = true;
|
||||
yuv2rgb = true;
|
||||
} else if (proc->out_color_format.color_space == COLOR_SPACE_YUV) {
|
||||
rgb2yuv = true;
|
||||
}
|
||||
|
||||
portENTER_CRITICAL(&proc->spinlock);
|
||||
if (rgb2yuv) {
|
||||
isp_ll_enable_rgb2yuv(proc->hal.hw, en);
|
||||
}
|
||||
if (yuv2rgb) {
|
||||
isp_ll_enable_yuv2rgb(proc->hal.hw, en);
|
||||
}
|
||||
portEXIT_CRITICAL(&proc->spinlock);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ esp_err_t esp_isp_sharpen_enable(isp_proc_handle_t proc)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
ESP_RETURN_ON_FALSE(proc->sharpen_fsm == ISP_FSM_INIT, ESP_ERR_INVALID_STATE, TAG, "sharpen is enabled already");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(proc, true), TAG, "failed to enable YUV submodules");
|
||||
|
||||
isp_ll_sharp_clk_enable(proc->hal.hw, true);
|
||||
isp_ll_enable_intr(proc->hal.hw, ISP_LL_EVENT_SHARP_FRAME, true);
|
||||
@ -65,7 +64,6 @@ esp_err_t esp_isp_sharpen_disable(isp_proc_handle_t proc)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(proc, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
|
||||
ESP_RETURN_ON_FALSE(proc->sharpen_fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "sharpen isn't enabled yet");
|
||||
ESP_RETURN_ON_ERROR(esp_isp_enable_yuv_submodules(proc, false), TAG, "failed to disable YUV submodules");
|
||||
|
||||
isp_ll_sharp_enable(proc->hal.hw, false);
|
||||
isp_ll_enable_intr(proc->hal.hw, ISP_LL_EVENT_SHARP_FRAME, false);
|
||||
|
@ -456,28 +456,6 @@ static inline void isp_ll_enable_line_end_packet_exist(isp_dev_t *hw, bool en)
|
||||
hw->frame_cfg.hsync_end_exist = en;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable rgb2yuv
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] en Enable / Disable
|
||||
*/
|
||||
static inline void isp_ll_enable_rgb2yuv(isp_dev_t *hw, bool en)
|
||||
{
|
||||
hw->cntl.rgb2yuv_en = en;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable yuv2rgb
|
||||
*
|
||||
* @param[in] hw Hardware instance address
|
||||
* @param[in] en Enable / Disable
|
||||
*/
|
||||
static inline void isp_ll_enable_yuv2rgb(isp_dev_t *hw, bool en)
|
||||
{
|
||||
hw->cntl.yuv2rgb_en = en;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get if demosaic is enabled
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user