1556
- 收藏
- 点赞
- 分享
- 举报
HI3531 使用VPSS放大图像
最近在做使用HI3531转码
[code]
for(i=0; i
{
VpssGrp = i;
/*** create vpss group ***/
s32Ret = HI_MPI_VPSS_CreateGrp(VpssGrp, &stGrpAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_CreateGrp failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
/*** set vpss param ***/
s32Ret = HI_MPI_VPSS_GetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
stVpssParam.u32MotionThresh = 0;
s32Ret = HI_MPI_VPSS_SetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
/*** enable vpss chn, with frame ***/
for(j=0; j
{
VpssChn = j;
/* Set Vpss Chn attr */
stChnAttr.bSpEn = HI_FALSE;
stChnAttr.bFrameEn = HI_TRUE;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_LEFT] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_RIGHT] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_BOTTOM] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_TOP] = 0x00;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_LEFT] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_RIGHT] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_TOP] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_BOTTOM] = 2;
s32Ret = HI_MPI_VPSS_SetChnAttr(VpssGrp, VpssChn, &stChnAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_SetChnAttr failed with %#x\n", s32Ret);
return HI_FAILURE;
}
printf("Enable vpssGrp:%d VpssChn:%d \n",VpssGrp, VpssChn);
s32Ret = HI_MPI_VPSS_EnableChn(VpssGrp, VpssChn);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_EnableChn failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}
/******Set Vpss Mode USER*********/
VpssChn = 1;
VPSS_CHN_MODE_S stVpssMode;
s32Ret = HI_MPI_VPSS_GetChnMode(VpssGrp,VpssChn,&stVpssMode);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_GetChnMode failed with %#x\n", s32Ret);
return HI_FAILURE;
}
stVpssMode.enChnMode = VPSS_CHN_MODE_USER;
stVpssMode.enPixelFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stVpssMode.u32Width = 1920;
stVpssMode.u32Height = 1080;
s32Ret = HI_MPI_VPSS_SetChnMode(VpssGrp,VpssChn,&stVpssMode);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_SetChnMode failed with %#x\n", s32Ret);
return HI_FAILURE;
}
/******end*********/
/*** start vpss group ***/
s32Ret = HI_MPI_VPSS_StartGrp(VpssGrp);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_StartGrp failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}[/code]
[code]
for(i=0; i
VpssGrp = i;
/*** create vpss group ***/
s32Ret = HI_MPI_VPSS_CreateGrp(VpssGrp, &stGrpAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_CreateGrp failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
/*** set vpss param ***/
s32Ret = HI_MPI_VPSS_GetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
stVpssParam.u32MotionThresh = 0;
s32Ret = HI_MPI_VPSS_SetGrpParam(VpssGrp, &stVpssParam);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("failed with %#x!\n", s32Ret);
return HI_FAILURE;
}
/*** enable vpss chn, with frame ***/
for(j=0; j
VpssChn = j;
/* Set Vpss Chn attr */
stChnAttr.bSpEn = HI_FALSE;
stChnAttr.bFrameEn = HI_TRUE;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_LEFT] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_RIGHT] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_BOTTOM] = 0x00;
stChnAttr.stFrame.u32Color[VPSS_FRAME_WORK_TOP] = 0x00;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_LEFT] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_RIGHT] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_TOP] = 2;
stChnAttr.stFrame.u32Width[VPSS_FRAME_WORK_BOTTOM] = 2;
s32Ret = HI_MPI_VPSS_SetChnAttr(VpssGrp, VpssChn, &stChnAttr);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_SetChnAttr failed with %#x\n", s32Ret);
return HI_FAILURE;
}
printf("Enable vpssGrp:%d VpssChn:%d \n",VpssGrp, VpssChn);
s32Ret = HI_MPI_VPSS_EnableChn(VpssGrp, VpssChn);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_EnableChn failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}
/******Set Vpss Mode USER*********/
VpssChn = 1;
VPSS_CHN_MODE_S stVpssMode;
s32Ret = HI_MPI_VPSS_GetChnMode(VpssGrp,VpssChn,&stVpssMode);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_GetChnMode failed with %#x\n", s32Ret);
return HI_FAILURE;
}
stVpssMode.enChnMode = VPSS_CHN_MODE_USER;
stVpssMode.enPixelFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stVpssMode.u32Width = 1920;
stVpssMode.u32Height = 1080;
s32Ret = HI_MPI_VPSS_SetChnMode(VpssGrp,VpssChn,&stVpssMode);
if(s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_SetChnMode failed with %#x\n", s32Ret);
return HI_FAILURE;
}
/******end*********/
/*** start vpss group ***/
s32Ret = HI_MPI_VPSS_StartGrp(VpssGrp);
if (s32Ret != HI_SUCCESS)
{
SAMPLE_PRT("HI_MPI_VPSS_StartGrp failed with %#x\n", s32Ret);
return HI_FAILURE;
}
}[/code]
我来回答
回答0个
时间排序
认可量排序
暂无数据
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2013-10-16 10:16:49
-
2016-04-19 17:06:53
-
2015-10-09 15:20:25
-
2016-08-18 11:01:26
-
2015-06-30 16:03:07
-
2016-04-22 13:17:55
-
2019-12-16 10:27:21
-
2014-10-23 10:51:45
-
2018-08-29 15:53:15
-
02014-01-06 14:19:17
-
2018-05-23 16:24:08
-
2016-05-04 09:18:36
-
2018-07-03 16:16:49
-
2016-09-26 11:07:11
-
2015-12-15 16:44:48
-
12016-04-12 16:51:45
-
12016-01-18 23:22:46
-
2013-01-03 15:02:47
-
2018-07-05 14:24:36
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
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板子运行自己编码的程序
-
10求HI3519DV500_SDK_V2.0.1.1
-
5有偿求HI3516DV500 + OV5647驱动
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认