本文整理汇总了C++中SAMPLE_PRT函数的典型用法代码示例。如果您正苦于以下问题:C++ SAMPLE_PRT函数的具体用法?C++ SAMPLE_PRT怎么用?C++ SAMPLE_PRT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SAMPLE_PRT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SAMPLE_COMM_VO_StopChn
HI_S32 SAMPLE_COMM_VO_StopChn(VO_LAYER VoLayer, SAMPLE_VO_MODE_E enMode)
{
HI_S32 i;
HI_S32 s32Ret = HI_SUCCESS;
HI_U32 u32WndNum = 0;
switch (enMode)
{
case VO_MODE_1MUX:
{
u32WndNum = 1;
break;
}
case VO_MODE_2MUX:
{
u32WndNum = 2;
break;
}
default:
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
for (i=0; i<u32WndNum; i++)
{
s32Ret = HI_MPI_VO_DisableChn(VoLayer, i);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
}
return s32Ret;
}
示例2: SAMPLE_COMM_VO_StartLayer
HI_S32 SAMPLE_COMM_VO_StartLayer(VO_LAYER VoLayer,const VO_VIDEO_LAYER_ATTR_S *pstLayerAttr, HI_BOOL bVgsBypass)
{
HI_S32 s32Ret = HI_SUCCESS;
if (!bVgsBypass)
{
s32Ret = HI_MPI_VO_SetDispBufLen(VoLayer, 3);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
}
s32Ret = HI_MPI_VO_SetVideoLayerAttr(VoLayer, pstLayerAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
s32Ret = HI_MPI_VO_EnableVideoLayer(VoLayer);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
return s32Ret;
}
示例3: SAMPLE_COMM_VPSS_StopGroup
HI_S32 SAMPLE_COMM_VPSS_StopGroup(VPSS_GRP VpssGrp)
{
HI_S32 s32Ret;
if (VpssGrp < 0 || VpssGrp > VPSS_MAX_GRP_NUM)
{
printf("VpssGrp%d is out of rang[0,%d]. \n", VpssGrp, VPSS_MAX_GRP_NUM);
return HI_FAILURE;
}
s32Ret = HI_MPI_VPSS_StopGrp(VpssGrp);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("%s failed with %#x\n", __FUNCTION__, s32Ret);
return HI_FAILURE;
}
s32Ret = HI_MPI_VPSS_DestroyGrp(VpssGrp);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("%s failed with %#x\n", __FUNCTION__, s32Ret);
return HI_FAILURE;
}
return HI_SUCCESS;
}
示例4: SAMPLE_COMM_SYS_CalcPicVbBlkSize
/******************************************************************************
* function : calculate VB Block size of picture.
******************************************************************************/
HI_U32 SAMPLE_COMM_SYS_CalcPicVbBlkSize(VIDEO_NORM_E enNorm, PIC_SIZE_E enPicSize, PIXEL_FORMAT_E enPixFmt, HI_U32 u32AlignWidth)
{
HI_S32 s32Ret = HI_FAILURE;
SIZE_S stSize;
s32Ret = SAMPLE_COMM_SYS_GetPicSize(enNorm, enPicSize, &stSize);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("get picture size[%d] failed!\n", enPicSize);
return HI_FAILURE;
}
if (PIXEL_FORMAT_YUV_SEMIPLANAR_422 != enPixFmt && PIXEL_FORMAT_YUV_SEMIPLANAR_420 != enPixFmt)
{
SAMPLE_PRT("pixel format[%d] input failed!\n", enPixFmt);
return HI_FAILURE;
}
if (16!=u32AlignWidth && 32!=u32AlignWidth && 64!=u32AlignWidth)
{
SAMPLE_PRT("system align width[%d] input failed!\n",\
u32AlignWidth);
return HI_FAILURE;
}
//SAMPLE_PRT("w:%d, u32AlignWidth:%d\n", CEILING_2_POWER(stSize.u32Width,u32AlignWidth), u32AlignWidth);
return (CEILING_2_POWER(stSize.u32Width, u32AlignWidth) * \
CEILING_2_POWER(stSize.u32Height,u32AlignWidth) * \
((PIXEL_FORMAT_YUV_SEMIPLANAR_422 == enPixFmt)?2:1.5));
}
示例5: SAMPLE_COMM_VENC_Stop
/******************************************************************************
* funciton : Stop venc ( stream mode -- H264, MJPEG )
******************************************************************************/
HI_S32 SAMPLE_COMM_VENC_Stop(VENC_CHN VencChn)
{
HI_S32 s32Ret;
/******************************************
step 1: Stop Recv Pictures
******************************************/
s32Ret = HI_MPI_VENC_StopRecvPic(VencChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("HI_MPI_VENC_StopRecvPic vechn[%d] failed with %#x!\n",\
VencChn, s32Ret);
return HI_FAILURE;
}
/******************************************
step 2: Distroy Venc Channel
******************************************/
s32Ret = HI_MPI_VENC_DestroyChn(VencChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("HI_MPI_VENC_DestroyChn vechn[%d] failed with %#x!\n",\
VencChn, s32Ret);
return HI_FAILURE;
}
return HI_SUCCESS;
}
示例6: SAMPLE_COMM_VI_ADStart
/*****************************************************************************
* function : get vi parameter, according to vi type
*****************************************************************************/
HI_S32 SAMPLE_COMM_VI_ADStart(SAMPLE_VI_MODE_E enViMode, VIDEO_NORM_E enNorm)
{
VI_WORK_MODE_E enWorkMode;
HI_S32 s32Ret;
switch (enViMode)
{
case SAMPLE_VI_MODE_1_D1:
case SAMPLE_VI_MODE_1_D1Cif:
enWorkMode = VI_WORK_MODE_4Multiplex;
s32Ret = SAMPLE_AD_CfgV_D1(enNorm, enWorkMode);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_TW2865_CfgV failed with %#x!\n",\
s32Ret);
return HI_FAILURE;
}
break;
case SAMPLE_VI_MODE_16_D1:
case SAMPLE_VI_MODE_8_D1:
case SAMPLE_VI_MODE_4_D1:
case SAMPLE_VI_MODE_16_Cif:
case SAMPLE_VI_MODE_16_2Cif:
case SAMPLE_VI_MODE_8_2Cif:
case SAMPLE_VI_MODE_8_D1Cif:
case SAMPLE_VI_MODE_16_D1Cif:
enWorkMode = VI_WORK_MODE_4Multiplex;
s32Ret = SAMPLE_AD_CfgV_D1(enNorm, enWorkMode);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_TW2865_CfgV failed with %#x!\n",\
s32Ret);
return HI_FAILURE;
}
break;
case SAMPLE_VI_MODE_16_960H:
enWorkMode = VI_WORK_MODE_4Multiplex;
s32Ret = SAMPLE_AD_CfgV_960H(enNorm, enWorkMode);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_TW2960_CfgV failed with %#x!\n",\
s32Ret);
return HI_FAILURE;
}
break;
case SAMPLE_VI_MODE_4_720P:
case SAMPLE_VI_MODE_1_720P:
break;
case SAMPLE_VI_MODE_4_1080P:
case SAMPLE_VI_MODE_1_1080P:
break;
default:
SAMPLE_PRT("AD not support!\n");
return HI_FAILURE;
}
return HI_SUCCESS;
}
示例7: while
/******************************************************************************
* funciton : vda OD mode thread process
******************************************************************************/
HI_VOID *SAMPLE_COMM_VDA_OdGetResult(HI_VOID *pdata)
{
HI_S32 i;
HI_S32 s32Ret;
VDA_CHN VdaChn;
VDA_DATA_S stVdaData;
HI_U32 u32RgnNum;
VDA_OD_PARAM_S *pgs_stOdParam;
//FILE *fp=stdout;
int num = 0;
pgs_stOdParam = (VDA_OD_PARAM_S *)pdata;
VdaChn = pgs_stOdParam->VdaChn;
while(HI_TRUE == pgs_stOdParam->bThreadStart)
{
s32Ret = HI_MPI_VDA_GetData(VdaChn,&stVdaData,HI_TRUE);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VDA_GetData failed with %#x!\n", s32Ret);
return NULL;
}
// fprintf(stdout, "HI_MPI_VDA_GetData od succeed\n");
//SAMPLE_COMM_VDA_OdPrt(fp, &stVdaData);
u32RgnNum = stVdaData.unData.stOdData.u32RgnNum;
// fprintf(stdout, "u32RgnNum = %d\n", u32RgnNum);
for(i=0; i<u32RgnNum; i++)
{
if(HI_TRUE == stVdaData.unData.stOdData.abRgnAlarm[i])
{
num++;
printf("%d Rgn--%d,Occ!\n", num, i);
// gettimeofday(&start, NULL);
// Log("\n");
s32Ret = HI_MPI_VDA_ResetOdRegion(VdaChn,i);
// Print_Time_Diff(start);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VDA_ResetOdRegion failed with %#x!\n", s32Ret);
return NULL;
}
}
}
s32Ret = HI_MPI_VDA_ReleaseData(VdaChn,&stVdaData);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VDA_ReleaseData failed with %#x!\n", s32Ret);
return NULL;
}
usleep(200*1000);
}
return HI_NULL;
}
示例8: SAMPLE_TW2960_CfgV
HI_S32 SAMPLE_TW2960_CfgV(VIDEO_NORM_E enVideoMode,VI_WORK_MODE_E enWorkMode)
{
int fd, i;
int video_mode;
tw2865_video_norm stVideoMode;
tw2865_work_mode work_mode;
int chip_cnt = 4;
fd = open(TW2960_FILE, O_RDWR);
if (fd < 0)
{
SAMPLE_PRT("open 2960(%s) fail\n", TW2960_FILE);
return -1;
}
video_mode = (VIDEO_ENCODING_MODE_PAL == enVideoMode) ? TW2960_PAL : TW2960_NTSC ;
for (i=0; i<chip_cnt; i++)
{
stVideoMode.chip = i;
stVideoMode.mode = video_mode;
if (ioctl(fd, TW2960_SET_VIDEO_NORM, &stVideoMode))
{
SAMPLE_PRT("set tw2865(%d) video mode fail\n", i);
close(fd);
return -1;
}
}
for (i=0; i<chip_cnt; i++)
{
work_mode.chip = i;
if (VI_WORK_MODE_4Multiplex== enWorkMode)
{
work_mode.mode = TW2960_4D1_MODE;
}
else if (VI_WORK_MODE_2Multiplex== enWorkMode)
{
work_mode.mode = TW2960_2D1_MODE;
}
else if (VI_WORK_MODE_1Multiplex == enWorkMode)
{
work_mode.mode = TW2960_1D1_MODE;
}
else
{
SAMPLE_PRT("work mode not support\n");
return -1;
}
ioctl(fd, TW2960_SET_WORK_MODE, &work_mode);
}
close(fd);
return 0;
}
示例9: SAMPLE_COMM_VI_Stop
/*****************************************************************************
* function : stop vi accroding to product type
*****************************************************************************/
HI_S32 SAMPLE_COMM_VI_Stop(SAMPLE_VI_MODE_E enViMode)
{
VI_DEV ViDev;
VI_CHN ViChn;
HI_S32 i;
HI_S32 s32Ret;
SAMPLE_VI_PARAM_S stViParam;
/*** get parameter from Sample_Vi_Mode ***/
s32Ret = SAMPLE_COMM_VI_Mode2Param(enViMode, &stViParam);
if (HI_SUCCESS !=s32Ret)
{
SAMPLE_PRT("SAMPLE_COMM_VI_Mode2Param failed!\n");
return HI_FAILURE;
}
/*** Stop VI Chn ***/
for(i=0;i<stViParam.s32ViChnCnt;i++)
{
/* Stop vi phy-chn */
ViChn = i * stViParam.s32ViChnInterval;
s32Ret = HI_MPI_VI_DisableChn(ViChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("SAMPLE_COMM_VI_StopChn failed with %#x\n",s32Ret);
return HI_FAILURE;
}
/* HD mode, we will stop vi sub-chn */
if (HI_TRUE == SAMPLE_COMM_VI_IsHd(enViMode))
{
ViChn += 16;
s32Ret = HI_MPI_VI_DisableChn(ViChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("SAMPLE_COMM_VI_StopChn failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}
}
/*** Stop VI Dev ***/
for(i=0; i<stViParam.s32ViDevCnt; i++)
{
ViDev = i * stViParam.s32ViDevInterval;
s32Ret = HI_MPI_VI_DisableDev(ViDev);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("SAMPLE_COMM_VI_StopDev failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}
return HI_SUCCESS;
}
示例10: SAMPLE_IVE_Part_Canny
/******************************************************************************
* function : show part canny sample
******************************************************************************/
static HI_VOID SAMPLE_IVE_Part_Canny(SAMPLE_IVE_CANNY_INFO_S* pstCannyInfo)
{
HI_S32 s32Ret = HI_SUCCESS;
HI_BOOL bInstant = HI_TRUE;
HI_BOOL bBlock = HI_TRUE;
HI_BOOL bFinish = HI_FALSE;
IVE_HANDLE IveHandle;
IVE_DST_IMAGE_S stDstAng;
memset(&stDstAng, 0, sizeof(IVE_DST_IMAGE_S));
s32Ret = SAMPLE_COMM_IVE_ReadFile(&pstCannyInfo->stSrc, pstCannyInfo->pFpSrc);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_COMM_IVE_ReadFile fail\n");
return;
}
bInstant = HI_FALSE;
s32Ret = HI_MPI_IVE_MagAndAng(&IveHandle, &pstCannyInfo->stSrc, &pstCannyInfo->stMag, \
&stDstAng, &pstCannyInfo->stMagAndAngCtrl, bInstant);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_MagAndAng fail,Error(%#x)\n", s32Ret);
return;
}
bInstant = HI_TRUE;
s32Ret = HI_MPI_IVE_Thresh_U16(&IveHandle, &pstCannyInfo->stMag, &pstCannyInfo->stEdge, \
&pstCannyInfo->stThrU16Ctrl, bInstant);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_Thresh_U16 fail,Error(%#x)\n", s32Ret);
return;
}
s32Ret = HI_MPI_IVE_Query(IveHandle, &bFinish, bBlock);
while (HI_ERR_IVE_QUERY_TIMEOUT == s32Ret)
{
usleep(100);
s32Ret = HI_MPI_IVE_Query(IveHandle, &bFinish, bBlock);
}
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_Query fail,Error(%#x)\n", s32Ret);
return;
}
s32Ret = SAMPLE_COMM_IVE_WriteFile(&pstCannyInfo->stEdge, pstCannyInfo->pFpDst);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_COMM_IVE_WriteFile fail\n");
return;
}
}
示例11: SAMPLE_IVE_Complate_Canny
/******************************************************************************
* function : show complate canny sample
******************************************************************************/
static HI_VOID SAMPLE_IVE_Complate_Canny(SAMPLE_IVE_CANNY_INFO_S *pstCannyInfo)
{
HI_S32 s32Ret = HI_SUCCESS;
HI_BOOL bInstant = HI_TRUE;
HI_BOOL bBlock = HI_TRUE;
HI_BOOL bFinish = HI_FALSE;
IVE_HANDLE IveHandle;
s32Ret = SAMPLE_COMM_IVE_ReadFile(&(pstCannyInfo->stSrc),pstCannyInfo->pFpSrc);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_COMM_IVE_ReadFile fail\n");
return;
}
s32Ret = HI_MPI_IVE_CannyHysEdge(&IveHandle, &pstCannyInfo->stSrc, \
&pstCannyInfo->stEdge, &pstCannyInfo->stStack, \
&pstCannyInfo->stCannyHysEdgeCtrl, bInstant);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_CannyHysEdge fail,Error(%#x)\n",s32Ret);
return;
}
s32Ret = HI_MPI_IVE_Query(IveHandle, &bFinish, bBlock);
while(HI_ERR_IVE_QUERY_TIMEOUT == s32Ret)
{
usleep(100);
s32Ret = HI_MPI_IVE_Query(IveHandle,&bFinish,bBlock);
}
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_Query fail,Error(%#x)\n",s32Ret);
return;
}
s32Ret = HI_MPI_IVE_CannyEdge(&pstCannyInfo->stEdge, &pstCannyInfo->stStack);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_IVE_CannyEdge fail,Error(%#x)\n",s32Ret);
return;
}
s32Ret = SAMPLE_COMM_IVE_WriteFile(&pstCannyInfo->stEdge,pstCannyInfo->pFpDst);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("SAMPLE_COMM_IVE_WriteFile fail\n");
return;
}
}
示例12: SAMPLE_COMM_VPSS_StartGroup
HI_S32 SAMPLE_COMM_VPSS_StartGroup(VPSS_GRP VpssGrp, VPSS_GRP_ATTR_S *pstVpssGrpAttr)
{
HI_S32 s32Ret;
VPSS_GRP_PARAM_S stVpssParam;
if (VpssGrp < 0 || VpssGrp > VPSS_MAX_GRP_NUM)
{
printf("VpssGrp%d is out of rang. \n", VpssGrp);
return HI_FAILURE;
}
if (HI_NULL == pstVpssGrpAttr)
{
printf("null ptr,line%d. \n", __LINE__);
return HI_FAILURE;
}
s32Ret = HI_MPI_VPSS_CreateGrp(VpssGrp, pstVpssGrpAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_CreateGrp failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
/*** set vpss param ***/
s32Ret = HI_MPI_VPSS_GetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
stVpssParam.u32MotionThresh = 0;
s32Ret = HI_MPI_VPSS_SetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
s32Ret = HI_MPI_VPSS_StartGrp(VpssGrp);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_StartGrp failed with %#x\n", s32Ret);
return HI_FAILURE;
}
return HI_SUCCESS;
}
示例13: SAMPLE_COMM_VGS_FillRect
HI_S32 SAMPLE_COMM_VGS_FillRect(VIDEO_FRAME_INFO_S *pstFrmInfo, SAMPLE_RECT_ARRAY_S *pstRect,HI_U32 u32Color)
{
VGS_HANDLE VgsHandle;
HI_S32 s32Ret = HI_SUCCESS;
HI_U16 i;
VGS_TASK_ATTR_S stVgsTask;
VGS_ADD_COVER_S stVgsAddCover;
if(0 == pstRect->u16Num)
{
return s32Ret;
}
s32Ret = HI_MPI_VGS_BeginJob(&VgsHandle);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("Vgs begin job fail,Error(%#x)\n",s32Ret);
return s32Ret;
}
memcpy(&stVgsTask.stImgIn,pstFrmInfo,sizeof(VIDEO_FRAME_INFO_S));
memcpy(&stVgsTask.stImgOut,pstFrmInfo,sizeof(VIDEO_FRAME_INFO_S));
stVgsAddCover.enCoverType = COVER_QUAD_RANGLE;
stVgsAddCover.u32Color = u32Color;
for(i = 0;i < pstRect->u16Num;i++)
{
stVgsAddCover.stQuadRangle.bSolid = HI_FALSE;
stVgsAddCover.stQuadRangle.u32Thick = 2;
memcpy(stVgsAddCover.stQuadRangle.stPoint,pstRect->astRect[i].astPoint,sizeof(pstRect->astRect[i].astPoint));
s32Ret = HI_MPI_VGS_AddCoverTask(VgsHandle, &stVgsTask, &stVgsAddCover);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VGS_AddCoverTask fail,Error(%#x)\n",s32Ret);
HI_MPI_VGS_CancelJob(VgsHandle);
return s32Ret;
}
}
s32Ret = HI_MPI_VGS_EndJob(VgsHandle);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VGS_EndJob fail,Error(%#x)\n",s32Ret);
HI_MPI_VGS_CancelJob(VgsHandle);
return s32Ret;
}
return s32Ret;
}
示例14: SAMPLE_COMM_DmaImage
/******************************************************************************
* function : Dma frame info to ive image
******************************************************************************/
HI_S32 SAMPLE_COMM_DmaImage(VIDEO_FRAME_INFO_S *pstFrameInfo,IVE_DST_IMAGE_S *pstDst,HI_BOOL bInstant)
{
HI_S32 s32Ret;
IVE_HANDLE hIveHandle;
IVE_SRC_DATA_S stSrcData;
IVE_DST_DATA_S stDstData;
IVE_DMA_CTRL_S stCtrl = {IVE_DMA_MODE_DIRECT_COPY,0};
HI_BOOL bFinish = HI_FALSE;
HI_BOOL bBlock = HI_TRUE;
//fill src
stSrcData.pu8VirAddr = (HI_U8*)pstFrameInfo->stVFrame.pVirAddr[0];
stSrcData.u32PhyAddr = pstFrameInfo->stVFrame.u32PhyAddr[0];
stSrcData.u16Width = (HI_U16)pstFrameInfo->stVFrame.u32Width;
stSrcData.u16Height = (HI_U16)pstFrameInfo->stVFrame.u32Height;
stSrcData.u16Stride = (HI_U16)pstFrameInfo->stVFrame.u32Stride[0];
//fill dst
stDstData.pu8VirAddr = pstDst->pu8VirAddr[0];
stDstData.u32PhyAddr = pstDst->u32PhyAddr[0];
stDstData.u16Width = pstDst->u16Width;
stDstData.u16Height = pstDst->u16Height;
stDstData.u16Stride = pstDst->u16Stride[0];
s32Ret = HI_MPI_IVE_DMA(&hIveHandle,&stSrcData,&stDstData,&stCtrl,bInstant);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("HI_MPI_IVE_DMA fail,Error(%#x)\n",s32Ret);
return s32Ret;
}
if (HI_TRUE == bInstant)
{
s32Ret = HI_MPI_IVE_Query(hIveHandle,&bFinish,bBlock);
while(HI_ERR_IVE_QUERY_TIMEOUT == s32Ret)
{
usleep(100);
s32Ret = HI_MPI_IVE_Query(hIveHandle,&bFinish,bBlock);
}
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("HI_MPI_IVE_Query fail,Error(%#x)\n",s32Ret);
return s32Ret;
}
}
return HI_SUCCESS;
}
示例15: SAMPLE_COMM_VENC_MemConfig
/******************************************************************************
* function : Set venc memory location
******************************************************************************/
HI_S32 SAMPLE_COMM_VENC_MemConfig(HI_VOID)
{
HI_S32 i = 0;
HI_S32 s32Ret;
HI_CHAR * pcMmzName;
MPP_CHN_S stMppChnVENC;
/* group, venc max chn is 64*/
for(i=0;i<64;i++)
{
stMppChnVENC.enModId = HI_ID_VENC;
stMppChnVENC.s32DevId = 0;
stMppChnVENC.s32ChnId = i;
pcMmzName = NULL;
/*venc*/
s32Ret = HI_MPI_SYS_SetMemConf(&stMppChnVENC,pcMmzName);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("HI_MPI_SYS_SetMemConf with %#x!\n", s32Ret);
return HI_FAILURE;
}
}
return HI_SUCCESS;
}