2159
- 收藏
- 点赞
- 分享
- 举报
求救
各位好,请教下,我想实现视频电子变倍的效果,现在对输入通道进行扩展(先裁剪然后缩放),可是无法对扩展通道进行操作,显示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
-
2017-04-17 10:03:31
-
2016-07-27 16:34:10
-
2020-07-04 10:25:21
-
2023-07-06 09:59:16
-
2017-01-12 19:58:05
-
2016-08-24 11:58:29
-
2015-09-08 14:06:59
-
2017-01-02 10:30:44
-
2014-02-26 16:10:28
-
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
-
2023-05-25 11:57:19
-
2015-04-09 08:25:26
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认