2137
- 收藏
- 点赞
- 分享
- 举报
avs配置问题
我的设置流程
读取两个1080p文件–>vdec->vpss(输出960*1080)–>avs->vo
在avs的配置中创建组成功
获取avs获取通道属性成功设置avs通道属性时出错出现错误吗 属性无效
下面是AVS的配置 搬到sample_avs.c的配置
HI_S32 SAMPLE_AVS_StartAVS(AVS_GRP AVSGrp, SAMPLE_AVS_CONFIG_S* pstAVSConfig)
{
HI_U32 u32LUTSize;
AVS_GRP_ATTR_S stAVSGrpAttr = {0};
AVS_CHN AVSChn = 0;
AVS_CHN_ATTR_S stChnAttr = {0};
HI_VOID* pLUTVirAddr = NULL;
HI_S32 s32Ret = HI_SUCCESS;
HI_U32 u32PipeNum;
HI_U32 i = 0;
memcpy(&stAVSGrpAttr, &pstAVSConfig->stGrpAttr, sizeof(AVS_GRP_ATTR_S));
u32PipeNum = stAVSGrpAttr.u32PipeNum;
if (AVS_MODE_BLEND == stAVSGrpAttr.enMode)
{
u32LUTSize = SAMPLE_AVS_GetFileLen(pstAVSConfig->pLUTName[0]);
if (0 == u32LUTSize)
{
SAMPLE_PRT("Open lut file fail!\n");
return HI_FAILURE;
}
u32LUTSize = ALIGN_UP(u32LUTSize, 256);
s32Ret = HI_MPI_SYS_MmzAlloc(&(g_AVSLUTAddr), &(pLUTVirAddr), NULL, NULL, u32LUTSize * u32PipeNum);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("alloc LUT buf fail with %#x!\n", s32Ret);
goto exit;
}
for (i = 0; i < u32PipeNum; i++)
{
if (HI_SUCCESS != SAMPLE_AVS_LoadFile(pstAVSConfig->pLUTName, ((HI_CHAR*)pLUTVirAddr + u32LUTSize * i), u32LUTSize))
{
goto exit;
}
stAVSGrpAttr.stLUT.u64PhyAddr = g_AVSLUTAddr + u32LUTSize * i;
}
}
stAVSGrpAttr.bSyncPipe = HI_TRUE;
stAVSGrpAttr.stFrameRate.s32SrcFrameRate = -1;
stAVSGrpAttr.stFrameRate.s32DstFrameRate = -1;
stAVSGrpAttr.stLUT.enAccuracy = AVS_LUT_ACCURACY_HIGH;
s32Ret = HI_MPI_AVS_CreateGrp(AVSGrp, &stAVSGrpAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Creat grp failed with %#x!\n", s32Ret);
goto exit;
}
stChnAttr.enCompressMode = pstAVSConfig->enOutCmpMode;
stChnAttr.stFrameRate.s32SrcFrameRate = -1;
stChnAttr.stFrameRate.s32DstFrameRate = -1;
stChnAttr.u32Depth = 0;
stChnAttr.u32Width = pstAVSConfig->u32OutW;
stChnAttr.u32Height = pstAVSConfig->u32OutH;
stChnAttr.enDynamicRange = DYNAMIC_RANGE_SDR8;
s32Ret = HI_MPI_AVS_SetChnAttr(AVSGrp, AVSChn, &stChnAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Set chnattr failed with %#x!\n", s32Ret);
goto exit;
}
s32Ret = HI_MPI_AVS_EnableChn(AVSGrp, AVSChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS enable chn failed with %#x!\n", s32Ret);
goto exit;
}
if (pstAVSConfig->benChn1)
{
AVSChn = 1;
stChnAttr.u32Width = 1920;
stChnAttr.u32Height = 1080;
stChnAttr.enCompressMode = COMPRESS_MODE_NONE;
s32Ret = HI_MPI_AVS_SetChnAttr(AVSGrp, AVSChn, &stChnAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Set chnattr failed with %#x!\n", s32Ret);
goto exit;
}
s32Ret = HI_MPI_AVS_EnableChn(AVSGrp, AVSChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS enable chn failed with %#x!\n", s32Ret);
goto exit;
}
}
s32Ret = HI_MPI_AVS_StartGrp(AVSGrp);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS start grp failed with %#x!\n", s32Ret);
goto exit;
}
return HI_SUCCESS;
exit:
if (g_AVSLUTAddr)
{
s32Ret = HI_MPI_SYS_MmzFree(g_AVSLUTAddr, NULL);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("MMzFree fail!\n");
}
g_AVSLUTAddr = 0;
}
return HI_FAILURE;
}
读取两个1080p文件–>vdec->vpss(输出960*1080)–>avs->vo
在avs的配置中创建组成功
获取avs获取通道属性成功设置avs通道属性时出错出现错误吗 属性无效
下面是AVS的配置 搬到sample_avs.c的配置
HI_S32 SAMPLE_AVS_StartAVS(AVS_GRP AVSGrp, SAMPLE_AVS_CONFIG_S* pstAVSConfig)
{
HI_U32 u32LUTSize;
AVS_GRP_ATTR_S stAVSGrpAttr = {0};
AVS_CHN AVSChn = 0;
AVS_CHN_ATTR_S stChnAttr = {0};
HI_VOID* pLUTVirAddr = NULL;
HI_S32 s32Ret = HI_SUCCESS;
HI_U32 u32PipeNum;
HI_U32 i = 0;
memcpy(&stAVSGrpAttr, &pstAVSConfig->stGrpAttr, sizeof(AVS_GRP_ATTR_S));
u32PipeNum = stAVSGrpAttr.u32PipeNum;
if (AVS_MODE_BLEND == stAVSGrpAttr.enMode)
{
u32LUTSize = SAMPLE_AVS_GetFileLen(pstAVSConfig->pLUTName[0]);
if (0 == u32LUTSize)
{
SAMPLE_PRT("Open lut file fail!\n");
return HI_FAILURE;
}
u32LUTSize = ALIGN_UP(u32LUTSize, 256);
s32Ret = HI_MPI_SYS_MmzAlloc(&(g_AVSLUTAddr), &(pLUTVirAddr), NULL, NULL, u32LUTSize * u32PipeNum);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("alloc LUT buf fail with %#x!\n", s32Ret);
goto exit;
}
for (i = 0; i < u32PipeNum; i++)
{
if (HI_SUCCESS != SAMPLE_AVS_LoadFile(pstAVSConfig->pLUTName, ((HI_CHAR*)pLUTVirAddr + u32LUTSize * i), u32LUTSize))
{
goto exit;
}
stAVSGrpAttr.stLUT.u64PhyAddr = g_AVSLUTAddr + u32LUTSize * i;
}
}
stAVSGrpAttr.bSyncPipe = HI_TRUE;
stAVSGrpAttr.stFrameRate.s32SrcFrameRate = -1;
stAVSGrpAttr.stFrameRate.s32DstFrameRate = -1;
stAVSGrpAttr.stLUT.enAccuracy = AVS_LUT_ACCURACY_HIGH;
s32Ret = HI_MPI_AVS_CreateGrp(AVSGrp, &stAVSGrpAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Creat grp failed with %#x!\n", s32Ret);
goto exit;
}
stChnAttr.enCompressMode = pstAVSConfig->enOutCmpMode;
stChnAttr.stFrameRate.s32SrcFrameRate = -1;
stChnAttr.stFrameRate.s32DstFrameRate = -1;
stChnAttr.u32Depth = 0;
stChnAttr.u32Width = pstAVSConfig->u32OutW;
stChnAttr.u32Height = pstAVSConfig->u32OutH;
stChnAttr.enDynamicRange = DYNAMIC_RANGE_SDR8;
s32Ret = HI_MPI_AVS_SetChnAttr(AVSGrp, AVSChn, &stChnAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Set chnattr failed with %#x!\n", s32Ret);
goto exit;
}
s32Ret = HI_MPI_AVS_EnableChn(AVSGrp, AVSChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS enable chn failed with %#x!\n", s32Ret);
goto exit;
}
if (pstAVSConfig->benChn1)
{
AVSChn = 1;
stChnAttr.u32Width = 1920;
stChnAttr.u32Height = 1080;
stChnAttr.enCompressMode = COMPRESS_MODE_NONE;
s32Ret = HI_MPI_AVS_SetChnAttr(AVSGrp, AVSChn, &stChnAttr);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("Set chnattr failed with %#x!\n", s32Ret);
goto exit;
}
s32Ret = HI_MPI_AVS_EnableChn(AVSGrp, AVSChn);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS enable chn failed with %#x!\n", s32Ret);
goto exit;
}
}
s32Ret = HI_MPI_AVS_StartGrp(AVSGrp);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("AVS start grp failed with %#x!\n", s32Ret);
goto exit;
}
return HI_SUCCESS;
exit:
if (g_AVSLUTAddr)
{
s32Ret = HI_MPI_SYS_MmzFree(g_AVSLUTAddr, NULL);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("MMzFree fail!\n");
}
g_AVSLUTAddr = 0;
}
return HI_FAILURE;
}
我来回答
回答2个
时间排序
认可量排序
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
12020-04-22 22:34:18
-
02020-09-30 16:05:33
-
2019-03-13 11:51:42
-
2020-08-04 19:45:23
-
2019-02-28 19:30:21
-
2019-03-01 09:22:24
-
2016-03-18 10:50:55
-
12016-12-26 22:34:38
-
2018-03-29 11:36:06
-
112019-05-16 19:17:40
-
2021-10-11 10:56:44
-
2018-08-23 15:48:19
-
2015-09-23 17:51:30
-
2015-05-27 23:18:11
-
2016-03-31 17:52:31
-
2017-01-11 21:16:57
-
2021-06-04 15:17:01
-
2023-11-16 11:22:14
-
2020-11-06 09:25:49
无更多相似问答 去提问
点击登录
-- 积分
-- 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币)
取消
确认