Skip to content

Commit

Permalink
Note RGB232
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed May 22, 2024
1 parent 1c8810a commit 915d2cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/hardware/onboard_xilinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

!!! note "降低色深和分辨率"

显存是项目中对内存消耗最大的模块。例如样例中使用的 800x600 24 位色,将会占用 `800*600*24/8/1048576 = 1.37MB` 的内存资源。而大部分设计中,无需使用 24 位真彩色(RGB888 格式),而是采用 RGB565 格式,甚至更低的色深,以尽量减少内存资源占用。对于低色深的图片,输出时可直接将其连接至视频数据的高位,将低位置 0;或采用各类转换算法完成色深之间的线性插值转换。有关这些颜色格式和相互转换,可参考 [博客文章](http://www.barth-dev.de/about-rgb565-and-how-to-convert-into-it/)。
显存是项目中对内存消耗最大的模块。例如样例中使用的 800x600 24 位色,将会占用 `800*600*24/8/1048576 = 1.37MB` 的内存资源。而大部分设计中,无需使用 24 位真彩色(RGB888 格式),而是采用 RGB565 格式,甚至更低的色深(例如 RGB232),以尽量减少内存资源占用。对于低色深的图片,输出时可直接将其连接至视频数据的高位,将低位置 0;或采用各类转换算法完成色深之间的线性插值转换。有关这些颜色格式和相互转换,可参考 [博客文章](http://www.barth-dev.de/about-rgb565-and-how-to-convert-into-it/)。

除了降低色深以外,也可以降低分辨率,例如显存只保存 400x300 个像素,然后在输出到 VGA/HDMI 的时候,在 x 和 y 方向上重复输出像素。

Expand Down

0 comments on commit 915d2cc

Please sign in to comment.