2183
- 收藏
- 点赞
- 分享
- 举报
求救
各位好,请教下,我想实现视频电子变倍的效果,现在对输入通道进行扩展(先裁剪然后缩放),可是无法对扩展通道进行操作,显示Set vi ext-chn attr err:0xa0108008错误(操作不支持),我用的050sdk;
s32Ret = SAMPLE_COMM_VI_StartVi(pstViConfig);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("start vi failed!\n");
}
#if 1
VI_EXT_CHN_ATTR_S stExtChnAttr;
stExtChnAttr.s32BindChn = 0;
stExtChnAttr.stDestSize.u32Width = 1920;
stExtChnAttr.stDestSize.u32Height = 1080;
stExtChnAttr.s32DstFrameRate = -1;
stExtChnAttr.s32SrcFrameRate = -1;
stExtChnAttr.enPixFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stExtChnAttr.enCompressMode = COMPRESS_MODE_NONE;
s32Ret=HI_MPI_VI_SetExtChnAttr(1, &stExtChnAttr);
if (HI_SUCCESS != s32Ret)
{
printf("Set vi ext-chn attr err:0x%x\n", s32Ret);
return s32Ret;
}
CROP_INFO_S stExtChnCrop;
stExtChnCrop.bEnable = HI_TRUE;
stExtChnCrop.stRect.s32X = 0;
stExtChnCrop.stRect.s32Y = 0;
stExtChnCrop.stRect.u32Height = 720;
stExtChnCrop.stRect.u32Width = 1080;
s32Ret=HI_MPI_VI_SetExtChnCrop(1, &stExtChnCrop);
if (HI_SUCCESS != s32Ret)
{
printf("Set vi ext-chn crop attr err:0x%x\n", s32Ret);
return s32Ret;
}
s32Ret = HI_MPI_VI_EnableChn (1);
if (HI_SUCCESS != s32Ret)
{
printf("Enable chn failed with error code %#x!\n", s32Ret);
return s32Ret;
}
#endif
stVpssGrpAttr.bDciEn = HI_FALSE;
stVpssGrpAttr.bHistEn = HI_FALSE;
stVpssGrpAttr.bIeEn = HI_FALSE;
stVpssGrpAttr.bNrEn = HI_TRUE;
stVpssGrpAttr.enDieMode = VPSS_DIE_MODE_NODIE;
stVpssGrpAttr.enPixFmt = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stVpssGrpAttr.u32MaxW = stSize.u32Width;
stVpssGrpAttr.u32MaxH = stSize.u32Height;
/******************************************
step 5: start vpss group
******************************************/
s32Ret = SAMPLE_COMM_VPSS_StartGroup(VpssGrp, &stVpssGrpAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("start VPSS GROUP failed!\n");
}
s32Ret = SAMPLE_COMM_VI_StartVi(pstViConfig);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("start vi failed!\n");
}
#if 1
VI_EXT_CHN_ATTR_S stExtChnAttr;
stExtChnAttr.s32BindChn = 0;
stExtChnAttr.stDestSize.u32Width = 1920;
stExtChnAttr.stDestSize.u32Height = 1080;
stExtChnAttr.s32DstFrameRate = -1;
stExtChnAttr.s32SrcFrameRate = -1;
stExtChnAttr.enPixFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stExtChnAttr.enCompressMode = COMPRESS_MODE_NONE;
s32Ret=HI_MPI_VI_SetExtChnAttr(1, &stExtChnAttr);
if (HI_SUCCESS != s32Ret)
{
printf("Set vi ext-chn attr err:0x%x\n", s32Ret);
return s32Ret;
}
CROP_INFO_S stExtChnCrop;
stExtChnCrop.bEnable = HI_TRUE;
stExtChnCrop.stRect.s32X = 0;
stExtChnCrop.stRect.s32Y = 0;
stExtChnCrop.stRect.u32Height = 720;
stExtChnCrop.stRect.u32Width = 1080;
s32Ret=HI_MPI_VI_SetExtChnCrop(1, &stExtChnCrop);
if (HI_SUCCESS != s32Ret)
{
printf("Set vi ext-chn crop attr err:0x%x\n", s32Ret);
return s32Ret;
}
s32Ret = HI_MPI_VI_EnableChn (1);
if (HI_SUCCESS != s32Ret)
{
printf("Enable chn failed with error code %#x!\n", s32Ret);
return s32Ret;
}
#endif
stVpssGrpAttr.bDciEn = HI_FALSE;
stVpssGrpAttr.bHistEn = HI_FALSE;
stVpssGrpAttr.bIeEn = HI_FALSE;
stVpssGrpAttr.bNrEn = HI_TRUE;
stVpssGrpAttr.enDieMode = VPSS_DIE_MODE_NODIE;
stVpssGrpAttr.enPixFmt = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stVpssGrpAttr.u32MaxW = stSize.u32Width;
stVpssGrpAttr.u32MaxH = stSize.u32Height;
/******************************************
step 5: start vpss group
******************************************/
s32Ret = SAMPLE_COMM_VPSS_StartGroup(VpssGrp, &stVpssGrpAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("start VPSS GROUP failed!\n");
}
我来回答
回答1个
时间排序
认可量排序
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
42015-11-13 11:19:13
-
12018-05-23 09:11:37
-
2017-04-17 10:03:31
-
2016-07-27 16:34:10
-
2020-07-04 10:25:21
-
2017-01-12 19:58:05
-
2023-07-06 09:59:16
-
2016-08-24 11:58:29
-
2015-09-08 14:06:59
-
2014-02-26 16:10:28
-
2017-01-02 10:30:44
-
2019-12-27 17:16:57
-
2015-06-16 18:39:55
-
2018-03-31 02:20:38
-
2023-01-04 14:19:29
-
2018-11-09 10:19:28
-
2020-10-14 11:03:29
-
12016-07-13 11:54:11
-
2015-04-09 08:25:26
-
2023-05-25 11:57:19
更多相似问答
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5SS928的emmc有32GB,bootargs设置使用16GB,但是为啥能用的只有rootfs的大小
-
33SS928怎样烧写ubuntu系统
-
10ToolPlatform下载rootfs提示网络失败
-
10谁有GK7205V500的SDK
-
5Hi3516CV610 烧录不进去
-
10Hi3559AV100 芯片硬解码h265编码格式的视频时出现视频播放错误,解码错误信息 s32PackErr:码流有错
-
5海思SS928 / SD3403的sample_venc.c摄像头编码Demo中,采集到的摄像头的YUV数据在哪个相关的函数中?
-
5海鸥派openEuler无法启动网卡,连接WIFI存在问题
-
66有没有ISP相关的巨佬帮忙看看SS928对接IMX347的图像问题
-
50求助hi3559与FPGA通过SLVS-EC接口对接问题
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认