hi3516ev100中HI_MPI_RGN_Create函数出现0xa0038003的错误

hi3516ev100中HI_MPI_RGN_Create函数出现0xa0038003的错误

region 类型要设定为 OVERLAYEX_RGN 不支持 OVERLAY_RGN

HI_S32 SAMPLE_RGN_CreateOverlayForVenc1(RGN_HANDLE Handle, HI_U32 u32Num)
{

HI_S32 s32Ret;
MPP_CHN_S stChn;
RGN_ATTR_S stRgnAttr;
RGN_CHN_ATTR_S stChnAttr;

/* Add cover to vpss group */
stChn.enModId  =  HI_ID_VPSS;
stChn.s32DevId = 0;
stChn.s32ChnId = 0;


	
stRgnAttr.enType = OVERLAYEX_RGN;
stRgnAttr.unAttr.stOverlay.enPixelFmt = PIXEL_FORMAT_RGB_1555;
stRgnAttr.unAttr.stOverlay.stSize.u32Width = 250;
stRgnAttr.unAttr.stOverlay.stSize.u32Height = 48;
stRgnAttr.unAttr.stOverlay.u32BgColor = 0x0000011f;


s32Ret = HI_MPI_RGN_Create(Handle, &stRgnAttr);
if (s32Ret != HI_SUCCESS)
{
	SAMPLE_PRT("HI_MPI_RGN_Create failed! s32Ret: 0x%x.\n", s32Ret);
	return s32Ret;
}

stChnAttr.bShow  = HI_TRUE;
stChnAttr.enType = OVERLAYEX_RGN;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32X = 0;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32Y = 0;
stChnAttr.unChnAttr.stOverlayChn.u32BgAlpha   = 0;
stChnAttr.unChnAttr.stOverlayChn.u32FgAlpha   = 0;
stChnAttr.unChnAttr.stOverlayChn.u32Layer     = 0;

stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bAbsQp = HI_FALSE;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.s32Qp  = 0;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bQpDisable = HI_FALSE;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_FALSE;

s32Ret = HI_MPI_RGN_AttachToChn(Handle, &stChn, &stChnAttr);
if (s32Ret != HI_SUCCESS)
{
	SAMPLE_PRT("HI_MPI_RGN_AttachToChn failed! s32Ret: 0x%x.\n", s32Ret);
	return s32Ret;
}


return HI_SUCCESS;

}

你可能感兴趣的:(hi3516ev100中HI_MPI_RGN_Create函数出现0xa0038003的错误)