当前位置:网站首页>RK1126平台OSD的实现支持颜色半透明度多通道支持中文
RK1126平台OSD的实现支持颜色半透明度多通道支持中文
2022-07-04 12:52:00 【QMCY_jason】
先看下效果图 红色为主码流通道,白色为子码流通道,支持中文显示 后期还要实现多行显示 不同位置显示 以及左对齐 右对齐的问题


通常来说 IPC 都需要实现OSD的功能 即在视频上需要叠加时间戳 已经标识当前的主码流子码流等信息
之前在海思3518EV300平台实现过 下图即是海思3518EV300 的摄像头上的实际效果

实际上的原理并不复杂 ,就是把osd内容转为位图然后叠加到yuv数据上面
osd转位图这个过程 大部分是通过freetype来实现的,之前的海思上也是
但是之前海思的代码直接移植过来之后 显示并不正常 如下:
直接显示了两行 然后字体颜色也不对 不是纯白的

经过一段时间的不断摸索,终于找到了原因。
原因就是海思平台的OSD支持的像素格式有很多种然后用的是ARGB565 (此电脑上没有海思的代码)具体名字不记得了大概 总之就是一个像素占用2个字节
而RK1126平台的OSD格式支持格式如下

只支持一种 PIXEL_FORMAT_ARGB_8888 也即一个像素占用4个字节 在所有涉及到相关的地方都改成4个字节的方式操作即可 如下的两个地方 都需要修改下 不然显示就会不正常

边栏推荐
- LifeCycle
- Can mortgage with housing exclude compulsory execution
- Migration from go vendor project to mod project
- R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用by参数指定分组参数可视化不同分组的点图分布
- Leetcode T47: 全排列II
- 基于YOLOv1的口罩佩戴检测
- nowcoder重排链表
- 【信息检索】链接分析
- R语言dplyr包summarise_if函数计算dataframe数据中所有数值数据列的均值和中位数、基于条件进行数据汇总分析(Summarize all Numeric Variables)
- Ws2818m is packaged in cpc8. It is a special circuit for three channel LED drive control. External IC full-color double signal 5v32 lamp programmable LED lamp with outdoor engineering
猜你喜欢

学内核之三:使用GDB跟踪内核调用链

瑞吉外卖笔记

测试流程整理(3)

Unity Shader学习(三)试着绘制一个圆

Rich text editing: wangeditor tutorial

sql优化之查询优化器
![[R language data science]: cross validation and looking back](/img/a8/84a5685ebcb12d3cf8e32e1fbac053.png)
[R language data science]: cross validation and looking back

Data warehouse interview question preparation

DDD application and practice of domestic hotel transactions -- Code

Introducing testfixture into unittest framework
随机推荐
[FAQ] Huawei Account Service Error Report 907135701 Common reasons Summary and Solutions
R语言使用epiDisplay包的followup.plot函数可视化多个ID(病例)监测指标的纵向随访图、使用stress.col参数指定强调线的id子集的颜色(色彩)
Use of tiledlayout function in MATLAB
去除重复字母[贪心+单调栈(用数组+len来维持单调序列)]
Understand chisel language thoroughly 09. Chisel project construction, operation and testing (I) -- build and run chisel project with SBT
Ws2818m is packaged in cpc8. It is a special circuit for three channel LED drive control. External IC full-color double signal 5v32 lamp programmable LED lamp with outdoor engineering
Leetcode T49: 字母异位词分组
PHP log debugging
php 日志调试
Use the default route as the route to the Internet
Understand chisel language thoroughly 11. Chisel project construction, operation and test (III) -- scalatest of chisel test
Gorm data insertion (transfer)
测试流程整理(2)
nowcoder重排链表
MySQL的存储过程练习题
GCC [6] - 4 stages of compilation
Huahao Zhongtian rushes to the scientific and Technological Innovation Board: the annual loss is 280million, and it is proposed to raise 1.5 billion. Beida pharmaceutical is a shareholder
The mouse wheel of xshell/bash/zsh and other terminals is garbled (turn)
IP lab monthly resumption · issue 5
Yingshi Ruida rushes to the scientific and Technological Innovation Board: the annual revenue is 450million and the proposed fund-raising is 979million