mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(isp): Added subwindow configuration for AWB
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -67,6 +67,24 @@ bool isp_hal_awb_set_window_range(isp_hal_context_t *hal, const isp_window_t *wi
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isp_hal_awb_set_subwindow_range(isp_hal_context_t *hal, const isp_window_t *win)
|
||||
{
|
||||
if (win->top_left.x > win->btm_right.x ||
|
||||
win->top_left.y > win->btm_right.y ||
|
||||
win->btm_right.x > ISP_LL_AWB_WINDOW_MAX_RANGE ||
|
||||
win->btm_right.y > ISP_LL_AWB_WINDOW_MAX_RANGE) {
|
||||
return false;
|
||||
}
|
||||
isp_ll_awb_set_subwindow_range(
|
||||
hal->hw,
|
||||
win->top_left.x,
|
||||
win->top_left.y,
|
||||
(win->btm_right.x - win->top_left.x) / SOC_ISP_AWB_WINDOW_X_NUMS,
|
||||
(win->btm_right.y - win->top_left.y) / SOC_ISP_AWB_WINDOW_Y_NUMS
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isp_hal_awb_set_luminance_range(isp_hal_context_t *hal, uint32_t lum_min, uint32_t lum_max)
|
||||
{
|
||||
if (lum_min > lum_max || lum_max > ISP_LL_AWB_LUM_MAX_RANGE) {
|
||||
|
||||
Reference in New Issue
Block a user