会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Vedic
博客园
首页
新随笔
联系
管理
订阅
2020年9月9日
RGB打水印在YUV图片上
摘要: 一、 概述 将RGB图片打在YUV上需要注意的是, 字体之外应该透明, 否则背景也会被覆盖不好看, 所以RGB必须有透明度, 本测试格式为BMP ARGB8888(也即B是最低字节, A是最高字节), YUV格式为NV21(YUV420SP), 第一步是将ARGB转换成NV21, 然后小NV21打在
阅读全文
posted @ 2020-09-09 11:24 Vedic
阅读(1221)
评论(0)
推荐(0)
2020年9月3日
BMP格式解析
摘要: 一、介绍 BMP文件格式,又称为位图,是Windows系统中广泛使用的图像文件格式。 BMP文件的数据分为四个部分: bmp文件头(bmp file header):提供文件的格式、大小等信息 位图信息头(bitmap information):提供图像数据的尺寸、位平面数、压缩方式、颜色索引等信息
阅读全文
posted @ 2020-09-03 16:58 Vedic
阅读(1801)
评论(0)
推荐(0)
2019年7月17日
判断CPU大小端示例代码
摘要: #include int checkCPU() { union w{ int a; char b; }c; c.a = 1; return (c.b == 1); } int main() { printf("This CPU is %s\n", checkCPU() ? "little" : "big"); ...
阅读全文
posted @ 2019-07-17 16:12 Vedic
阅读(468)
评论(0)
推荐(0)
reboot 示例代码
摘要: #include #define LINUX_REBOOT_CMD_RESTART 0x01234567 int main() { reboot(LINUX_REBOOT_CMD_RESTART); return 0; }
阅读全文
posted @ 2019-07-17 16:09 Vedic
阅读(347)
评论(0)
推荐(0)
gps示例代码
摘要: /* main.c */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <unist
阅读全文
posted @ 2019-07-17 16:06 Vedic
阅读(643)
评论(0)
推荐(0)
UART 串口示例代码
摘要: /* uart_tx.c */ #include #include #include #include #include #include #include #include #include #include #define TEST_LEN (1024 * 400) static char *dev_name = "/dev/ttyS2"; static int bau...
阅读全文
posted @ 2019-07-17 15:48 Vedic
阅读(1244)
评论(0)
推荐(0)
2019年7月16日
Linux soft lockup 和 hard lockup
摘要: 一. 整体介绍 soft lockup:检测调度异常, 一般是驱动禁止调度或者阻塞比如while(1), 导致无法调度其他线程, 需要注意的是, 应用程序while(1)不会影响其调度, 只要有更高的优先级出现会在时间滴答(10ms)选中并切换进程, 但如果是在驱动也即内核态, 即使有更高优先级时间
阅读全文
posted @ 2019-07-16 14:43 Vedic
阅读(2896)
评论(0)
推荐(0)
2019年7月10日
Linux嵌入式kgdb调试环境搭建
摘要: 我的环境 PC 端: win7 + vmware-15 ubuntu16.04开发板:Freescale i.MX6 单CPU Linux-4.1.15 交叉编译器为 arm-none-linux-gnueabi-gcc(gcc version 4.6.3) 1. 前言 上篇博文介绍了应用程序调试工
阅读全文
posted @ 2019-07-10 17:01 Vedic
阅读(6261)
评论(2)
推荐(1)
2019年6月28日
Linux嵌入式GDB调试环境搭建
摘要: 我的环境 PC 端: CPU:x86_64, 系统:Ubuntu,IP:172.16.2.212开发板:CPU:sw9820c,系统:openwrt linux,IP:172.16.30.20PC端安装的 C 交叉编译器为 arm-none-linux-gnueabi-gcc(gcc version
阅读全文
posted @ 2019-06-28 18:11 Vedic
阅读(6831)
评论(0)
推荐(0)
2019年6月22日
Linux-workqueue讲解
摘要: 参考 代码:linux-3.10.65/kernel/workqueue.c 1. workqueue 是什么? workqueue是对内核线程封装的用于处理各种工作项的一种处理方法, 由于处理对象是用链表拼接一个个工作项, 依次取出来处理, 然后从链表删除,就像一个队列排好队依次处理一样, 所以也
阅读全文
posted @ 2019-06-22 16:15 Vedic
阅读(22150)
评论(4)
推荐(2)
下一页
公告