From: Antonino Daplas <adaplas@pol.net>
To: Linux PPC <linuxppc@rediffmail.com>
Cc: fbdev <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: bits_per_pixel query
Date: 09 Sep 2002 22:23:57 +0800 [thread overview]
Message-ID: <1031580939.632.17.camel@daplas> (raw)
In-Reply-To: <20020908163936.31266.qmail@webmail30.rediffmail.com>
On Mon, 2002-09-09 at 00:39, Linux PPC wrote:
>
> If the display is 8 bit, then it would require only
> a byte to represent the value of the pixel. If it were 24 bit,
> then it would require 3 bytes, and so
> on. Is that right? What would happen, to the size required for the
> buffer, if the display
> requires, say 12 bits per pixel, or 18 bits?
Just pad the pitch/line_length/stride of the buffer to the next byte
alignment your hardware is capable of. It is acceptable to have excess
bits/bytes which theoretically your hardware will ignore. Then the
framebuffer size is line_length*yres_virtual.
>
> So, if I were to set all the bytes after screen_base
> uptil screen_base + (hres*vres*bits_per_pixel/8) to
> zeros, then I would get a black screen. Is that right?
>
For static pseudocolor and truecolor, that is true, since 0 is hardwired
to black. For pseudocolor and directcolor, that depends on how the
DAC/palette is loaded. In most cases, it will produce a black screen.
Tony
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
prev parent reply other threads:[~2002-09-09 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-08 16:39 bits_per_pixel query Linux PPC
2002-09-09 14:23 ` Antonino Daplas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1031580939.632.17.camel@daplas \
--to=adaplas@pol.net \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linuxppc@rediffmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).