3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fbset でのフレームバッファのフォーマット情報の読み解き方

Posted at

linuxでフレームバッファに映像を表示する。

そのためには、データの並びを確認しなければいけない。

Linuxでは__fbset__ というコマンドを使うと、現在のフレームバッファの情報(解像度, 色のフォーマット)が確認できる。

しかし、初見だと色のフォーマットの読み方がわからなかった。

初学者のために備忘録を兼ねて記事を残しておく。


//フレームバッファの情報の
$ fbset

    mode "1184x624"
        geometry 1184 624 1184 624 32
        timings 0 0 0 0 0 0 0
        rgba 8/16,8/8,8/0,8/24
    endmode
    

fbsetを実行すると、上のように現在のフレームバッファの情報が確認でき

解像度は1184x624で
色のフォーマットは rgba 8/16,8/8,8/0,8/24 とあるがわけがわからない。

これは以下のように読むことができる。


// 読み方
rgba 8/16, 8/8, 8/0, 8/24
-------------------------
 ==> r:8/16 - 8 bit per pix / 16 bit shift
 ==> g:8/8  - 8 bit per pix /  8 bit shift
 ==> b:8/0  - 8 bit per pix /  0 bit shift
 ==> a:8/24 - 8 bit per pix / 24 bit shift
 = (つまり) ARGB - 8-8-8-8 フォーマットということ.

参考

fbset(1) — fbset — Debian stretch — Debian Manpages

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?