On 22 Dec 98 at 17:34, Paul E. wrote:
> Could someone explain the difference (advantage?) in the colour palette
> under display settings between:
> 256 colour
Each pixel is represented by ONE byte of screen buffer RAM,
containing a value between 0 and 255. A special table on the video
card holds 256 RGB (Red-Green-Blue) colour values, and the byte for
each pixel determines which palette entry is used for that pixel.
Obviously, there can only be 256 different shades present on screen
at once.
> High colour (16 bit)
Each pixel is represented by TWO bytes of screen buffer RAM -- so
at the same resolution, this requires twice as much memory on your
video card as 256-colour does.
16 bits allows 64K (65536) different pixel values; I believe
they're interpreted as 5 bits (0-31 value) each of red, green and
blue, plus a single high/low intensity bit. This mode can be a
reasonable compromise if you need high resolution but don't have much
video memory
> True colour (24 bit)
Each pixel is represented by THREE bytes of screen buffer RAM -- so
at the same resolution, this requires three times as much memory on
your video card as 256-colour does.
Each byte supplies a 0-255 value for red, blue, or green. 24 bits
allows for 16M different values, and this is a finer division of the
visible spectrum than most adult humans can see. Finer gradations
are possible in nature, but our eyes are not sufficiently sensitive
to detect them.
> True colour (32 bit)
Each pixel is represented by THREE bytes of screen buffer RAM --
but the data for each pixel starts every FOUR bytes. So at the same
resolution, this requires four times as much memory on your video
card as 256-colour does.
The x86 CPUs are capable of excahnging data with memory in 8-bit,
16-bit, and 32-bit transfers. [Transfers between L2 cache and memory
are always at least 32 bits wide, but transfers between CPU and cache
still vary like this, and video RAM might not be cached.] Aligning
the pixel data on 32-bit boundaries means that a single pixel can be
read or written with a single 32-bit transfer, instead of the
combination of a 16-bit and an 8-bit (and some slight register
shuffling in between) that a 24-bit pixel requires.
Summary:
256: Realistic minimum. [Avoid 16-colour VGA mode!]
16-bit: Reasonable compromise, allowing high resolution while
retaining plenty of shades.
24-bit: All the colours you could ever use.
32-bit: 24-bit colour with better performance.
David G
Do you want to signoff PCSOFT or just change to
Digest mode - visit our web site:
http://nospin.com/pc/pcsoft.html
|