146
- 收藏
- 点赞
- 分享
- 举报
Hi3519DV500 vpss ext chn没起作用
请教一下:
环境:Hi3519DV500 + SDK:V1.0.1.1
想vpss phy chn 2 -> vpss ext chn 0(num = 4)
扩展通道配置如下:
// ext chn for jpeg
s_context.vpss_cfg.ext_chn_attr[0].bind_chn = OT_VPSS_CHN2;// src phy chn
s_context.vpss_cfg.ext_chn_attr[0].src_type = OT_EXT_CHN_SRC_TYPE_TAIL;//扩展通道的图像来自物理通道后处理(DIS,LDC,SPREAD,CoverEx,LUMA,OVERLAYEx,Fisheye等)后的图像。
s_context.vpss_cfg.ext_chn_attr[0].width = s_context.vpss_cfg.chn_attr[OT_VPSS_CHN2].width;
s_context.vpss_cfg.ext_chn_attr[0].height = s_context.vpss_cfg.chn_attr[OT_VPSS_CHN2].height;
s_context.vpss_cfg.ext_chn_attr[0].depth = 8;
s_context.vpss_cfg.ext_chn_attr[0].video_format = OT_VIDEO_FORMAT_LINEAR;
s_context.vpss_cfg.ext_chn_attr[0].dynamic_range = OT_DYNAMIC_RANGE_SDR8;
s_context.vpss_cfg.ext_chn_attr[0].pixel_format = OT_PIXEL_FORMAT_YVU_SEMIPLANAR_420;
s_context.vpss_cfg.ext_chn_attr[0].compress_mode = OT_COMPRESS_MODE_SEG;//? OT_COMPRESS_MODE_LINE
s_context.vpss_cfg.ext_chn_attr[0].frame_rate.src_frame_rate = -1;// 不做帧率控制
s_context.vpss_cfg.ext_chn_attr[0].frame_rate.dst_frame_rate = -1;// 不做帧率控制
然后初始化
td_s32 vpss_start(ot_vpss_grp grp, const ot_vpss_grp_attr *grp_attr,
const sample_vpss_chn_attr * vpss_chn_attr,
const ot_vpss_ext_chn_attr * vpss_ext_chn_attr, td_u32 ext_chn_num)
{
td_s32 ret;
if (vpss_chn_attr->chn_array_size < OT_VPSS_MAX_PHYS_CHN_NUM) {
sample_print("array size(%u) of chn_enable and chn_attr need >= %u!\n",
vpss_chn_attr->chn_array_size, OT_VPSS_MAX_PHYS_CHN_NUM);
return TD_FAILURE;
}
// create grp
ret = ss_mpi_vpss_create_grp(grp, grp_attr);
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_create_grp(grp:%d) failed with %#x!\n", grp, ret);
return TD_FAILURE;
}
// start grp
ret = ss_mpi_vpss_start_grp(grp);
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_start_grp failed with %#x\n", ret);
goto destroy_grp;
}
// vpss set ext chn attr, set chn attr, enable chn
ret = vpss_start_chn(grp, vpss_chn_attr->chn_enable, &vpss_chn_attr->chn_attr[0],
vpss_chn_attr->chn0_wrap, OT_VPSS_MAX_PHYS_CHN_NUM,
&vpss_ext_chn_attr[0], ext_chn_num);
if (ret != TD_SUCCESS) {
goto stop_grp;
}
return TD_SUCCESS;
stop_grp:
ret = ss_mpi_vpss_stop_grp(grp);
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_stop_grp failed with %#x!\n", ret);
}
destroy_grp:
ret = ss_mpi_vpss_destroy_grp(grp);
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_destroy_grp failed with %#x!\n", ret);
}
return TD_FAILURE;
}
static td_s32 vpss_start_chn(ot_vpss_grp grp, const td_bool *chn_enable,
const ot_vpss_chn_attr *chn_attr, td_bool chn0_wrap, td_u32 chn_array_size,
const ot_vpss_ext_chn_attr *ext_chn_attr, td_u32 ext_chn_num)
{
ot_vpss_chn vpss_chn;
ot_vpss_chn vpss_ext_chn;
td_s32 ret, i, j;
// set phy chn, enable phy chn
for (i = 0; i < (td_s32)chn_array_size; ++i) {
if (chn_enable[i] == TD_TRUE) {
vpss_chn = i;
ret = ss_mpi_vpss_set_chn_attr(grp, vpss_chn, &chn_attr[vpss_chn]);// set chn attr
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_set_chn_attr failed with %#x\n", ret);
goto disable_chn;
}
/* set chn0 wrap fmu mode first, then enable chn */
ret = sample_common_vpss_set_chn_fmu_mode(grp, vpss_chn, chn0_wrap);// set chn fmu mode, null operation
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_set_chn_fmu_mode failed with %#x\n", ret);
goto disable_chn;
}
if(i == 2)
{
// when phy chn = 2, set ext chn attr
vpss_ext_chn = i+2; // ext chn = [4, 5, 6, 7]
ret = ss_mpi_vpss_set_ext_chn_attr(grp, vpss_ext_chn, &ext_chn_attr[i-2]);// set chn attr 非OT_FMU_MODE_OFF模式绑定扩展通道不生效
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_set_ext_chn_attr failed with %#x\n", ret);
goto disable_chn;
}
}
ret = ss_mpi_vpss_enable_chn(grp, vpss_chn);// enable chn
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_enable_chn failed with %#x\n", ret);
goto disable_chn;
}
}
}
return TD_SUCCESS;
disable_chn:
for (i = i - 1; i >= 0; i--) {
if (chn_enable[i] == TD_TRUE) {
vpss_chn = i;
ret = ss_mpi_vpss_disable_chn(grp, vpss_chn);
if (ret != TD_SUCCESS) {
sample_print("ss_mpi_vpss_disable_chn failed with %#x!\n", ret);
}
}
}
return TD_FAILURE;
}
初始化没有报错
但是看proc信息,ext chn好像没有起来,找了一下,也没有enable vpss ext chn的接口
请问是为啥呀?
我来回答
回答2个
时间排序
认可量排序
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2024-09-27 11:37:54
-
2024-11-11 17:06:20
-
2024-03-15 15:38:18
-
2024-11-20 09:52:01
-
2024-09-12 14:44:41
-
2024-09-26 18:35:01
-
2024-07-29 21:31:26
-
2024-01-03 18:40:24
-
2024-09-12 09:01:54
-
2024-01-09 09:26:30
-
2023-07-24 09:58:23
-
2020-09-18 11:44:13
-
2024-01-05 20:50:10
-
2024-01-05 13:46:57
-
2024-03-07 11:13:43
-
2021-04-10 20:20:18
-
2024-03-29 14:26:27
-
2024-04-24 10:26:12
-
2023-09-19 11:50:03
无更多相似问答 去提问
点击登录
-- 积分
-- 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币)
取消
确认