惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
月光博客
月光博客
T
Tailwind CSS Blog
小众软件
小众软件
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
B
Blog RSS Feed
博客园 - 司徒正美
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 聂微东
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
博客园 - Franky
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - embed

TCP IP for embed system [zt]模拟视频 入门 UDP and TCP difference reference book list linux device driver study(chapter2) 2004年的最后一帖 mips的函数调用与堆栈 优化与优化工具 arm assembly note dsp编程学习 图象传感器厂家 一些电路的FAQ 算法的书 TCP的写 rtos's schedule algorithm c++ 学习 关于密码学方面的书 编译原理方面的书 算法的书
yuv2rgb
embed · 2004-12-16 · via 博客园 - embed

因此,假设:
C = Y - 16
D = U - 128
E = V - 128

将 YUV 转换为计算机 RGB 的公式可以按照下列方式进行派生:
R = clip( round( 1.164383 * C                   + 1.596027 * E  ) )
G = clip( round( 1.164383 * C - (0.391762 * D) - (0.812968 * E) ) )
B = clip( round( 1.164383 * C +  2.017232 * D                   ) )

其中 clip() 表示剪辑为范围 [0..255]。这些公式可以由下列公式进行合理近似计算:

R = clip(( 298 * C           + 409 * E + 128) >> 8)
G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
B = clip(( 298 * C + 516 * D           + 128) >> 8)

这些公式使用精确度必需大于 8 位的一些系数计算出每个 8 位结果,中间结果需要多于 16 位的精确度。


rgb的打包例如rgb565=>rgb占用16bit,rgb的planner格式,3个指针,
yuv一般都是888格式.

在LCD中64k色的一般都是RGB565,RGB565=>rgb888实际上就是把(RGB565 / 32 ) *255