From 0e40a6633f2f85575eb1159f598d93ecc90a464a Mon Sep 17 00:00:00 2001 From: payton Date: Wed, 17 Jan 2024 13:45:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=88=E5=B9=B6=E5=8E=9F=E5=8E=82=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E7=9A=84=E5=81=8F=E8=89=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SrcCode/UIApp/Movie/UIAppMovie_Exe.c | 32 +++++++++++++++++ .../SrcCode/UIApp/Photo/UIAppPhoto_Exe.c | 34 +++++++++++++++++++ .../cardv/SrcCode/UIApp/MovieFast/MovieFast.c | 4 +-- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c b/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c index 473e801d4..a34caf245 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c @@ -375,6 +375,36 @@ INT32 Set_Cur_Day_Night_Status(BOOL OnOff, UINT8 isSnapVideo) return 0; } +static void vendor_isp_update_awb(void) +{ + HD_RESULT hd_ret; + AWBT_STATUS status = {0}; + ISPT_C_GAIN c_gain = {0}; + + if ((hd_ret = vendor_isp_init()) != HD_OK) { + DBG_ERR("vendor_isp_init() fail(%d)\r\n", hd_ret); + } + + status.id = 0; + vendor_isp_get_awb(AWBT_ITEM_STATUS, &status); + + //DBG_DUMP("^^ cur_r_gain:%d, cur_g_gain:%d, cur_b_gain:%d \r\n", + // status.status.cur_r_gain,status.status.cur_g_gain,status.status.cur_b_gain); + + c_gain.id = 0; + + c_gain.gain[0] = status.status.cur_r_gain; + c_gain.gain[1] = status.status.cur_g_gain; + c_gain.gain[2] = status.status.cur_b_gain; + vendor_isp_set_common(ISPT_ITEM_C_GAIN, &c_gain); + + c_gain.id = 1; + vendor_isp_set_common(ISPT_ITEM_C_GAIN, &c_gain); + + if ((hd_ret = vendor_isp_uninit()) != HD_OK) { + DBG_ERR("vendor_isp_uninit() fail(%d)\r\n", hd_ret); + } +} #if (MOVIE_IME_CROP == ENABLE) MOVIEMULTI_IME_CROP_INFO IMECropInfo[SENSOR_CAPS_COUNT]; @@ -2330,6 +2360,8 @@ INT32 MovieExe_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) UINT32 drive = 'A'; #endif DBG_FUNC("\r\n"); +vendor_isp_update_awb(); + #if (SENSOR_INSERT_FUNCTION == ENABLE) System_DisableSensorDet(); #endif diff --git a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c index 9e93efb2c..4b35b1865 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c @@ -280,6 +280,38 @@ PHOTO_CAP_CBMSG_FP PhotoCapMsgCb = (PHOTO_CAP_CBMSG_FP)Photo_CaptureCB; #endif + +static void vendor_isp_photo_update_awb(void) +{ + HD_RESULT hd_ret; + AWBT_STATUS status = {0}; + ISPT_C_GAIN c_gain = {0}; + + if ((hd_ret = vendor_isp_init()) != HD_OK) { + DBG_ERR("vendor_isp_init() fail(%d)\r\n", hd_ret); + } + + status.id = 0; + vendor_isp_get_awb(AWBT_ITEM_STATUS, &status); + + //DBG_DUMP("^^ cur_r_gain:%d, cur_g_gain:%d, cur_b_gain:%d \r\n", + // status.status.cur_r_gain,status.status.cur_g_gain,status.status.cur_b_gain); + + c_gain.id = 0; + + c_gain.gain[0] = status.status.cur_r_gain; + c_gain.gain[1] = status.status.cur_g_gain; + c_gain.gain[2] = status.status.cur_b_gain; + vendor_isp_set_common(ISPT_ITEM_C_GAIN, &c_gain); + + c_gain.id = 1; + vendor_isp_set_common(ISPT_ITEM_C_GAIN, &c_gain); + + if ((hd_ret = vendor_isp_uninit()) != HD_OK) { + DBG_ERR("vendor_isp_uninit() fail(%d)\r\n", hd_ret); + } +} + //---------------------UIAPP_PHOTO Local Functions------------------------- //return Primary Size or Header+Primary+Screennail Size @@ -2882,6 +2914,8 @@ INT32 PhotoExe_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { g_bPhotoOpened = FALSE; +vendor_isp_photo_update_awb(); + #if (SENSOR_INSERT_FUNCTION == ENABLE) System_DisableSensorDet(); #endif diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c index fdcdd46d3..abdcd598c 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -1663,7 +1663,7 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) Movie_CommPoolInit(); /*.............sun chen@20240111 start.................*/ -/* + if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2){ //UI_SetData(FL_MOVIE_SIZE, MOVIE_SIZE_CLONE_1920x1080P30_1280x720P30); @@ -1674,7 +1674,7 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) Set_NIGHTMODE(0, 1); //Set_AEMODE(0); } -*/ + /*.............sun chen@20240111 end.................*/ MovieFast_SetRecInfoByUISetting();