Planar (computer graphics)

In computer graphics, planar is the method of representing pixel colors with several bitplanes of RAM. Each bit in a bitplane is related to one pixel on the screen. Unlike chunky, high color, or true color graphics, the whole dataset for an individual pixel isn't in one specific location in RAM, but spread across the bitplanes that make up the display.

This scheme originated in the early days of computer graphics. The memory chips of this era can not supply data fast enough on their own to generate a picture on a TV screen or monitor from a large framebuffer.[1] By splitting the data up into multiple planes, each plane can be stored on a separate memory chip. These chips can then be read in parallel at a slower rate, allowing graphical display on modest hardware. The EGA video adapter on early IBM PC computers uses planar arrangement in color graphical modes for this reason. The later VGA includes one non-planar mode which sacrifices memory efficiency for more convenient access.[2]

Combining four one-bit planes into a final "four bits per pixel" (16-color) image

For example, on a chunky display with 8-bits-per-pixel, each byte represents one pixel. Three pixels in a row are stored as follows, where up to 256 different colors are available:

Byte index012
Value (binary)000000000000000100000010
Value (decimal)012
Resulting pixel Black Blue Green

Whereas a planar data store could use 2 bitplanes, providing for a 4 color display:

Byte index0
Bit index01234567
Plane 010000010
Plane 100010010
Resulting pixel 1 0 0 2 0 0 3 0
Byte value146

Adding a third plane makes 23=8 colors available. Where fewer than 256 colors are needed, planar graphics are more economical in RAM compared with 8-bit chunky graphics, as there are no unused bits in a given byte.

A disadvantage of planar graphics is that more RAM address cycles are needed for scrolling and animations.

See also

References

  1. Rogers, David F. (1985). Procedural Elements for Computer Graphics. McGraw-Hill. p. 13. ISBN 0-07-053534-5.
  2. "VGA Hardware - OSDev Wiki". wiki.osdev.org. Retrieved September 4, 2017.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.