- 收藏
- 点赞
- 分享
- 举报
关于海思3519拓展通道的属性设置的疑问
本帖最后由 wfjdemmye 于 2016-11-28 17:08 编辑
我创建了两个VO输出,然后一个绑定VPSS,一个绑定VO作为一个拓展通道。
现在我想不影响主通道的情况下,去放大拓展通道; 附代码:
创建VO双通道输出: for (i = 0; i < u32WndNum; i++) { //if(u32WndNum>2) /if(i>2) { stChnAttr.stRect.s32X = ALIGN_BACK((u32Width / u32Square) (i % u32Square), 2); stChnAttr.stRect.s32Y = ALIGN_BACK((u32Height / u32Square) (i / u32Square), 2); stChnAttr.stRect.u32Width = ALIGN_BACK(u32Width / u32Square, 2); stChnAttr.stRect.u32Height = ALIGN_BACK(u32Height / u32Square, 2); }/ if(i==0) { stChnAttr.stRect.s32X = 0; stChnAttr.stRect.s32Y = 0; stChnAttr.stRect.u32Width = 1920; stChnAttr.stRect.u32Height = 1080;
}
else if(i==1)
{
stChnAttr.stRect.s32X = 0;
stChnAttr.stRect.s32Y = 0;
stChnAttr.stRect.u32Width = 400;
stChnAttr.stRect.u32Height = 200;
}
else if(i==2)
{
stChnAttr.stRect.s32X = 800;
stChnAttr.stRect.s32Y = 0;
stChnAttr.stRect.u32Width = 500;
stChnAttr.stRect.u32Height = 300;
}
else if(i==3)
{
stChnAttr.stRect.s32X = 0;
stChnAttr.stRect.s32Y = 500;
stChnAttr.stRect.u32Width = 500;
stChnAttr.stRect.u32Height = 300;
}
stChnAttr.u32Priority = 0;
stChnAttr.bDeflicker = HI_FALSE;
printf("stChnAttr.stRect.s32X:%d,u32Width:%d,u32Square:%d,i:%d\n",stChnAttr.stRect.s32X,u32Width,u32Square,i);
s32Ret = HI_MPI_VO_SetChnAttr(VoLayer, i, &stChnAttr);//MAX 8
if (s32Ret != HI_SUCCESS)
{
printf("%s(%d):failed with %#x!\n", \
__FUNCTION__, __LINE__, s32Ret);
return HI_FAILURE;
}
s32Ret = HI_MPI_VO_EnableChn(VoLayer, i);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
绑定VPSS的过程差不多,就不写啦:-------------------------
显示通道VO_chn1: s32Ret = HI_MPI_VO_SetAttrBegin(0);
s32Ret = HI_MPI_VO_SetChnAttr(0, 1, &VoChnAttr);
if (HI_SUCCESS != s32Ret)
{
printf("vo set chn attr failed!:%x \n",s32Ret);
return s32Ret;
}
s32Ret = HI_MPI_VO_ShowChn(0,1);
s32Ret = HI_MPI_VO_SetAttrEnd(0);
if (HI_SUCCESS != s32Ret)
{
printf("vo set chn %d attr failed!:%x \n",s32Ret);
return s32Ret;
}
return HI_SUCCESS;
隐藏通道VO_chn1: VO_CHN_ATTR_S VoChnAttr; s32Ret = HI_MPI_VO_SetAttrBegin(0); VoChnAttr.bDeflicker = HI_TRUE; VoChnAttr.u32Priority = 1; VoChnAttr.stRect.s32X = 0; VoChnAttr.stRect.s32Y = 0; VoChnAttr.stRect.u32Width = 1920; VoChnAttr.stRect.u32Height = 1080; s32Ret = HI_MPI_VO_SetChnAttr(0, 0, &VoChnAttr); if (HI_SUCCESS != s32Ret) { printf("vo set chn attr failed!:%x \n",s32Ret); return s32Ret; } s32Ret = HI_MPI_VO_ShowChn(0,0); if (s32Ret != HI_SUCCESS) { printf("vo hide channel failed!:%x\n", s32Ret); return HI_FAILURE; } s32Ret = HI_MPI_VO_HideChn(0,1); if (s32Ret != HI_SUCCESS) { printf("vo hide channel failed!:%x\n", s32Ret); return HI_FAILURE; } s32Ret = HI_MPI_VO_SetAttrEnd(0);
设置拓展通道放大: VPSS_CROP_INFO_S pstCropInfo; memset(&pstCropInfo,0,sizeof(VPSS_CROP_INFO_S)); HI_S32 rel=HI_MPI_VPSS_GetExtChnCrop(0,4, &pstCropInfo); if(rel != HI_SUCCESS) { printf("HI_MPI_VPSS_GetGrpCrop ERROR:%x\n",rel); return rel; }
//printf("pstCropInfo.bEnable is close and open it \n");
pstCropInfo.bEnable = HI_TRUE;
pstCropInfo.stCropRect.s32X =xPos-20;
pstCropInfo.stCropRect.s32Y =yPos-10;
pstCropInfo.stCropRect.u32Width = 40;
pstCropInfo.stCropRect.u32Height = 20;
if(pstCropInfo.stCropRect.s32X<=0)pstCropInfo.stCropRect.s32X=0;
else if(1920-pstCropInfo.stCropRect.s32X<=40)pstCropInfo.stCropRect.s32X=1880;
if(pstCropInfo.stCropRect.s32Y<=0)pstCropInfo.stCropRect.s32X=0;
else if(1080-pstCropInfo.stCropRect.s32Y<=20)pstCropInfo.stCropRect.s32X=1060;
rel= HI_MPI_VPSS_SetExtChnCrop(0,4, &pstCropInfo);
if(rel != HI_SUCCESS)
{
printf("HI_MPI_VPSS_SetGrpCrop ERROR:%x\n",rel);
return rel;
}
return rel;
我在设置放大属性的时候遇到 HI_MPI_VPSS_SetGrpCrop ERROR:a0078003 HI_MPI_VPSS_SetGrpCrop ERROR:a0078003 HI_MPI_VPSS_SetGrpCrop ERROR:a0078003 HI_MPI_VPSS_SetGrpCrop ERROR:a0078003 HI_MPI_VPSS_SetGrpCrop ERROR:a0078003
0xA0078003 HI_ERR_VPSS_ILLEGAL_PARAM VPSS 参数设置无效
请教一下,HI_MPI_VPSS_SetExtChnCrop这个过程的设置是一个什么样的流程才能设置成功,求教一下社区的大神们。
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
-
2017-01-20 09:14:08
-
2023-06-21 15:27:54
-
2015-03-31 16:47:32
-
2020-03-20 08:51:45
-
2018-12-18 09:26:05
-
2016-08-10 15:50:43
-
2017-08-29 09:36:14
-
2016-07-19 16:36:55
-
2016-09-13 22:59:39
-
2017-02-20 17:59:19
-
2018-08-06 13:46:10
-
2016-08-23 10:16:40
-
2017-09-07 23:52:10
-
2016-11-02 19:07:52
-
2016-08-11 20:01:35
-
2017-08-22 14:13:43
-
2015-01-29 17:55:48
-
2013-01-17 11:01:40
-
632020-08-14 19:53:46
-
5RK3588的DPHY0接lt6911uxe转HDMI抓帧分辨率不对
-
20求rv1106板子的sdk包或者开发板资料
-
10ss928烧录uboot失败
-
10求助,3588调试imx586和ov50c40时,按照瑞芯微的单摄8k配置好设备树后,驱动配置的8k分辨率的,但是只能抓到4k的图,且颜色偏粉
-
50帮忙解决个交叉编译的问题
-
20帮忙交叉编译个源码
-
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
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明