mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
change(isp): added lut table depth check
This commit is contained in:
@@ -35,6 +35,7 @@ esp_err_t esp_isp_lsc_allocate_gain_array(isp_proc_handle_t isp_proc, esp_isp_ls
|
||||
int num_grids_x = ISP_LSC_GET_GRIDS(isp_proc->h_res);
|
||||
int num_grids_y = ISP_LSC_GET_GRIDS(isp_proc->v_res);
|
||||
ESP_LOGD(TAG, "num_grids_x_max: %d, num_grids_x: %d, num_grids_y_max: %d, num_grids_y: %d", num_grids_x_max, num_grids_y_max, num_grids_x, num_grids_y);
|
||||
ESP_RETURN_ON_FALSE(num_grids_x * num_grids_y <= ISP_LL_LUT_LSC_SIZE_MAX, ESP_ERR_INVALID_ARG, TAG, "invalid number of grids, max is %d, num_grids_x: %d, num_grids_y: %d", ISP_LL_LUT_LSC_SIZE_MAX, num_grids_x, num_grids_y);
|
||||
ESP_RETURN_ON_FALSE(num_grids_x <= num_grids_x_max && num_grids_y <= num_grids_y_max, ESP_ERR_INVALID_ARG, TAG, "invalid h_res or v_res");
|
||||
|
||||
gain_array->gain_r = (isp_lsc_gain_t *)heap_caps_calloc(1, num_grids_x * num_grids_y * sizeof(isp_lsc_gain_t), ISP_MEM_ALLOC_CAPS);
|
||||
|
||||
Reference in New Issue
Block a user