diff --git a/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c b/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c index c795bfea5..4e0dcd505 100755 --- a/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c +++ b/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c @@ -29,6 +29,8 @@ static UINT32 m_uiPhotoQuality = 0; static BOOL m_bCertified = FALSE; + +UINT32 Imgexp = 0,Imgiso = 0; //sun chen@20240111 static const INT32 EV_NUMERATOR[(EV_SETTING_MAX)] = { 20, 17, @@ -195,7 +197,7 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) UINT16 uiSceneCaptureType = 0; UINT16 uiSharpness = 0; UINT32 RecID; - HD_RESULT hd_ret; + //HD_RESULT hd_ret; RecID = ImageApp_MovieMulti_VePort2Imglink(HandleID); @@ -269,7 +271,8 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) { UINT32 expo = 0; float fexpo; - AET_STATUS_INFO status = {0}; +/*.............sun chen@20240111 start.................*/ + //AET_STATUS_INFO status = {0}; #if 0//_TODO AE_GetExifInfo(0, &uiISOSpeed, &expo, &uiAperture[0], &MaxAperture[0]); #else @@ -278,8 +281,8 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) uiAperture[0] = 20; MaxAperture[0] = 20; #endif - status.id=RecID; - if ((hd_ret = vendor_isp_init()) != HD_OK) { + //status.id=RecID; + /*if ((hd_ret = vendor_isp_init()) != HD_OK) { DBG_ERR("vendor_isp_init() failed(%d)\r\n", hd_ret); } if ((hd_ret = vendor_isp_get_ae(AET_ITEM_STATUS, &status)) != HD_OK) { @@ -287,11 +290,11 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) } if ((hd_ret = vendor_isp_uninit()) != HD_OK) { DBG_ERR("vendor_isp_uninit() failed(%d)\r\n", hd_ret); - } - uiISOSpeed=status.status_info.iso_gain[0]; - expo=status.status_info.expotime[0]; - DBG_MSG("RecID=%d, uiISOSpeed=%d, expo=%d\r\n",RecID,uiISOSpeed,expo); - + }*/ + uiISOSpeed= Imgiso;//status.status_info.iso_gain[0]; + expo= Imgexp;//status.status_info.expotime[0]; + DBG_ERR("RecID=%d, uiISOSpeed=%d, expo=%d\r\n",RecID,uiISOSpeed,expo); +/*.............sun chen@20240111 end.................*/ uiFNumber[0] = uiAperture[0]; uiAperture[0] = 20 * log2((float)uiAperture[0] / 10); 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 fa62f8e59..ff2228f0a 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Movie/UIAppMovie_Exe.c @@ -147,6 +147,7 @@ static void xUSBMakerInit_UVAC(UVAC_VEND_DEV_DESC *pUVACDevDesc) } #endif //#if (MOVIE_UVAC_FUNC == ENABLE) +extern UINT32 Imgexp,Imgiso; extern void GOIO_Turn_Onoff_IRCUT(UINT8 onoff); extern void GPIO_IRLed_Turn_Onoff(BOOL onoff); /* @@ -344,40 +345,32 @@ INT32 Set_Cur_Day_Night_Status(BOOL OnOff, UINT8 isSnapVideo) vendor_isp_set_iq(IQT_ITEM_NIGHT_MODE, &night_mode); - if ((hd_ret = vendor_isp_uninit()) != HD_OK) { - DBG_ERR("vendor_isp_uninit() fail(%d)\r\n", hd_ret); - } +/*.............sun chen@20240111 start.................*/ + if (OnOff){ vos_util_delay_ms(1000); } + vendor_isp_get_ae(AET_ITEM_STATUS, &ae_status_info); if (isSnapVideo == 0) { - if ((hd_ret = vendor_isp_init()) != HD_OK) { - DBG_ERR("vendor_isp_init() fail(%d)\r\n", hd_ret); - } + + Imgexp = ae_status_info.status_info.expotime[0]; + Imgiso = ae_status_info.status_info.iso_gain[0]; if (OnOff){ ae_manual.manual.mode = 1; - if (puiPara->NightMode == 0) { - ae_manual.manual.expotime = 125000;//ae_status.status_info.expotime[0]; - ae_manual.manual.iso_gain = ae_status_info.status_info.iso_gain[0]*ae_status_info.status_info.expotime[0]/125000; - } - else if (puiPara->NightMode == 1) { - ae_manual.manual.expotime = 66666;//ae_status.status_info.expotime[0]; - ae_manual.manual.iso_gain = ae_status_info.status_info.iso_gain[0]*ae_status_info.status_info.expotime[0]/66666; - } - else { ae_manual.manual.expotime = ae_status_info.status_info.expotime[0]; ae_manual.manual.iso_gain = ae_status_info.status_info.iso_gain[0]; - } + } else { ae_manual.manual.mode = 0; } vendor_isp_set_ae(AET_ITEM_MANUAL, &ae_manual); + } if ((hd_ret = vendor_isp_uninit()) != HD_OK) { DBG_ERR("vendor_isp_uninit() fail(%d)\r\n", hd_ret); - } +/*.............sun chen@20240111 end.................*/ } return 0; } diff --git a/code/hdal/ext_devices/sensor/sen_os05b10/sen_os05b10.c b/code/hdal/ext_devices/sensor/sen_os05b10/sen_os05b10.c index 4a7c59596..adc7a6409 100755 --- a/code/hdal/ext_devices/sensor/sen_os05b10/sen_os05b10.c +++ b/code/hdal/ext_devices/sensor/sen_os05b10/sen_os05b10.c @@ -102,6 +102,7 @@ static void sen_set_cur_fps_os05b10(CTL_SEN_ID id, UINT32 fps); static UINT32 sen_get_cur_fps_os05b10(CTL_SEN_ID id); static void sen_set_chgmode_fps_os05b10(CTL_SEN_ID id, UINT32 fps); static UINT32 sen_get_chgmode_fps_os05b10(CTL_SEN_ID id); +BOOL ae_preset_flag = FALSE; //sun chen@20240111 //============================================================================= // global variable //============================================================================= @@ -1472,8 +1473,16 @@ static ER sen_open_os05b10(CTL_SEN_ID id) #if defined(__KERNEL__) sen_i2c_reg_cb(sen_load_cfg_from_compatible_os05b10); #endif - +/*.............sun chen@20240111 start.................*/ +if (ae_preset_flag == FALSE){ preset_ctrl[id].mode = ISP_SENSOR_PRESET_DEFAULT; + ae_preset_flag = TRUE; +}else { + preset_ctrl[id].mode = ISP_SENSOR_PRESET_CHGMODE; + +} +/*.............sun chen@20240111 end.................*/ + i2c_valid[id] = TRUE; if ((!is_fastboot[id]) || (fastboot_i2c_id[id] != sen_i2c[id].id) || (fastboot_i2c_addr[id] != sen_i2c[id].addr)) { rt = sen_i2c_init_driver(id, &sen_i2c[id]); diff --git a/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_preview.c b/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_preview.c index bc027484e..039b9f734 100755 --- a/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_preview.c +++ b/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_preview.c @@ -1181,12 +1181,12 @@ static UINT32 ae_adc_tbl[57][3] = { {695, 333, 1000}, {694, 423, 1000}, {693, 539, 1000}, - {691, 964, 1000}, + {691, 806, 1000}, //sun chen@20240111 start {689, 1082, 1000}, - {687, 3606, 1000}, - {684, 4038, 1000},//8333, 2150}, - {681, 5755, 1000},//8333, 2550}, - {679, 6187, 1000}, + {687, 4038, 1000}, + {684, 5755, 1000},//8333, 2150}, + {681, 6187, 1000},//8333, 2550}, + {679, 8333, 1000},//sun chen@20240111 end {669, 8333, 1000}, {645, 8333, 1000}, {617, 8333, 1000}, @@ -1200,11 +1200,11 @@ static UINT32 ae_adc_tbl[57][3] = { {446, 16666, 2720}, {422, 16666, 2890}, {399, 16666, 3000}, - {376, 16666, 3000}, - {353, 16666, 3000}, - {330, 16666, 3000}, - {308, 16666, 3950},// 12190}, - {286, 16666, 4210},// 26600}, + {376, 16666, 2050}, + {353, 16666, 1130}, + {330, 16666, 1130}, + {308, 16666, 2050},// 12190}, + {286, 16666, 3000},// 26600}, {264, 16666, 4500}, //45770}, {242, 16666, 4740}, {220, 16666, 5100}, diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c b/rtos/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c index 67714dc39..695f9adcf 100755 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/ExifVendor.c @@ -45,6 +45,8 @@ static const INT32 EV_NUMERATOR[(EV_SETTING_MAX)] = { -20// }; +UINT32 jpgexifiso=0,jpgexifexp=0;//sun chen@20240111 + typedef struct { UINT32 MakerNoteCheckID; UINT16 TestData1; @@ -199,10 +201,10 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) UINT32 uiDzoomRatio[2] = {100, 100}; UINT16 uiSceneCaptureType = 0; UINT16 uiSharpness = 0; - UINT32 RecID; - HD_RESULT hd_ret; + //UINT32 RecID; + //HD_RESULT hd_ret; - RecID = HandleID;//ImageApp_MovieMulti_VePort2Imglink(HandleID); + //RecID = HandleID;//ImageApp_MovieMulti_VePort2Imglink(HandleID); //sprintf(UserComment, "EXIF_HDL_ID_%d", HandleID+1); snprintf(UserComment, sizeof(UserComment), "EXIF_HDL_ID_%d", HandleID + 1); @@ -270,12 +272,12 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) // } DBG_DUMP("uiPixelXDimension=%d, uiPixelYDimension=%d\r\n", uiPixelXDimension, uiPixelYDimension); - +/*.............sun chen@20240111 start.................*/ /************** AE info **************/ { UINT32 expo = 0; float fexpo; - AET_STATUS_INFO status = {0}; + //AET_STATUS_INFO status = {0}; #if 0//_TODO AE_GetExifInfo(0, &uiISOSpeed, &expo, &uiAperture[0], &MaxAperture[0]); #else @@ -284,6 +286,7 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) uiAperture[0] = 20; MaxAperture[0] = 20; #endif + /* status.id=RecID; if ((hd_ret = vendor_isp_init()) != HD_OK) { DBG_ERR("vendor_isp_init() failed(%d)\r\n", hd_ret); @@ -293,11 +296,11 @@ void ExifVendor_WriteExifIFD(EXIF_HANDLE_ID HandleID) } if ((hd_ret = vendor_isp_uninit()) != HD_OK) { DBG_ERR("vendor_isp_uninit() failed(%d)\r\n", hd_ret); - } - uiISOSpeed=status.status_info.iso_gain[0]; - expo=status.status_info.expotime[0]; - DBG_MSG("RecID=%d, uiISOSpeed=%d, expo=%d\r\n",RecID,uiISOSpeed,expo); - + }*/ + uiISOSpeed= jpgexifiso;//status.status_info.iso_gain[0]; + expo=jpgexifexp;//status.status_info.expotime[0]; + //DBG_MSG("RecID=%d, uiISOSpeed=%d, expo=%d\r\n",RecID,uiISOSpeed,expo); +/*.............sun chen@20240111 end.................*/ uiFNumber[0] = uiAperture[0]; uiAperture[0] = 20 * log2((float)uiAperture[0] / 10); 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 1b8fa5b39..3f71405aa 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -1465,18 +1465,21 @@ static void MovieFast_Load_Sen_Cfg(MOVIEFAST_IQ_CFG cfg) System_GetSensorInfo(i, SENSOR_IQ_SHADING_PATH, &(sen_cfg.iq_shading_path)); System_GetSensorInfo(i, SENSOR_IQ_DPC_PATH, &(sen_cfg.iq_dpc_path)); System_GetSensorInfo(i, SENSOR_IQ_LDC_PATH, &(sen_cfg.iq_ldc_path)); - +/*.............sun chen@20240111 start.................*/ if(cfg == MOVIEFAST_IQ_VIDEO){ - strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0_vid", size); - } - else{ /* MOVIEFAST_IQ_PHOTO */ - - if(sf_is_night_mode(0) ==TRUE) - strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0", size); + if(sf_is_night_mode(1) ==TRUE) + strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0_vid", size); else strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0_cap", size); } + else{ /* MOVIEFAST_IQ_PHOTO */ + if(sf_is_night_mode(1) ==TRUE) + strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0_vid", size); + else + strncpy(pSenCfg->iq_path.path, "/isp/iq/os05b10_iq_0_cap", size); + } +/*.............sun chen@20240111 end.................*/ ImageApp_MovieMulti_Config(MOVIE_CONFIG_SENSOR_INFO, (UINT32)&sen_cfg); } } @@ -1608,7 +1611,8 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) // UINT32 rec_type = MovieMapping_GetRecType(UI_GetData(FL_MOVIE_SIZE)); Movie_CommPoolInit(); - + /*.............sun chen@20240111 start.................*/ +/* if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2){ //UI_SetData(FL_MOVIE_SIZE, MOVIE_SIZE_CLONE_1920x1080P30_1280x720P30); @@ -1619,7 +1623,8 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) Set_NIGHTMODE(0, 1); //Set_AEMODE(0); } - +*/ +/*.............sun chen@20240111 end.................*/ MovieFast_SetRecInfoByUISetting(); #if (_PACKAGE_DISPLAY_) @@ -1814,8 +1819,33 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) } MovieFast_InstallID(); +DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n"); +// nvt_cmdsys_runcmd("ae set_speed 0 128 700 400 200 "); // dgain mode /dgain th/down speed/up speed1/up speed2 + /*.............sun chen@20240111 end.................*/ + + { + AET_EXTEND_PARAM ext_param = {0}; + ext_param.id = 0; + ext_param.ext_param.dgain_th = 128; + ext_param.ext_param.dgain_mode = 0; + ext_param.ext_param.down_speed = 970; + ext_param.ext_param.up_speed1 = 965; + ext_param.ext_param.up_speed2 = 800; + ext_param.ext_param.hdr_ev = 0; + ext_param.ext_param.fast_ae = 1; + vendor_isp_set_ae(AET_ITEM_EXT_PARAM, &ext_param); + } + { + AET_CONVERGENCE convergence = {0}; + convergence.id = 0; + vendor_isp_get_ae(AET_ITEM_CONVERGENCE, &convergence); + // DBG_DUMP("==============to : %d %d \r\n", convergence.convergence.range_conv.h, convergence.convergence.range_conv.l); + convergence.convergence.skip_frame = 3; + vendor_isp_set_ae(AET_ITEM_CONVERGENCE, &convergence); + } + /*.............sun chen@20240111 end.................*/ + - nvt_cmdsys_runcmd("ae set_speed 0 128 700 700 100 "); //nvt_cmdsys_runcmd("ae dbg 0 256 1 "); HD_VIDEO_FRAME frame_capture = {0}; @@ -1849,7 +1879,8 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) vprc_frm_cnt_ae_preset = vprc_frm_cnt; DBG_DUMP("ae preset vprc frame cnt = %lu\n", vprc_frm_cnt_ae_preset); Set_AEMODE(0); - //setet_preset_param(); + //Set_NIGHTMODE(0, 0); + setet_preset_param(); //sun chen@20240111 } } @@ -1879,13 +1910,13 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) DBG_DUMP("count = %llu, timestamp = %llu\n", frame.count, frame.timestamp); if( vcap_frm_cnt >= PHOTOFAST_START_CAP_FRAME_CNT || - (ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 3))){ + (ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 5))){ if(vcap_frm_cnt >= PHOTOFAST_START_CAP_FRAME_CNT){ DBG_DUMP("triggered by PHOTOFAST_START_CAP_FRAME_CNT\n"); } - else if(ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 3)){ + else if(ae_preset_flag == TRUE && vprc_frm_cnt >= (vprc_frm_cnt_ae_preset + 5)){ DBG_DUMP("triggered by AE preset\n"); } @@ -2060,6 +2091,7 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg) vos_flag_set(MOVIEFAST_FLG_ID, FLGMOVIEFAST_RECSTART); + Set_AEMODE(0); //sun chen@20240111 #if FIX_RECORD_NOISE == ENABLE // UINT32 elapse_time_ms = ((t2 - t1) / 1000); diff --git a/rtos/code/hdal/vendor/isp/drivers/include/ae_alg.h b/rtos/code/hdal/vendor/isp/drivers/include/ae_alg.h index 027594c61..30884e7c2 100755 --- a/rtos/code/hdal/vendor/isp/drivers/include/ae_alg.h +++ b/rtos/code/hdal/vendor/isp/drivers/include/ae_alg.h @@ -234,8 +234,8 @@ typedef struct _AE_EXTEND_PARAM { UINT32 down_speed; UINT32 up_speed1; UINT32 up_speed2; - UINT32 reserved2; - UINT32 reserved3; + UINT32 hdr_ev; + BOOL fast_ae; UINT32 reserved4[AEALG_DYNAMIC_LV_NUM]; UINT32 reserved5[AEALG_DYNAMIC_LV_NUM]; UINT32 reserved6[AEALG_DYNAMIC_LV_NUM]; diff --git a/rtos/code/hdal/vendor/isp/drivers/output/libnvt_ae.a b/rtos/code/hdal/vendor/isp/drivers/output/libnvt_ae.a index 494dc1b9c..e766c7ce4 100644 Binary files a/rtos/code/hdal/vendor/isp/drivers/output/libnvt_ae.a and b/rtos/code/hdal/vendor/isp/drivers/output/libnvt_ae.a differ