1.修改缩略图水印问题
This commit is contained in:
parent
b04488bb59
commit
7148a60b5d
|
@ -2866,12 +2866,14 @@ INT32 PhotoExe_OnEV(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
INT32 PhotoExe_OnCaptureSize(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
INT32 PhotoExe_OnCaptureSize(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
{
|
{
|
||||||
UINT32 uhSelect = 0;
|
UINT32 uhSelect = 0;
|
||||||
DBG_IND("%d \r\n", paramArray[0]);
|
DBG_DUMP("PhotoExe_OnCaptureSize %d \r\n", paramArray[0]);
|
||||||
|
|
||||||
if (paramNum > 0) {
|
if (paramNum > 0) {
|
||||||
uhSelect = paramArray[0];
|
uhSelect = paramArray[0];
|
||||||
}
|
}
|
||||||
UI_SetData(FL_PHOTO_SIZE, uhSelect);
|
|
||||||
|
// uhSelect = PHOTO_SIZE_40M;
|
||||||
|
// UI_SetData(FL_PHOTO_SIZE, uhSelect);
|
||||||
Photo_SetUserIndex(PHOTO_USR_SIZE, uhSelect);
|
Photo_SetUserIndex(PHOTO_USR_SIZE, uhSelect);
|
||||||
DBG_IND("photo capture size %d\r\n", uhSelect);
|
DBG_IND("photo capture size %d\r\n", uhSelect);
|
||||||
return NVTEVT_CONSUME;
|
return NVTEVT_CONSUME;
|
||||||
|
@ -5740,7 +5742,6 @@ static INT32 PhotoExe_Preview_SliceEncode_Encode_Primary(
|
||||||
|
|
||||||
/* check restart */
|
/* check restart */
|
||||||
if(restart == FALSE){
|
if(restart == FALSE){
|
||||||
CHKPNT;
|
|
||||||
ret = HD_ERR_SYS;
|
ret = HD_ERR_SYS;
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
@ -5939,15 +5940,6 @@ INT32 PhotoExe_Preview_SliceEncode(VControl *pCtrl, UINT32 paramNum, UINT32 *par
|
||||||
Ux_SendEvent(&CustomPhotoObjCtrl, NVTEVT_EXE_INIT_DATE_BUF, 0);
|
Ux_SendEvent(&CustomPhotoObjCtrl, NVTEVT_EXE_INIT_DATE_BUF, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == ENABLE
|
|
||||||
/*******************************************************************
|
|
||||||
* Stamp on the src frame
|
|
||||||
******************************************************************/
|
|
||||||
if(PhotoExe_Preview_SliceEncode_Src_DateStamp(&video_frame, &src_slice_info, &dst_slice_info) != E_OK){
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PHOTO_SLICE_ENC_DBG_PRIMARY_YUV
|
#if PHOTO_SLICE_ENC_DBG_PRIMARY_YUV
|
||||||
|
|
||||||
PhotoExe_Preview_SliceEncode_Dump_Frame(video_frame);
|
PhotoExe_Preview_SliceEncode_Dump_Frame(video_frame);
|
||||||
|
@ -5993,6 +5985,10 @@ INT32 PhotoExe_Preview_SliceEncode(VControl *pCtrl, UINT32 paramNum, UINT32 *par
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(PhotoExe_Preview_SliceEncode_DateStamp(&video_frame_out_screennail, CAP_DS_EVENT_SCR) != E_OK){
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_SCR_SCALE_E);
|
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_SCR_SCALE_E);
|
||||||
|
|
||||||
/* thumbnail scale, 2pass from screennail */
|
/* thumbnail scale, 2pass from screennail */
|
||||||
|
@ -6007,11 +6003,11 @@ INT32 PhotoExe_Preview_SliceEncode(VControl *pCtrl, UINT32 paramNum, UINT32 *par
|
||||||
/* screennail date stamp */
|
/* screennail date stamp */
|
||||||
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_THUMB_STAMP_S);
|
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_THUMB_STAMP_S);
|
||||||
|
|
||||||
#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == DISABLE
|
//#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == DISABLE
|
||||||
if(PhotoExe_Preview_SliceEncode_DateStamp(&video_frame_out_screennail, CAP_DS_EVENT_SCR) != E_OK){
|
// if(PhotoExe_Preview_SliceEncode_DateStamp(&video_frame_out_screennail, CAP_DS_EVENT_SCR) != E_OK){
|
||||||
goto EXIT;
|
// goto EXIT;
|
||||||
}
|
// }
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_THUMB_STAMP_E);
|
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_THUMB_STAMP_E);
|
||||||
|
|
||||||
|
@ -6024,6 +6020,16 @@ INT32 PhotoExe_Preview_SliceEncode(VControl *pCtrl, UINT32 paramNum, UINT32 *par
|
||||||
|
|
||||||
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_QVIEW_E);
|
SLICE_ENC_VOS_TICK_TRIG(SLICE_ENC_VOS_TICK_QVIEW_E);
|
||||||
|
|
||||||
|
|
||||||
|
#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == ENABLE
|
||||||
|
/*******************************************************************
|
||||||
|
* Stamp on the src frame
|
||||||
|
******************************************************************/
|
||||||
|
if(PhotoExe_Preview_SliceEncode_Src_DateStamp(&video_frame, &src_slice_info, &dst_slice_info) != E_OK){
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* Primary
|
* Primary
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
@ -6463,7 +6469,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
slice_encode_thumbnail_info->bs_buf_mem_info.blk_size = (CFG_THUMBNAIL_W * CFG_THUMBNAIL_H) / 2;
|
slice_encode_thumbnail_info->bs_buf_mem_info.blk_size = (CFG_THUMBNAIL_W * CFG_THUMBNAIL_H) / 2;
|
||||||
if(PhotoExe_Preview_SliceEncode_Alloc_Buffer(&slice_encode_thumbnail_info->bs_buf_mem_info, "slice_enc_thumbnail") != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Alloc_Buffer(&slice_encode_thumbnail_info->bs_buf_mem_info, "slice_enc_thumbnail") != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6474,7 +6479,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
|
|
||||||
exif_mem_info.blk_size = CFG_JPG_HEADER_SIZE;
|
exif_mem_info.blk_size = CFG_JPG_HEADER_SIZE;
|
||||||
if(PhotoExe_Preview_SliceEncode_Alloc_Buffer(&exif_mem_info, "slice_enc_exif") != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Alloc_Buffer(&exif_mem_info, "slice_enc_exif") != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6498,7 +6502,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
* Calculate dst slice info
|
* Calculate dst slice info
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
if(PhotoExe_Preview_SliceEncode_Get_Curr_Dst_Slice_Info(&dst_slice_info, queue_ele_in->frame) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Get_Curr_Dst_Slice_Info(&dst_slice_info, queue_ele_in->frame) != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6507,15 +6510,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
PhotoExe_Preview_SliceEncode_Get_Src_Slice_Info(&dst_slice_info, &src_slice_info, queue_ele_in->frame);
|
PhotoExe_Preview_SliceEncode_Get_Src_Slice_Info(&dst_slice_info, &src_slice_info, queue_ele_in->frame);
|
||||||
|
|
||||||
#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == ENABLE
|
|
||||||
/*******************************************************************
|
|
||||||
* Stamp on the src frame
|
|
||||||
******************************************************************/
|
|
||||||
if(PhotoExe_Preview_SliceEncode_Src_DateStamp(&queue_ele_in->frame, &src_slice_info, &dst_slice_info) != E_OK){
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PHOTO_SLICE_ENC_DBG_PRIMARY_YUV
|
#if PHOTO_SLICE_ENC_DBG_PRIMARY_YUV
|
||||||
|
|
||||||
PhotoExe_Preview_SliceEncode_Dump_Frame(queue_ele_in->frame);
|
PhotoExe_Preview_SliceEncode_Dump_Frame(queue_ele_in->frame);
|
||||||
|
@ -6542,7 +6536,7 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* Screennail & Thumbnail Scale
|
* Screennail & Thumbnail Scale
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
|
@ -6551,6 +6545,10 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(PhotoExe_Preview_SliceEncode_DateStamp(&video_frame_out_screennail, CAP_DS_EVENT_SCR) != E_OK){
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
/* thumbnail scale, 2pass from screennail */
|
/* thumbnail scale, 2pass from screennail */
|
||||||
if(PhotoExe_Preview_SliceEncode_Scale_Thumbnail(&video_frame_out_screennail, &video_frame_out_thumbnail) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Scale_Thumbnail(&video_frame_out_screennail, &video_frame_out_thumbnail) != E_OK){
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
|
@ -6567,6 +6565,17 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
// goto EXIT;
|
// goto EXIT;
|
||||||
// }
|
// }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if PHOTO_PREVIEW_SLICE_ENC_SRC_STAMP == ENABLE
|
||||||
|
/*******************************************************************
|
||||||
|
* Stamp on the src frame
|
||||||
|
******************************************************************/
|
||||||
|
if(PhotoExe_Preview_SliceEncode_Src_DateStamp(&queue_ele_in->frame, &src_slice_info, &dst_slice_info) != E_OK){
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* Primary
|
* Primary
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
@ -6576,7 +6585,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_primary_info->enc_path_id, primary_quality);
|
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_primary_info->enc_path_id, primary_quality);
|
||||||
|
|
||||||
if(PhotoExe_Preview_SliceEncode_Encode_Primary(&queue_ele_in->frame, src_slice_info, dst_slice_info, &enc_accum_size, &primary_quality) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Encode_Primary(&queue_ele_in->frame, src_slice_info, dst_slice_info, &enc_accum_size, &primary_quality) != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6598,14 +6606,12 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
|
|
||||||
#if CFG_JPG_PREVIEW_SLICE_ENC_RC_SCREENNAIL
|
#if CFG_JPG_PREVIEW_SLICE_ENC_RC_SCREENNAIL
|
||||||
if(PhotoExe_Preview_SliceEncode_Encode_Screennail_RC(&video_frame_out_screennail, &screennail_quality) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Encode_Screennail_RC(&video_frame_out_screennail, &screennail_quality) != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_screennail_info->enc_path_id, CFG_JPG_PREVIEW_SLICE_ENC_INIT_QUALITY_SCREENNAIL);
|
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_screennail_info->enc_path_id, CFG_JPG_PREVIEW_SLICE_ENC_INIT_QUALITY_SCREENNAIL);
|
||||||
|
|
||||||
if(PhotoExe_Preview_SliceEncode_Encode_Screennail(&video_frame_out_screennail) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Encode_Screennail(&video_frame_out_screennail) != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -6615,7 +6621,6 @@ INT32 PhotoExe_Preview_SliceEncode_CB2(void* user_data)
|
||||||
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_thumbnail_info->enc_path_id, CFG_JPG_PREVIEW_SLICE_ENC_INIT_QUALITY_THUMBNAIL);
|
PhotoExe_Preview_SliceEncode_Encode_Set_Out(slice_encode_thumbnail_info->enc_path_id, CFG_JPG_PREVIEW_SLICE_ENC_INIT_QUALITY_THUMBNAIL);
|
||||||
|
|
||||||
if(PhotoExe_Preview_SliceEncode_Encode_Thumbnail(&video_frame_out_thumbnail) != E_OK){
|
if(PhotoExe_Preview_SliceEncode_Encode_Thumbnail(&video_frame_out_thumbnail) != E_OK){
|
||||||
CHKPNT;
|
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -473,11 +473,10 @@ char * UiDateImprint_InitStrBuf(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATEIMPRINT_DATE_TIME:
|
case DATEIMPRINT_DATE_TIME:
|
||||||
|
default:
|
||||||
dateStr = DateTime_MakeYMDHMS();
|
dateStr = DateTime_MakeYMDHMS();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -853,21 +852,21 @@ void UiDateImprint_ChkUpdateData(DATE_IMPRINT_INFO *pInfo)
|
||||||
DBG_IND("event=%d, bScreenNailEn=%d, bGenEn=%d\r\n",pInfo->pCapInfo->event,bScreenNailEn,bGenEn);
|
DBG_IND("event=%d, bScreenNailEn=%d, bGenEn=%d\r\n",pInfo->pCapInfo->event,bScreenNailEn,bGenEn);
|
||||||
|
|
||||||
//if (pInfo->pCapInfo->event == CAP_DS_EVENT_QV || pInfo->pCapInfo->event == CAP_DS_EVENT_SCR) {
|
//if (pInfo->pCapInfo->event == CAP_DS_EVENT_QV || pInfo->pCapInfo->event == CAP_DS_EVENT_SCR) {
|
||||||
if (pInfo->pCapInfo->event == CAP_DS_EVENT_PRI) {
|
if (1/*pInfo->pCapInfo->event == CAP_DS_EVENT_PRI*/) {
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
||||||
#else
|
#else
|
||||||
if ((UI_GetData(FL_CONTINUE_SHOT) == CONTINUE_SHOT_BURST_3)) {
|
if ((UI_GetData(FL_CONTINUE_SHOT) == CONTINUE_SHOT_BURST_3)) {
|
||||||
if (pInfo->pic_cnt == 0)
|
if (pInfo->pic_cnt == 0)
|
||||||
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
||||||
else
|
else
|
||||||
pInfo->isStrDirty = FALSE;
|
pInfo->isStrDirty = FALSE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
pInfo->isStrDirty = UiDateImprint_UpdateDate(pInfo->StrBuf,sizeof(pInfo->StrBuf));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
// need to update primary info to screenail
|
// need to update primary info to screenail
|
||||||
if (pInfo->pCapInfo->event == CAP_DS_EVENT_PRI)
|
if (pInfo->pCapInfo->event == CAP_DS_EVENT_PRI)
|
||||||
|
@ -912,7 +911,7 @@ void UiDateImprint_DrawBG(DS_STAMP_INFOR *stampInfo, HD_VIDEO_FRAME* Img)
|
||||||
param.color = LV_USER_CFG_STAMP_COLOR_BACKGROUND; /* ARGB format */
|
param.color = LV_USER_CFG_STAMP_COLOR_BACKGROUND; /* ARGB format */
|
||||||
param.thickness = 10;
|
param.thickness = 10;
|
||||||
param.rect.w = Img->dim.w;
|
param.rect.w = Img->dim.w;
|
||||||
param.rect.h = stampInfo->Img.dim.h*11/10; /*add heigt*/
|
param.rect.h = (stampInfo->Img.dim.h/10)*12;
|
||||||
param.rect.x = 0;
|
param.rect.x = 0;
|
||||||
//param.rect.y = stampInfo->PosY;
|
//param.rect.y = stampInfo->PosY;
|
||||||
param.rect.y = Img->dim.h - param.rect.h;
|
param.rect.y = Img->dim.h - param.rect.h;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user