7631
- 收藏
- 点赞
- 分享
- 举报
【3516】OSD无法设置反色
本帖最后由 CallMeBroYang 于 2016-5-13 17:37 编辑
版本:
[Hi3516A_MPP_V1.0.5.0 B030 Release]
描述:
调用 HI_MPI_RGN_AttachToChn() 时,
如果把 OSD 反色开关 bInvColEn:
设置为 TRUE , 总是返回错误码:0xA0038009( HI_ERR_RGN_NOT_PERM 该操作不允许,如试图修改静态配置参数)。
设置为 FALSE,就OK。
创建完 region 后,调用 HI_MPI_RGN_AttachToChn() ,即使出错也没理由返回 "试图修改静态配置参数" 的错误码啊。
不知哪位同仁遇没遇到过这种问题,或是有什么思路。
代码:
[code] alignRect.left = ROUND_UP(alignRect.left, 16);
alignRect.right = ROUND_UP(alignRect.right, 16);
alignRect.top = ROUND_UP(alignRect.top, 16);
alignRect.bottom = ROUND_UP(alignRect.bottom, 16);
stRgnAttr.enType = OVERLAY_RGN;
stRgnAttr.unAttr.stOverlay.enPixelFmt = PIXEL_FORMAT_RGB_1555;
stRgnAttr.unAttr.stOverlay.u32BgColor = 0xfc;
stRgnAttr.unAttr.stOverlay.stSize.u32Width = alignRect.right - alignRect.left;
stRgnAttr.unAttr.stOverlay.stSize.u32Height = alignRect.bottom - alignRect.top;
if(HI_MPI_RGN_Create(handle, &stRgnAttr) !=HI_SUCCESS){
return XPR_ERR_ERROR;
}
stChn.enModId = HI_ID_VENC;
stChn.s32DevId = 0;
stChn.s32ChnId = 0;
memset(&stChnAttr, 0, sizeof(stChnAttr));
stChnAttr.bShow = HI_TRUE;
stChnAttr.enType = OVERLAY_RGN;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32X = alignRect.left;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32Y = alignRect.top;
stChnAttr.unChnAttr.stOverlayChn.u32BgAlpha = 0;
stChnAttr.unChnAttr.stOverlayChn.u32FgAlpha = 128;
stChnAttr.unChnAttr.stOverlayChn.u32Layer = 0;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bAbsQp = HI_FALSE;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.s32Qp = 0;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Width = 16;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Height = 16;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.u32LumThresh = 200;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.enChgMod = MORETHAN_LUM_THRESH;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_TRUE; //为TRUE时返回错误码 0xA0038009
//stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_FALSE;
if((error = HI_MPI_RGN_AttachToChn(handle, &stChn, &stChnAttr)) != HI_SUCCESS) {
printf("HI_MPI_RGN_AttachToChn handle:%d,stChn.s32ChnId:%d, stChn.s32DevId:%d\n",handle, stChn.s32ChnId, stChn.s32DevId);
printf("HI_MPI_RGN_AttachToChn failed:%x\n",error);
return XPR_ERR_ERROR;
}
printf("HI_MPI_RGN_AttachToChn successful\n");
return XPR_ERR_SUCCESS;[/code]
版本:
[Hi3516A_MPP_V1.0.5.0 B030 Release]
描述:
调用 HI_MPI_RGN_AttachToChn() 时,
如果把 OSD 反色开关 bInvColEn:
设置为 TRUE , 总是返回错误码:0xA0038009( HI_ERR_RGN_NOT_PERM 该操作不允许,如试图修改静态配置参数)。
设置为 FALSE,就OK。
创建完 region 后,调用 HI_MPI_RGN_AttachToChn() ,即使出错也没理由返回 "试图修改静态配置参数" 的错误码啊。
不知哪位同仁遇没遇到过这种问题,或是有什么思路。
代码:
[code] alignRect.left = ROUND_UP(alignRect.left, 16);
alignRect.right = ROUND_UP(alignRect.right, 16);
alignRect.top = ROUND_UP(alignRect.top, 16);
alignRect.bottom = ROUND_UP(alignRect.bottom, 16);
stRgnAttr.enType = OVERLAY_RGN;
stRgnAttr.unAttr.stOverlay.enPixelFmt = PIXEL_FORMAT_RGB_1555;
stRgnAttr.unAttr.stOverlay.u32BgColor = 0xfc;
stRgnAttr.unAttr.stOverlay.stSize.u32Width = alignRect.right - alignRect.left;
stRgnAttr.unAttr.stOverlay.stSize.u32Height = alignRect.bottom - alignRect.top;
if(HI_MPI_RGN_Create(handle, &stRgnAttr) !=HI_SUCCESS){
return XPR_ERR_ERROR;
}
stChn.enModId = HI_ID_VENC;
stChn.s32DevId = 0;
stChn.s32ChnId = 0;
memset(&stChnAttr, 0, sizeof(stChnAttr));
stChnAttr.bShow = HI_TRUE;
stChnAttr.enType = OVERLAY_RGN;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32X = alignRect.left;
stChnAttr.unChnAttr.stOverlayChn.stPoint.s32Y = alignRect.top;
stChnAttr.unChnAttr.stOverlayChn.u32BgAlpha = 0;
stChnAttr.unChnAttr.stOverlayChn.u32FgAlpha = 128;
stChnAttr.unChnAttr.stOverlayChn.u32Layer = 0;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bAbsQp = HI_FALSE;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.s32Qp = 0;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Width = 16;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Height = 16;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.u32LumThresh = 200;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.enChgMod = MORETHAN_LUM_THRESH;
stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_TRUE; //为TRUE时返回错误码 0xA0038009
//stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_FALSE;
if((error = HI_MPI_RGN_AttachToChn(handle, &stChn, &stChnAttr)) != HI_SUCCESS) {
printf("HI_MPI_RGN_AttachToChn handle:%d,stChn.s32ChnId:%d, stChn.s32DevId:%d\n",handle, stChn.s32ChnId, stChn.s32DevId);
printf("HI_MPI_RGN_AttachToChn failed:%x\n",error);
return XPR_ERR_ERROR;
}
printf("HI_MPI_RGN_AttachToChn successful\n");
return XPR_ERR_SUCCESS;[/code]
我来回答
回答6个
时间排序
认可量排序
认可0
认可0
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片
相关问答
-
2016-03-08 10:00:36
-
2022-10-13 13:54:46
-
2016-01-27 15:42:38
-
2017-05-05 14:56:23
-
2015-11-05 09:27:35
-
2019-02-28 11:11:46
-
2017-09-22 09:41:12
-
2020-06-05 15:13:45
-
2017-02-23 10:08:37
-
2017-06-05 10:13:52
-
2018-11-02 15:19:41
-
2016-12-05 10:56:07
-
2018-12-03 14:14:13
-
32019-09-02 16:35:46
-
2021-06-03 07:50:06
-
2014-10-16 17:05:38
-
2016-05-21 09:05:58
-
2017-09-16 00:49:04
-
2019-04-23 11:47:53
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
100Hi3519DV500移植阿里云aliyun-oss-c-sdk-3.11.2
-
10【悬赏】Hi3519DV500在新打板的硬件上调用svp_acl_mdl_execute 会宕机
-
10海思 PQTools 使用时显示无法注册ae库 awb库
-
50求imx291 mclk37.125M 4lane 1920x1080@30fps WDR的初始化系列
-
5Hi3516DV500-DMEBPLUS_6L_T_LPDDR4_2400M-2GB_32bit-A55_850M.xlsm
-
25鸿鸥派【Hi3519DV500】双摄sc450ai+10.1显示屏点不亮
-
5SS626接WCH HUB芯片CH335F问题
-
10求一份RK3588下IMX586摄像头的IQ json文件
-
50Hi3519DV500+OS04A10 slave驱动 (双目同步问题)
-
103616 3403 FPN标定黑斑问题
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认

微信扫码分享
QQ好友