1.合并原厂提供的偏色问题

This commit is contained in:
payton 2024-01-17 13:45:15 +08:00
parent cb00e6c4fa
commit 0e40a6633f
3 changed files with 68 additions and 2 deletions

View File

@ -375,6 +375,36 @@ INT32 Set_Cur_Day_Night_Status(BOOL OnOff, UINT8 isSnapVideo)
return 0; 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) #if (MOVIE_IME_CROP == ENABLE)
MOVIEMULTI_IME_CROP_INFO IMECropInfo[SENSOR_CAPS_COUNT]; MOVIEMULTI_IME_CROP_INFO IMECropInfo[SENSOR_CAPS_COUNT];
@ -2330,6 +2360,8 @@ INT32 MovieExe_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
UINT32 drive = 'A'; UINT32 drive = 'A';
#endif #endif
DBG_FUNC("\r\n"); DBG_FUNC("\r\n");
vendor_isp_update_awb();
#if (SENSOR_INSERT_FUNCTION == ENABLE) #if (SENSOR_INSERT_FUNCTION == ENABLE)
System_DisableSensorDet(); System_DisableSensorDet();
#endif #endif

View File

@ -280,6 +280,38 @@ PHOTO_CAP_CBMSG_FP PhotoCapMsgCb = (PHOTO_CAP_CBMSG_FP)Photo_CaptureCB;
#endif #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------------------------- //---------------------UIAPP_PHOTO Local Functions-------------------------
//return Primary Size or Header+Primary+Screennail Size //return Primary Size or Header+Primary+Screennail Size
@ -2882,6 +2914,8 @@ INT32 PhotoExe_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{ {
g_bPhotoOpened = FALSE; g_bPhotoOpened = FALSE;
vendor_isp_photo_update_awb();
#if (SENSOR_INSERT_FUNCTION == ENABLE) #if (SENSOR_INSERT_FUNCTION == ENABLE)
System_DisableSensorDet(); System_DisableSensorDet();
#endif #endif

View File

@ -1663,7 +1663,7 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg)
Movie_CommPoolInit(); Movie_CommPoolInit();
/*.............sun chen@20240111 start.................*/ /*.............sun chen@20240111 start.................*/
/*
if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2){ if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2){
//UI_SetData(FL_MOVIE_SIZE, MOVIE_SIZE_CLONE_1920x1080P30_1280x720P30); //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_NIGHTMODE(0, 1);
//Set_AEMODE(0); //Set_AEMODE(0);
} }
*/
/*.............sun chen@20240111 end.................*/ /*.............sun chen@20240111 end.................*/
MovieFast_SetRecInfoByUISetting(); MovieFast_SetRecInfoByUISetting();