forked from espressif/esp-idf
feat(isp): lsc example
This commit is contained in:
@@ -13,7 +13,7 @@ menu "Example DSI Configuration"
|
|||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
choice EXAMPLE_MIPI_DSI_DISP_HRES
|
choice EXAMPLE_MIPI_DSI_DISP_HRES
|
||||||
bool "Set MIPI CSI horizontal resolution"
|
bool "Set MIPI DSI horizontal resolution"
|
||||||
default EXAMPLE_MIPI_DSI_DISP_HRES_800 if EXAMPLE_LCD_PATTERN_ILI9881C
|
default EXAMPLE_MIPI_DSI_DISP_HRES_800 if EXAMPLE_LCD_PATTERN_ILI9881C
|
||||||
default EXAMPLE_MIPI_DSI_DISP_HRES_1024 if EXAMPLE_LCD_PATTERN_EK79007
|
default EXAMPLE_MIPI_DSI_DISP_HRES_1024 if EXAMPLE_LCD_PATTERN_EK79007
|
||||||
default EXAMPLE_MIPI_DSI_DISP_HRES_800
|
default EXAMPLE_MIPI_DSI_DISP_HRES_800
|
||||||
@@ -30,7 +30,7 @@ menu "Example DSI Configuration"
|
|||||||
default 1024 if EXAMPLE_MIPI_DSI_DISP_HRES_1024
|
default 1024 if EXAMPLE_MIPI_DSI_DISP_HRES_1024
|
||||||
|
|
||||||
choice EXAMPLE_MIPI_DSI_DISP_VRES
|
choice EXAMPLE_MIPI_DSI_DISP_VRES
|
||||||
bool "Set MIPI CSI vertical resolution"
|
bool "Set MIPI DSI vertical resolution"
|
||||||
default EXAMPLE_MIPI_DSI_DISP_VRES_1280 if EXAMPLE_LCD_PATTERN_ILI9881C
|
default EXAMPLE_MIPI_DSI_DISP_VRES_1280 if EXAMPLE_LCD_PATTERN_ILI9881C
|
||||||
default EXAMPLE_MIPI_DSI_DISP_VRES_600 if EXAMPLE_LCD_PATTERN_EK79007
|
default EXAMPLE_MIPI_DSI_DISP_VRES_600 if EXAMPLE_LCD_PATTERN_EK79007
|
||||||
default EXAMPLE_MIPI_DSI_DISP_VRES_1280
|
default EXAMPLE_MIPI_DSI_DISP_VRES_1280
|
||||||
|
@@ -14,6 +14,7 @@ This example demonstrates how to use the ISP (image signal processor) to work wi
|
|||||||
- ISP Demosaic feature
|
- ISP Demosaic feature
|
||||||
- ISP GAMMA feature
|
- ISP GAMMA feature
|
||||||
- ISP Color feature
|
- ISP Color feature
|
||||||
|
- ISP LSC feature
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@@ -347,6 +347,26 @@ void app_main(void)
|
|||||||
ESP_ERROR_CHECK(esp_isp_color_configure(isp_proc, &color_config));
|
ESP_ERROR_CHECK(esp_isp_color_configure(isp_proc, &color_config));
|
||||||
ESP_ERROR_CHECK(esp_isp_color_enable(isp_proc));
|
ESP_ERROR_CHECK(esp_isp_color_enable(isp_proc));
|
||||||
|
|
||||||
|
esp_isp_lsc_gain_array_t gain_array = {};
|
||||||
|
esp_isp_lsc_config_t lsc_config = {
|
||||||
|
.gain_array = &gain_array,
|
||||||
|
};
|
||||||
|
size_t gain_size = 0;
|
||||||
|
ESP_ERROR_CHECK(esp_isp_lsc_allocate_gain_array(isp_proc, &gain_array, &gain_size));
|
||||||
|
|
||||||
|
isp_lsc_gain_t gain_val = {
|
||||||
|
.decimal = 204,
|
||||||
|
.integer = 0,
|
||||||
|
};
|
||||||
|
for (int i = 0; i < gain_size; i++) {
|
||||||
|
gain_array.gain_r[i].val = gain_val.val;
|
||||||
|
gain_array.gain_gr[i].val = gain_val.val;
|
||||||
|
gain_array.gain_gb[i].val = gain_val.val;
|
||||||
|
gain_array.gain_b[i].val = gain_val.val;
|
||||||
|
}
|
||||||
|
ESP_ERROR_CHECK(esp_isp_lsc_configure(isp_proc, &lsc_config));
|
||||||
|
ESP_ERROR_CHECK(esp_isp_lsc_enable(isp_proc));
|
||||||
|
|
||||||
typedef struct af_task_param_t {
|
typedef struct af_task_param_t {
|
||||||
isp_proc_handle_t isp_proc;
|
isp_proc_handle_t isp_proc;
|
||||||
esp_sccb_io_handle_t dw9714_io_handle;
|
esp_sccb_io_handle_t dw9714_io_handle;
|
||||||
|
Reference in New Issue
Block a user