/*******************************************************************************
*@ Description :配置VPSS的扩展通道
*@ Input :<vpssGrp>:组号
<vpssChn>:扩展通道号
<bindChn>:绑定到目标物理通道号
<width>:扩展通道图片的宽
<height>:扩展通道图片的高
<frmRate>扩展通道图片的帧率
*@ Output :
*@ Return :成功:0
失败:错误码
*@ attention :该接口在H3518ev300(hi3516ev200)的SDK中设置不正常
*******************************************************************************/
static int vpss_config_ext_chn(VPSS_GRP vpssGrp, VPSS_CHN vpssChn, VPSS_CHN bindChn, int width, int height, int frmRate)
{
int ret;
VPSS_EXT_CHN_ATTR_S extAttr = {0};
/*---#------------------------------------------------------------*/
printf("----ExtChnAttr:-----------------------------------------\n");
printf("extAttr.s32BindChn = %d\n",extAttr.s32BindChn);
printf("extAttr.u32Width = %d\n",extAttr.u32Width);
printf("extAttr.u32Height = %d\n",extAttr.u32Height);
printf("extAttr.enVideoFormat = %d\n",extAttr.enVideoFormat);
printf("extAttr.enPixelFormat = %d\n",extAttr.enPixelFormat);
printf("extAttr.enDynamicRange = %d\n",extAttr.enDynamicRange);
printf("extAttr.enCompressMode = %d\n",extAttr.enCompressMode);
printf("extAttr.u32Depth = %d\n",extAttr.u32Depth);
printf("extAttr.stFrameRate.s32SrcFrameRate = %d\n",extAttr.stFrameRate.s32SrcFrameRate);
printf("extAttr.stFrameRate.s32DstFrameRate = %d\n",extAttr.stFrameRate.s32DstFrameRate);
printf("-------------------------------------------------------\n");
/*---#------------------------------------------------------------*/
extAttr.s32BindChn = bindChn;
extAttr.u32Width = width;//960;
extAttr.u32Height = height;//540;
extAttr.enVideoFormat = VIDEO_FORMAT_LINEAR;
extAttr.enPixelFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
extAttr.enDynamicRange = DYNAMIC_RANGE_SDR8;
extAttr.enCompressMode = COMPRESS_MODE_NONE;
extAttr.u32Depth = 0;
extAttr.stFrameRate.s32SrcFrameRate = 15;
extAttr.stFrameRate.s32DstFrameRate = frmRate;
ret = HI_MPI_VPSS_SetExtChnAttr(vpssGrp, vpssChn, &extAttr);
if (HI_SUCCESS != ret)
{
ERROR_LOG("HI_MPI_VPSS_SetExtChnAttr(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret);
return HLE_RET_ERROR;
}
ret = HI_MPI_VPSS_EnableChn(vpssGrp, vpssChn);
if (HI_SUCCESS != ret)
{
ERROR_LOG("HI_MPI_VPSS_EnableChn(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret);
return HLE_RET_ERROR;
}
return HLE_RET_OK;
}
实现代码如上所述,VPSS 物理通道号是0,已经创建并使能, 扩展通道5绑定到物理通道0,总是报参数设置无效,怎么回事???