Exemple #1
0
HI_S32 sw_HIFB_VO_Start(void)
{
#define HIFB_HD_WIDTH  1280
#define HIFB_HD_HEIGHT 720

    HI_S32 s32Ret = HI_SUCCESS;

    VO_PUB_ATTR_S stPubAttr;
    VO_VIDEO_LAYER_ATTR_S stLayerAttr;
    VO_CHN_ATTR_S stChnAttr;

    HI_MPI_VO_Disable(VoDev);

    stPubAttr.enIntfType = VO_INTF_VGA;
    stPubAttr.enIntfSync = VO_OUTPUT_720P50;
    stPubAttr.u32BgColor = 0xff0000ff;

    stLayerAttr.stDispRect.s32X       = 0;
    stLayerAttr.stDispRect.s32Y       = 0;
    stLayerAttr.stDispRect.u32Width   = HIFB_HD_WIDTH;
    stLayerAttr.stDispRect.u32Height  = HIFB_HD_HEIGHT;
    stLayerAttr.stImageSize.u32Width  = HIFB_HD_WIDTH;
    stLayerAttr.stImageSize.u32Height = HIFB_HD_HEIGHT;
    stLayerAttr.u32DispFrmRt          = 50;
    stLayerAttr.enPixFormat           = PIXEL_FORMAT_YUV_SEMIPLANAR_422;

    stChnAttr.stRect.s32X               = 0;
    stChnAttr.stRect.s32Y               = 0;
    stChnAttr.stRect.u32Width           = HIFB_HD_WIDTH;
    stChnAttr.stRect.u32Height          = HIFB_HD_HEIGHT;
    stChnAttr.bDeflicker                = HI_FALSE;
    stChnAttr.u32Priority               = 1;

    if (HI_SUCCESS != HI_MPI_VO_SetPubAttr(VoDev, &stPubAttr))
    {
        printf("set VO pub attr failed !\n");
        return -1;
    }

    if (HI_SUCCESS != HI_MPI_VO_Enable(VoDev))
    {
        printf("enable vo device failed!\n");
        return -1;
    }

    s32Ret = HI_MPI_VO_SetVideoLayerAttr(VoDev, &stLayerAttr);
    if (s32Ret != HI_SUCCESS)
    {
        printf("set video layer attr failed with %#x!\n", s32Ret);
        return -1;
    }

    if (HI_SUCCESS != HI_MPI_VO_EnableVideoLayer(VoDev))
    {
        printf("enable video layer failed!\n");
        return -1;
    }

    return 0;
}
Exemple #2
0
HI_S32 MppSysInit(HI_VOID)
{
	HI_S32 i = 0;
	MPP_SYS_CONF_S stSysConf = {0};

	HI_MPI_SYS_Exit();
	
	stSysConf.u32AlignWidth = 16;
    if (HI_MPI_SYS_SetConf(&stSysConf))
    {
        printf("conf : system config failed!\n");
        return -1;
    }

    if (HI_MPI_SYS_Init())
    {
        printf("sys init failed!\n");
        return -1;
    }

	/*to ensure all vo device are disabled*/
	for(i=0; i<VOU_DEV_BUTT; i++)
	{
		(HI_VOID)HI_MPI_VO_Disable(i);
	}

    return HI_SUCCESS;
}
Exemple #3
0
/*
* Exit System
*/
static HI_VOID SampleVoExit(void)
{   
    HI_S32 s32Ret;
    s32Ret = HI_MPI_VO_Disable();
    if (HI_SUCCESS != s32Ret)
    {
        Printf("HI_MPI_VO_Disable errno: 0x%x!\n", s32Ret);
    }
}
HI_S32 SAMPLE_COMM_VO_StopDev(VO_DEV VoDev)
{
    HI_S32 s32Ret = HI_SUCCESS;
    
    s32Ret = HI_MPI_VO_Disable(VoDev);
    if (s32Ret != HI_SUCCESS)
    {
        SAMPLE_PRT("failed with %#x!\n", s32Ret);
        return HI_FAILURE;
    }
    return s32Ret;
}
Exemple #5
0
HI_S32 SampleDisableVo(HI_U32 ScreenCnt)
{
    HI_U32 i;

    for (i = 0; i < ScreenCnt; i++)
    {
        CHECK(HI_MPI_VO_DisableChn(i), "HI_MPI_VO_DisableChn");
    }

    CHECK(HI_MPI_VO_Disable(), "HI_MPI_VO_Disable");

    return HI_SUCCESS;
}
Exemple #6
0
HI_S32 sw_HIFB_VO_Stop(void)
{
    if (HI_SUCCESS != HI_MPI_VO_DisableVideoLayer(VoDev))
    {
        printf("Disable video layer failed!\n");
        return -1;
    }

    if (HI_SUCCESS != HI_MPI_VO_Disable(VoDev))
    {
        printf("Disable vo device failed!\n");
        return -1;
    }

    return 0;
}
Exemple #7
0
HI_S32 SampleDisableVo(VO_CHN VoChn)
{
	HI_S32 s32Ret;

	s32Ret = HI_MPI_VO_DisableChn(VoChn);
	if(HI_SUCCESS != s32Ret)
	{
		printf("HI_MPI_VO_DisableChn failed 0x%x!\n",s32Ret);
		return HI_FAILURE;
	}

	s32Ret = HI_MPI_VO_Disable();
	if(HI_SUCCESS != s32Ret)
	{
		printf("HI_MPI_VO_Disable failed 0x%x!\n",s32Ret);
		return HI_FAILURE;
	}

	return HI_SUCCESS;
}