8067
- 收藏
- 点赞
- 分享
- 举报
hi3516A VGS模块启动异常
我调用VGS划线模块测试。
代码如下:
HI_S32 s32Ret;
VGS_HANDLE vgsHandle;
VGS_TASK_ATTR_S vgsTaskAttr;
VGS_DRAW_LINE_S vgsDrawLine[8];
HI_U32 u32ArraySize;
HI_U32 u32BackHeight;
s32Ret = HI_MPI_VGS_BeginJob(&vgsHandle);
printf("HI_MPI_VGS_BeginJob ok\n");
if (s32Ret == HI_SUCCESS )
{
memset(&vgsTaskAttr,0,sizeof(VGS_TASK_ATTR_S));
memcpy(&vgsTaskAttr.stImgIn,&pAlgSrc->frameIn.frame,sizeof(VIDEO_FRAME_INFO_S));
memcpy(&vgsTaskAttr.stImgOut,&pMergeDst->frameIn.frame,sizeof(VIDEO_FRAME_INFO_S));
vgsTaskAttr.stImgOut.stVFrame.u32Height = vgsTaskAttr.stImgIn.stVFrame.u32Height;
printf(" ImgIn:Addr 0x%x 0x%x 0x%x phy 0x%x 0x%x 0x%x poolId %d\n",vgsTaskAttr.stImgIn.stVFrame.pVirAddr[0],\
vgsTaskAttr.stImgIn.stVFrame.pVirAddr[1],vgsTaskAttr.stImgIn.stVFrame.pVirAddr[2],\
vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[0],vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[1],\
vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[2],vgsTaskAttr.stImgIn.u32PoolId);
printf(" ImgIn:W %d H %d Stride %d %d %d Field %d Compress %d Pixel %d Video %d \n",vgsTaskAttr.stImgIn.stVFrame.u32Width,\
vgsTaskAttr.stImgIn.stVFrame.u32Height,vgsTaskAttr.stImgIn.stVFrame.u32Stride[0],\
vgsTaskAttr.stImgIn.stVFrame.u32Stride[1],vgsTaskAttr.stImgIn.stVFrame.u32Stride[2],\
vgsTaskAttr.stImgIn.stVFrame.u32Field,vgsTaskAttr.stImgIn.stVFrame.enCompressMode,\
vgsTaskAttr.stImgIn.stVFrame.enPixelFormat,vgsTaskAttr.stImgIn.stVFrame.enVideoFormat);
printf("ImgOut:Addr 0x%x 0x%x 0x%x phy 0x%x 0x%x 0x%x poolId %d\n",vgsTaskAttr.stImgOut.stVFrame.pVirAddr[0],\
vgsTaskAttr.stImgOut.stVFrame.pVirAddr[1],vgsTaskAttr.stImgOut.stVFrame.pVirAddr[2],\
vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[0],vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[1],\
vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[2],vgsTaskAttr.stImgOut.u32PoolId);
printf("ImgOut:W %d H %d Stride %d %d %d Field %d Compress %d Pixel %d Video %d \n",vgsTaskAttr.stImgOut.stVFrame.u32Width,\
vgsTaskAttr.stImgOut.stVFrame.u32Height,vgsTaskAttr.stImgOut.stVFrame.u32Stride[0],\
vgsTaskAttr.stImgOut.stVFrame.u32Stride[1],vgsTaskAttr.stImgOut.stVFrame.u32Stride[2],\
vgsTaskAttr.stImgOut.stVFrame.u32Field,vgsTaskAttr.stImgOut.stVFrame.enCompressMode,\
vgsTaskAttr.stImgOut.stVFrame.enPixelFormat,vgsTaskAttr.stImgOut.stVFrame.enVideoFormat);
vgsDrawLine[0].u32Thick = 4;
vgsDrawLine[0].u32Color = 0x0000CD;
vgsDrawLine[0].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[0].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[0].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[0].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[1].u32Thick = 4;
vgsDrawLine[1].u32Color = 0x0000CD;
vgsDrawLine[1].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[1].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[1].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[1].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
u32ArraySize = 1;
vgsDrawLine[2].u32Thick = 4;
vgsDrawLine[2].u32Color = 0x0000CD;
vgsDrawLine[2].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[2].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[2].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[2].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[3].u32Thick = 4;
vgsDrawLine[3].u32Color = 0x0000CD;
vgsDrawLine[3].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[3].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[3].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[3].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
if (0)//pAlgSrc->result.u32PlateNum > 0 )
{
vgsDrawLine[4].u32Thick = 4;
vgsDrawLine[4].u32Color = 0xFF0000;
vgsDrawLine[4].stStartPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[4].stStartPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[4].stEndPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[4].stEndPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[5].u32Thick = 4;
vgsDrawLine[5].u32Color = 0xFF0000;
vgsDrawLine[5].stStartPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[5].stStartPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[5].stEndPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[5].stEndPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[6].u32Thick = 4;
vgsDrawLine[6].u32Color = 0xFF0000;
vgsDrawLine[6].stStartPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[6].stStartPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[6].stEndPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[6].stEndPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[7].u32Thick = 4;
vgsDrawLine[7].u32Color = 0xFF0000;
vgsDrawLine[7].stStartPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[7].stStartPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[7].stEndPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[7].stEndPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
u32ArraySize = 8 ;
}
s32Ret = HI_MPI_VGS_AddDrawLineTaskArray(vgsHandle,&vgsTaskAttr,vgsDrawLine,u32ArraySize);
if (s32Ret == HI_SUCCESS )
{
printf("HI_MPI_VGS_AddDrawLineTaskArray ok\n");
s32Ret = HI_MPI_VGS_EndJob(vgsHandle);
if(s32Ret != HI_SUCCESS)
{
printf("HI_MPI_VGS_EndJob failed ret = 0x%x\n",s32Ret);
HI_MPI_VGS_CancelJob(vgsHandle);
}
else
{
printf("HI_MPI_VGS_AddDrawLineTaskArray ok\n");
}
}
else
{
printf("HI_MPI_VGS_AddDrawLineTaskArray failed ret = 0x%x\n",s32Ret);
}
}
else
{
printf("HI_MPI_VGS_BeginJob failed ret = 0x%x\n",s32Ret);
}
输出如下:
ImgIn:Addr 0xaae1e000 0xab018400 0xab018400 phy 0x8a200000 0x8a3fa400 0x8a3fa400 poolId 0
ImgIn:W 1920 H 1080 Stride 1920 1920 1920 Field 4 Compress 0 Pixel 23 Video 0
ImgOut:Addr 0xaa401740 0xaa655b40 0xaa655b40 phy 0x8bda6740 0x8bffab40 0x8bffab40 poolId 1
ImgOut:W 1920 H 1080 Stride 1920 1920 1920 Field 4 Compress 0 Pixel 23 Video 0
HI_MPI_VGS_AddDrawLineTaskArray failed ret = 0xa02d8003
不知道是输入参数不对还是某些模式不支持,向高人请教
代码如下:
HI_S32 s32Ret;
VGS_HANDLE vgsHandle;
VGS_TASK_ATTR_S vgsTaskAttr;
VGS_DRAW_LINE_S vgsDrawLine[8];
HI_U32 u32ArraySize;
HI_U32 u32BackHeight;
s32Ret = HI_MPI_VGS_BeginJob(&vgsHandle);
printf("HI_MPI_VGS_BeginJob ok\n");
if (s32Ret == HI_SUCCESS )
{
memset(&vgsTaskAttr,0,sizeof(VGS_TASK_ATTR_S));
memcpy(&vgsTaskAttr.stImgIn,&pAlgSrc->frameIn.frame,sizeof(VIDEO_FRAME_INFO_S));
memcpy(&vgsTaskAttr.stImgOut,&pMergeDst->frameIn.frame,sizeof(VIDEO_FRAME_INFO_S));
vgsTaskAttr.stImgOut.stVFrame.u32Height = vgsTaskAttr.stImgIn.stVFrame.u32Height;
printf(" ImgIn:Addr 0x%x 0x%x 0x%x phy 0x%x 0x%x 0x%x poolId %d\n",vgsTaskAttr.stImgIn.stVFrame.pVirAddr[0],\
vgsTaskAttr.stImgIn.stVFrame.pVirAddr[1],vgsTaskAttr.stImgIn.stVFrame.pVirAddr[2],\
vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[0],vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[1],\
vgsTaskAttr.stImgIn.stVFrame.u32PhyAddr[2],vgsTaskAttr.stImgIn.u32PoolId);
printf(" ImgIn:W %d H %d Stride %d %d %d Field %d Compress %d Pixel %d Video %d \n",vgsTaskAttr.stImgIn.stVFrame.u32Width,\
vgsTaskAttr.stImgIn.stVFrame.u32Height,vgsTaskAttr.stImgIn.stVFrame.u32Stride[0],\
vgsTaskAttr.stImgIn.stVFrame.u32Stride[1],vgsTaskAttr.stImgIn.stVFrame.u32Stride[2],\
vgsTaskAttr.stImgIn.stVFrame.u32Field,vgsTaskAttr.stImgIn.stVFrame.enCompressMode,\
vgsTaskAttr.stImgIn.stVFrame.enPixelFormat,vgsTaskAttr.stImgIn.stVFrame.enVideoFormat);
printf("ImgOut:Addr 0x%x 0x%x 0x%x phy 0x%x 0x%x 0x%x poolId %d\n",vgsTaskAttr.stImgOut.stVFrame.pVirAddr[0],\
vgsTaskAttr.stImgOut.stVFrame.pVirAddr[1],vgsTaskAttr.stImgOut.stVFrame.pVirAddr[2],\
vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[0],vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[1],\
vgsTaskAttr.stImgOut.stVFrame.u32PhyAddr[2],vgsTaskAttr.stImgOut.u32PoolId);
printf("ImgOut:W %d H %d Stride %d %d %d Field %d Compress %d Pixel %d Video %d \n",vgsTaskAttr.stImgOut.stVFrame.u32Width,\
vgsTaskAttr.stImgOut.stVFrame.u32Height,vgsTaskAttr.stImgOut.stVFrame.u32Stride[0],\
vgsTaskAttr.stImgOut.stVFrame.u32Stride[1],vgsTaskAttr.stImgOut.stVFrame.u32Stride[2],\
vgsTaskAttr.stImgOut.stVFrame.u32Field,vgsTaskAttr.stImgOut.stVFrame.enCompressMode,\
vgsTaskAttr.stImgOut.stVFrame.enPixelFormat,vgsTaskAttr.stImgOut.stVFrame.enVideoFormat);
vgsDrawLine[0].u32Thick = 4;
vgsDrawLine[0].u32Color = 0x0000CD;
vgsDrawLine[0].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[0].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[0].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[0].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[1].u32Thick = 4;
vgsDrawLine[1].u32Color = 0x0000CD;
vgsDrawLine[1].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[1].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
vgsDrawLine[1].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[1].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
u32ArraySize = 1;
vgsDrawLine[2].u32Thick = 4;
vgsDrawLine[2].u32Color = 0x0000CD;
vgsDrawLine[2].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x1&0xFFF0;
vgsDrawLine[2].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[2].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[2].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[3].u32Thick = 4;
vgsDrawLine[3].u32Color = 0x0000CD;
vgsDrawLine[3].stStartPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[3].stStartPoint.s32Y = pAlgSrc->result.plateDetectArea.y1&0xFFF0;
vgsDrawLine[3].stEndPoint.s32X = pAlgSrc->result.plateDetectArea.x0&0xFFF0;
vgsDrawLine[3].stEndPoint.s32Y = pAlgSrc->result.plateDetectArea.y0&0xFFF0;
if (0)//pAlgSrc->result.u32PlateNum > 0 )
{
vgsDrawLine[4].u32Thick = 4;
vgsDrawLine[4].u32Color = 0xFF0000;
vgsDrawLine[4].stStartPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[4].stStartPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[4].stEndPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[4].stEndPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[5].u32Thick = 4;
vgsDrawLine[5].u32Color = 0xFF0000;
vgsDrawLine[5].stStartPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[5].stStartPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
vgsDrawLine[5].stEndPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[5].stEndPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[6].u32Thick = 4;
vgsDrawLine[6].u32Color = 0xFF0000;
vgsDrawLine[6].stStartPoint.s32X = pAlgSrc->result.plate[0].x1&0xFFFE;
vgsDrawLine[6].stStartPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[6].stEndPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[6].stEndPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[7].u32Thick = 4;
vgsDrawLine[7].u32Color = 0xFF0000;
vgsDrawLine[7].stStartPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[7].stStartPoint.s32Y = pAlgSrc->result.plate[0].y1&0xFFFE;
vgsDrawLine[7].stEndPoint.s32X = pAlgSrc->result.plate[0].x0&0xFFFE;
vgsDrawLine[7].stEndPoint.s32Y = pAlgSrc->result.plate[0].y0&0xFFFE;
u32ArraySize = 8 ;
}
s32Ret = HI_MPI_VGS_AddDrawLineTaskArray(vgsHandle,&vgsTaskAttr,vgsDrawLine,u32ArraySize);
if (s32Ret == HI_SUCCESS )
{
printf("HI_MPI_VGS_AddDrawLineTaskArray ok\n");
s32Ret = HI_MPI_VGS_EndJob(vgsHandle);
if(s32Ret != HI_SUCCESS)
{
printf("HI_MPI_VGS_EndJob failed ret = 0x%x\n",s32Ret);
HI_MPI_VGS_CancelJob(vgsHandle);
}
else
{
printf("HI_MPI_VGS_AddDrawLineTaskArray ok\n");
}
}
else
{
printf("HI_MPI_VGS_AddDrawLineTaskArray failed ret = 0x%x\n",s32Ret);
}
}
else
{
printf("HI_MPI_VGS_BeginJob failed ret = 0x%x\n",s32Ret);
}
输出如下:
ImgIn:Addr 0xaae1e000 0xab018400 0xab018400 phy 0x8a200000 0x8a3fa400 0x8a3fa400 poolId 0
ImgIn:W 1920 H 1080 Stride 1920 1920 1920 Field 4 Compress 0 Pixel 23 Video 0
ImgOut:Addr 0xaa401740 0xaa655b40 0xaa655b40 phy 0x8bda6740 0x8bffab40 0x8bffab40 poolId 1
ImgOut:W 1920 H 1080 Stride 1920 1920 1920 Field 4 Compress 0 Pixel 23 Video 0
HI_MPI_VGS_AddDrawLineTaskArray failed ret = 0xa02d8003
不知道是输入参数不对还是某些模式不支持,向高人请教
我来回答
回答3个
时间排序
认可量排序
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2016-10-13 16:03:29
-
2016-01-26 10:36:41
-
2015-06-22 16:00:33
-
2017-11-16 15:29:20
-
2017-08-17 07:35:32
-
2015-06-23 09:39:53
-
2016-07-10 23:31:43
-
2017-12-13 16:45:50
-
2019-12-11 16:06:03
-
2020-03-18 09:33:17
-
2016-07-08 11:28:46
-
2019-03-04 13:26:34
-
2018-03-09 17:58:50
-
2016-09-05 19:46:44
-
2017-02-14 16:30:52
-
2017-04-27 19:23:23
-
2019-06-26 09:18:17
-
2020-08-13 22:49:40
-
2017-06-06 11:04:29
无更多相似问答 去提问
点击登录
-- 积分
-- 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币)
取消
确认