2327
- 收藏
- 点赞
- 分享
- 举报
修改vivpss工作模式
将vivpss工作模式从修改成VI_ONLINE_VPSS_ONLINE修改成VI_OFFLINE_VPSS_ONLINE
执行结果:报错HI_MPI_VENC_CreateChn [1] faild with 0xa008800c! 错误码:分配内存失败
查看mmc内存位32M,分配vb缓冲区
static HI_VOID SAMPLE_VENC_GetCommVbAttr(const SAMPLE_SNS_TYPE_E enSnsType, const SAMPLE_VPSS_CHN_ATTR_S *pstParam,
HI_BOOL bSupportDcf, SAMPLE_VB_ATTR_S * pstcommVbAttr)
{
if (pstParam->ViVpssMode != VI_ONLINE_VPSS_ONLINE)
{
SIZE_S snsSize = {0};
GetSensorResolution(enSnsType, &snsSize);
if (pstParam->ViVpssMode == VI_OFFLINE_VPSS_ONLINE || pstParam->ViVpssMode == VI_OFFLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = VI_GetRawBufferSize(snsSize.u32Width, snsSize.u32Height,\
PIXEL_FORMAT_RGB_BAYER_12BPP,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
pstcommVbAttr->validNum++;
}
if (pstParam->ViVpssMode == VI_OFFLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(snsSize.u32Width, snsSize.u32Height,
PIXEL_FORMAT_YVU_SEMIPLANAR_420,DATA_BITWIDTH_8,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
pstcommVbAttr->validNum++;
}
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(snsSize.u32Width, snsSize.u32Height,
PIXEL_FORMAT_YVU_SEMIPLANAR_420,
DATA_BITWIDTH_8,
COMPRESS_MODE_NONE,
DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
pstcommVbAttr->validNum++;
}
}
if(HI_TRUE == pstParam->bWrapEn)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = VPSS_GetWrapBufferSize(pstParam->stOutPutSize[pstParam->BigStreamId].u32Width,
pstParam->stOutPutSize[pstParam->BigStreamId].u32Height,
pstParam->WrapBufLine,
pstParam->enPixelFormat,DATA_BITWIDTH_8,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 1;
pstcommVbAttr->validNum++;
}
else
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(pstParam->stOutPutSize[0].u32Width, pstParam->stOutPutSize[0].u32Height,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
pstParam->enCompressMode[0],
DEFAULT_ALIGN);
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_ONLINE)
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
}
else
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
}
pstcommVbAttr->validNum++;
}
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(pstParam->stOutPutSize[1].u32Width, pstParam->stOutPutSize[1].u32Height,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
pstParam->enCompressMode[1],
DEFAULT_ALIGN);
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_ONLINE)
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
}
else
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
}
pstcommVbAttr->validNum++;
//vgs dcf use
if(HI_TRUE == bSupportDcf)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(160, 120,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
COMPRESS_MODE_NONE,
DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 1;
pstcommVbAttr->validNum++;
}
}
修改这段代码哪一部分,还是修改其他的哪一部分
执行结果:报错HI_MPI_VENC_CreateChn [1] faild with 0xa008800c! 错误码:分配内存失败
查看mmc内存位32M,分配vb缓冲区
static HI_VOID SAMPLE_VENC_GetCommVbAttr(const SAMPLE_SNS_TYPE_E enSnsType, const SAMPLE_VPSS_CHN_ATTR_S *pstParam,
HI_BOOL bSupportDcf, SAMPLE_VB_ATTR_S * pstcommVbAttr)
{
if (pstParam->ViVpssMode != VI_ONLINE_VPSS_ONLINE)
{
SIZE_S snsSize = {0};
GetSensorResolution(enSnsType, &snsSize);
if (pstParam->ViVpssMode == VI_OFFLINE_VPSS_ONLINE || pstParam->ViVpssMode == VI_OFFLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = VI_GetRawBufferSize(snsSize.u32Width, snsSize.u32Height,\
PIXEL_FORMAT_RGB_BAYER_12BPP,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
pstcommVbAttr->validNum++;
}
if (pstParam->ViVpssMode == VI_OFFLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(snsSize.u32Width, snsSize.u32Height,
PIXEL_FORMAT_YVU_SEMIPLANAR_420,DATA_BITWIDTH_8,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
pstcommVbAttr->validNum++;
}
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_OFFLINE)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(snsSize.u32Width, snsSize.u32Height,
PIXEL_FORMAT_YVU_SEMIPLANAR_420,
DATA_BITWIDTH_8,
COMPRESS_MODE_NONE,
DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
pstcommVbAttr->validNum++;
}
}
if(HI_TRUE == pstParam->bWrapEn)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = VPSS_GetWrapBufferSize(pstParam->stOutPutSize[pstParam->BigStreamId].u32Width,
pstParam->stOutPutSize[pstParam->BigStreamId].u32Height,
pstParam->WrapBufLine,
pstParam->enPixelFormat,DATA_BITWIDTH_8,COMPRESS_MODE_NONE,DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 1;
pstcommVbAttr->validNum++;
}
else
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(pstParam->stOutPutSize[0].u32Width, pstParam->stOutPutSize[0].u32Height,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
pstParam->enCompressMode[0],
DEFAULT_ALIGN);
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_ONLINE)
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
}
else
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
}
pstcommVbAttr->validNum++;
}
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(pstParam->stOutPutSize[1].u32Width, pstParam->stOutPutSize[1].u32Height,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
pstParam->enCompressMode[1],
DEFAULT_ALIGN);
if (pstParam->ViVpssMode == VI_ONLINE_VPSS_ONLINE)
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 3;
}
else
{
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 2;
}
pstcommVbAttr->validNum++;
//vgs dcf use
if(HI_TRUE == bSupportDcf)
{
pstcommVbAttr->blkSize[pstcommVbAttr->validNum] = COMMON_GetPicBufferSize(160, 120,
pstParam->enPixelFormat,
DATA_BITWIDTH_8,
COMPRESS_MODE_NONE,
DEFAULT_ALIGN);
pstcommVbAttr->blkCnt[pstcommVbAttr->validNum] = 1;
pstcommVbAttr->validNum++;
}
}
修改这段代码哪一部分,还是修改其他的哪一部分
我来回答
回答1个
时间排序
认可量排序
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2019-12-20 10:10:43
-
2016-04-10 17:45:15
-
2016-04-19 17:06:53
-
2020-03-31 21:06:08
-
2016-05-26 10:36:30
-
2017-02-14 10:43:10
-
2014-03-04 16:07:05
-
2018-12-07 15:48:32
-
2022-03-04 15:35:16
-
2018-12-29 16:08:23
-
2021-01-02 10:21:45
-
2016-10-25 11:39:44
-
2013-01-05 16:49:19
-
2018-12-20 08:52:11
-
2016-08-26 17:29:25
-
2018-12-20 16:29:22
-
2015-11-05 17:03:37
-
02016-03-27 16:56:29
-
2018-11-23 09:25:38
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5SS928的emmc有32GB,bootargs设置使用16GB,但是为啥能用的只有rootfs的大小
-
33SS928怎样烧写ubuntu系统
-
10ToolPlatform下载rootfs提示网络失败
-
10谁有GK7205V500的SDK
-
5Hi3516CV610 烧录不进去
-
10Hi3559AV100 芯片硬解码h265编码格式的视频时出现视频播放错误,解码错误信息 s32PackErr:码流有错
-
5海思SS928 / SD3403的sample_venc.c摄像头编码Demo中,采集到的摄像头的YUV数据在哪个相关的函数中?
-
5海鸥派openEuler无法启动网卡,连接WIFI存在问题
-
66有没有ISP相关的巨佬帮忙看看SS928对接IMX347的图像问题
-
50求助hi3559与FPGA通过SLVS-EC接口对接问题
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认