From da019bbfa3e60545549f6096a6992806b2c0fc2b Mon Sep 17 00:00:00 2001 From: payton Date: Thu, 27 Jul 2023 14:00:47 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=85=B3=E9=97=AD=E4=B8=80=E4=BA=9B=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SrcCode/UIApp/Photo/UIAppPhoto_Exe.c | 2 +- .../cardv/SrcCode/UIApp/Photo/UIDateImprint.c | 36 +++++++++---------- .../UIApp/PhotoFast/PhotoFastCapDateImprint.c | 20 +++++------ 3 files changed, 29 insertions(+), 29 deletions(-) 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 20a48978e..dfc6e0f02 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c @@ -1602,7 +1602,7 @@ BOOL UiDateImprint_UpdateDate(char *StrBuf, UINT32 buff_len) //printf("[%s:%d]temperStr=%s\n", __FUNCTION__, __LINE__, temperStr); sprintf((char *)StrBuf, "%s %s", temperStr, dateStr); - printf("[%s:%d]StrBuf=%s\n", __FUNCTION__, __LINE__, StrBuf); + //printf("[%s:%d]StrBuf=%s\n", __FUNCTION__, __LINE__, StrBuf); return TRUE; } diff --git a/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c b/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c index 71081a011..f9cded41e 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c @@ -85,7 +85,7 @@ static UINT32 UIDateImprint_GetStampMemSize_LVGL(const lv_font_t *pFont, char* t draw_cfg.string.font = (lv_font_t *)pFont; draw_cfg.string.text = text; - printf("[%s:%d]draw_cfg.string.text=%s\n", __FUNCTION__, __LINE__, draw_cfg.string.text); + DBG_IND("[%s:%d]draw_cfg.string.text=%s\n", __FUNCTION__, __LINE__, draw_cfg.string.text); draw_cfg.align_w = LV_USER_FONT_CONV_ALIGN_W; draw_cfg.align_h = LV_USER_FONT_CONV_ALIGN_H; @@ -98,7 +98,7 @@ static UINT32 UIDateImprint_GetStampMemSize_LVGL(const lv_font_t *pFont, char* t lv_user_font_conv_calc_buffer_size(&draw_cfg, &result); - printf("[%s:%d]result.output_buffer_size=%d\n", __FUNCTION__, __LINE__, result.output_buffer_size); + DBG_IND("[%s:%d]result.output_buffer_size=%d\n", __FUNCTION__, __LINE__, result.output_buffer_size); return result.output_buffer_size; } @@ -148,7 +148,7 @@ static ER FontConv_LVGL(FONT_CONV_IN *pIn, FONT_CONV_OUT *pOut) mem_cfg.output_buffer = (void*)pIn->MemAddr; mem_cfg.output_buffer_size = pIn->MemSize; - printf("[%s:%d]mem_cfg.output_buffer_size=%d\n", __FUNCTION__, __LINE__, mem_cfg.output_buffer_size); + DBG_IND("[%s:%d]mem_cfg.output_buffer_size=%d\n", __FUNCTION__, __LINE__, mem_cfg.output_buffer_size); lv_user_font_conv_calc_buffer_size(&draw_cfg, &result); lv_user_font_conv(&draw_cfg, &mem_cfg); @@ -484,7 +484,7 @@ char * UiDateImprint_InitStrBuf(void) //printf("[%s:%d]temperStr=%s\n", __FUNCTION__, __LINE__, temperStr); snprintf((char *)StampStr, sizeof(StampStr), "%s %s", temperStr, dateStr); - printf("[%s:%d]StampStr=%s\n", __FUNCTION__, __LINE__, StampStr); + DBG_IND("[%s:%d]StampStr=%s\n", __FUNCTION__, __LINE__, StampStr); return StampStr; } @@ -538,7 +538,7 @@ void UiDateImprint_SelStampFont(UINT32 uiImageWidth, char **font, UINT32 *ScaleF red_id = LV_USER_CFG_STAMP_FONT_ID_XS; } - printf("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id); + DBG_IND("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id); *font = (char *) lv_plugin_get_font(red_id)->font; @@ -627,7 +627,7 @@ void UiDateImprint_GetStampFont(UINT32 uiImageWidth, char **font) red_id = LV_USER_CFG_STAMP_FONT_ID_XS; } - printf("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id); + DBG_IND("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id); *font = (char *) lv_plugin_get_font(red_id)->font; @@ -816,7 +816,7 @@ ER UiDateImprint_UpdateData(DATE_IMPRINT_INFO *pInfo) } pStampInfo->PosX = pos.x; pStampInfo->PosY = pos.y; - printf("[%s:%d]pStampInfo->PosX=%d,pStampInfo->PosY=%d\n", __FUNCTION__, __LINE__, pStampInfo->PosX, pStampInfo->PosY); + DBG_IND("[%s:%d]pStampInfo->PosX=%d,pStampInfo->PosY=%d\n", __FUNCTION__, __LINE__, pStampInfo->PosX, pStampInfo->PosY); pStampInfo->Img = pYuvInfo->GenImg; //memcpy(&pStampInfo->Img, &pYuvInfo->GenImg, sizeof(VDO_FRAME)); @@ -914,7 +914,7 @@ void UiDateImprint_DrawBG(DS_STAMP_INFOR *stampInfo, HD_VIDEO_FRAME* Img) //param.rect.y = stampInfo->PosY; param.rect.y = Img->dim.h - param.rect.h; param.type = HD_GFX_RECT_SOLID; - printf("[%s:%d]Img->dim.h=%d,param.rect.h=%d,stampInfo->PosY=%d\n", __FUNCTION__, __LINE__, Img->dim.h, param.rect.h, stampInfo->PosY); + DBG_IND("[%s:%d]Img->dim.h=%d,param.rect.h=%d,stampInfo->PosY=%d\n", __FUNCTION__, __LINE__, Img->dim.h, param.rect.h, stampInfo->PosY); hd_gfx_draw_rect(¶m); } @@ -1069,7 +1069,7 @@ void UiDateImprint_AttachICON(DS_STAMP_INFOR *stampInfo, HD_VIDEO_FRAME* Img, lv param_img.dst_img = *Img; param_img.dst_region.w = (src_img.dim.w / src_img.dim.h) * stampInfo->Img.ph[0]; param_img.dst_region.h = stampInfo->Img.ph[0]; - printf("[%s:%d]padding=%d,param_img.dst_region.w=%d,stampInfo->PosY=%d\n", __FUNCTION__, __LINE__, padding, param_img.dst_region.w, stampInfo->PosY); + DBG_IND("[%s:%d]padding=%d,param_img.dst_region.w=%d,stampInfo->PosY=%d\n", __FUNCTION__, __LINE__, padding, param_img.dst_region.w, stampInfo->PosY); if(res_id == LV_PLUGIN_IMG_ID_ICON_10234_GPS) { param_img.dst_region.x = ALIGN_FLOOR_8(*x_curr_ofs - param_img.dst_region.w); @@ -1116,7 +1116,7 @@ void UiDateImprint_AttachLogo(DS_STAMP_INFOR *stampInfo, HD_VIDEO_FRAME* Img) addr[1] = addr[0] + (lineoff[0] * g_WaterLogo_yuv420_486.uiHeight); vf_init_ex(&logo, g_WaterLogo_yuv420_486.uiWidth, g_WaterLogo_yuv420_486.uiHeight, Img->pxlfmt, lineoff, addr); - printf("[%s:%d]Img->dim.w=%d, Img->dim.h=%d\n", __FUNCTION__, __LINE__, Img->dim.w, Img->dim.h); + DBG_IND("[%s:%d]Img->dim.w=%d, Img->dim.h=%d\n", __FUNCTION__, __LINE__, Img->dim.w, Img->dim.h); param.quality = HD_GFX_SCALE_QUALITY_NULL; param.src_img = logo; @@ -1131,7 +1131,7 @@ void UiDateImprint_AttachLogo(DS_STAMP_INFOR *stampInfo, HD_VIDEO_FRAME* Img) param.dst_region.w = (g_WaterLogo_yuv420_486.uiWidth / g_WaterLogo_yuv420_486.uiHeight) * stampInfo->Img.ph[0]*3; param.dst_region.h = stampInfo->Img.ph[0]*3; - printf("[%s:%d]param.dst_region:%d %d %d %d\n", __FUNCTION__, __LINE__, param.dst_region.x, param.dst_region.y, param.dst_region.w, param.dst_region.h); + DBG_IND("[%s:%d]param.dst_region:%d %d %d %d\n", __FUNCTION__, __LINE__, param.dst_region.x, param.dst_region.y, param.dst_region.w, param.dst_region.h); vf_gfx_scale(¶m, 1); hd_common_mem_free(pa, va); @@ -1272,7 +1272,7 @@ void sf_get_gps_info_str(UINT8 *str, UINT8 type) UINT32 i = 0; UIMenuStoreInfo *puiPara = sf_ui_para_get(); - printf("[%s:%d]puiPara->GpsSwitch=%d,puiPara->Latitude:%s,puiPara->Longitude:%s\n", + DBG_IND("[%s:%d]puiPara->GpsSwitch=%d,puiPara->Latitude:%s,puiPara->Longitude:%s\n", __FUNCTION__, __LINE__, puiPara->GpsSwitch, puiPara->Latitude, puiPara->Longitude); if(puiPara->GpsSwitch == SF_ON) { @@ -1365,7 +1365,7 @@ void sf_get_gps_info_str(UINT8 *str, UINT8 type) str[0] = '\0'; } - printf("[%s:%d]str:%s\n", __FUNCTION__, __LINE__, str); + DBG_IND("[%s:%d]str:%s\n", __FUNCTION__, __LINE__, str); return; } @@ -1390,7 +1390,7 @@ ER UiDateImprint_CopyData(DS_STAMP_INFOR *stampInfo,HD_VIDEO_FRAME* Img, UINT32 UINT32 padding = stampInfo->Img.ph[0]; UINT32 x_curr_ofs = stampInfo->PosX; /* start from date stamp */ - printf("[%s:%d]padding=%d\n", __FUNCTION__, __LINE__, padding); + DBG_IND("[%s:%d]padding=%d\n", __FUNCTION__, __LINE__, padding); vos_perf_mark(&t1); @@ -1402,7 +1402,7 @@ ER UiDateImprint_CopyData(DS_STAMP_INFOR *stampInfo,HD_VIDEO_FRAME* Img, UINT32 year = DateTime_Get(DATETIME_YEAR); month = DateTime_Get(DATETIME_MONTH); day = DateTime_Get(DATETIME_DAY); - printf("[%s:%d]get date time:%04d %02d %02d\n", __FUNCTION__, __LINE__, year, month, day); + DBG_IND("[%s:%d]get date time:%04d %02d %02d\n", __FUNCTION__, __LINE__, year, month, day); moonday = (sf_solar_to_Lunar(year, month, day)) - 1; UiDateImprint_AttachICON(stampInfo, Img, (LV_PLUGIN_IMG_ID_ICON_10200_MOON + moonday), true, padding, &x_curr_ofs); @@ -1415,14 +1415,14 @@ ER UiDateImprint_CopyData(DS_STAMP_INFOR *stampInfo,HD_VIDEO_FRAME* Img, UINT32 batValue -= 1; UiDateImprint_AttachICON(stampInfo, Img, (LV_PLUGIN_IMG_ID_ICON_10230_BATTERT + batValue), true, padding, &x_curr_ofs); - printf("[%s:%d]moon id=%d,battery id=%d\n", __FUNCTION__, __LINE__, + DBG_IND("[%s:%d]moon id=%d,battery id=%d\n", __FUNCTION__, __LINE__, (LV_PLUGIN_IMG_ID_ICON_10200_MOON + moonday), (LV_PLUGIN_IMG_ID_ICON_10230_BATTERT + batValue)); //camid stamp if((puiPara->CamNameSwitch == SF_CAMID_ON) && (puiPara->CamNameStr[0] != '\0')) { snprintf((char *)customString, sizeof(customString), "%s", puiPara->CamNameStr); - printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); + DBG_IND("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); UiDateImprint_AttachString(stampInfo, Img, customString, true, padding, &x_curr_ofs); } @@ -1435,7 +1435,7 @@ ER UiDateImprint_CopyData(DS_STAMP_INFOR *stampInfo,HD_VIDEO_FRAME* Img, UINT32 if(customString[0] != '\0') { //snprintf((char *)customString, sizeof(customString), "N22%c%c34'57\" E113%c%c55'19\"", 0xC2, 0xB0, 0xC2, 0xB0); - printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); + DBG_IND("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); UiDateImprint_AttachString(stampInfo, Img, customString, true, padding, &x_curr_ofs); } diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c index e01d02498..fe66bf15e 100755 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c @@ -247,7 +247,7 @@ void PhotoStamp_get_isp_status_jpg(UINT32 id, char* Buf, UINT32 BufLen) Curr_gsDateTime.tm_min, Curr_gsDateTime.tm_sec); - printf("%s:%d Buf=%s\r\n",__FUNCTION__,__LINE__,Buf); + DBG_IND("%s:%d Buf=%s\r\n",__FUNCTION__,__LINE__,Buf); #endif vendor_isp_uninit(); return; @@ -605,10 +605,10 @@ void UiDateImprint_AttachICON(UINT32 stamp_height, HD_VIDEO_FRAME* Img, lv_plugi param_img.src_region.h = src_img.dim.h; param_img.engine = 0; param_img.dst_img = *Img; - printf("[%s:%d]src_img.dim.w=%d,src_img.dim.h=%d\n", __FUNCTION__, __LINE__, src_img.dim.w, src_img.dim.h); + DBG_IND("[%s:%d]src_img.dim.w=%d,src_img.dim.h=%d\n", __FUNCTION__, __LINE__, src_img.dim.w, src_img.dim.h); param_img.dst_region.w = ((src_img.dim.w / src_img.dim.h) * stamp_height); param_img.dst_region.h = stamp_height; - printf("[%s:%d]param_img.dst_region.w=%d,param_img.dst_region.h=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.w, param_img.dst_region.h); + DBG_IND("[%s:%d]param_img.dst_region.w=%d,param_img.dst_region.h=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.w, param_img.dst_region.h); if(res_id == LV_PLUGIN_IMG_ID_ICON_10234_GPS) { param_img.dst_region.x = (*x_curr_ofs - param_img.dst_region.w); @@ -617,7 +617,7 @@ void UiDateImprint_AttachICON(UINT32 stamp_height, HD_VIDEO_FRAME* Img, lv_plugi { param_img.dst_region.x = (*x_curr_ofs - padding - param_img.dst_region.w); } - printf("[%s:%d]param_img.dst_region.x=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.x); + DBG_IND("[%s:%d]param_img.dst_region.x=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.x); param_img.dst_region.y = param_img.dst_img.dim.h - param_img.dst_region.h - 2; vf_gfx_scale(¶m_img, 1); @@ -668,7 +668,7 @@ void sf_get_gps_info_str(UINT8 *str, UINT8 type) UINT32 i = 0; UIMenuStoreInfo *puiPara = sf_ui_para_get(); - printf("[%s:%d]puiPara->GpsSwitch=%d,puiPara->Latitude:%s,puiPara->Longitude:%s\n", + DBG_IND("[%s:%d]puiPara->GpsSwitch=%d,puiPara->Latitude:%s,puiPara->Longitude:%s\n", __FUNCTION__, __LINE__, puiPara->GpsSwitch, puiPara->Latitude, puiPara->Longitude); if(puiPara->GpsSwitch == SF_ON) { @@ -761,7 +761,7 @@ void sf_get_gps_info_str(UINT8 *str, UINT8 type) str[0] = '\0'; } - printf("[%s:%d]str:%s\n", __FUNCTION__, __LINE__, str); + DBG_IND("[%s:%d]str:%s\n", __FUNCTION__, __LINE__, str); return; } @@ -827,7 +827,7 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg) year = DateTime_Get(DATETIME_YEAR); month = DateTime_Get(DATETIME_MONTH); day = DateTime_Get(DATETIME_DAY); - printf("[%s:%d]get date time:%04d %02d %02d\n", __FUNCTION__, __LINE__, year, month, day); + DBG_IND("[%s:%d]get date time:%04d %02d %02d\n", __FUNCTION__, __LINE__, year, month, day); moonday = (sf_solar_to_Lunar(year, month, day)) - 1; UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_10200_MOON + moonday, true, padding, &x_curr_ofs); @@ -839,13 +839,13 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg) } batValue -= 1; UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_10230_BATTERT + batValue, true, padding, &x_curr_ofs); - printf("[%s:%d]moonday=%d,batValue=%d\n", __FUNCTION__, __LINE__, moonday, batValue); + DBG_IND("[%s:%d]moonday=%d,batValue=%d\n", __FUNCTION__, __LINE__, moonday, batValue); //camid stamp if((puiPara->CamNameSwitch == SF_CAMID_ON) && (puiPara->CamNameStr[0] != '\0')) { snprintf((char *)customString, sizeof(customString), "%s", puiPara->CamNameStr); - printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); + DBG_IND("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); //sprintf(customString, "Cam1"); UiDateImprint_AttachString(src_img.dim.h, pDstImg, customString, true, padding, &x_curr_ofs); } @@ -859,7 +859,7 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg) if(customString[0] != '\0') { //snprintf((char *)customString, sizeof(customString), "N22%c%c34'57\" E113%c%c55'19\"", 0xC2, 0xB0, 0xC2, 0xB0); - printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); + DBG_IND("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString); UiDateImprint_AttachString(src_img.dim.h, pDstImg, customString, true, padding, &x_curr_ofs); }