fix(isp): isp demosaic module should never be disabled for non-raw8 output format

This commit is contained in:
Song Ruo Jing 2024-12-10 15:07:00 +08:00
parent 2830a44495
commit 274321d82c

View File

@ -59,7 +59,10 @@ esp_err_t esp_isp_demosaic_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->demosaic_fsm == ISP_FSM_ENABLE, ESP_ERR_INVALID_STATE, TAG, "demosaic isn't enabled yet");
isp_ll_demosaic_enable(proc->hal.hw, false);
if (proc->out_color_format.color_space == (uint32_t)COLOR_SPACE_RAW) {
// for other out_color_format, demosaic module is needed for rgb interpolation algorithm
isp_ll_demosaic_enable(proc->hal.hw, false);
}
proc->demosaic_fsm = ISP_FSM_INIT;
return ESP_OK;