home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!tgl
- From: tgl+@cs.cmu.edu (Tom Lane)
- Newsgroups: comp.graphics
- Subject: Re: N bit planes/pixel or N bits/pixel?
- Message-ID: <BxIGnI.EzD.2@cs.cmu.edu>
- Date: 10 Nov 92 17:30:48 GMT
- Article-I.D.: cs.BxIGnI.EzD.2
- References: <1dn8rjINNdq3@kitty.ksu.ksu.edu>
- Sender: news@cs.cmu.edu (Usenet News System)
- Organization: School of Computer Science, Carnegie Mellon
- Lines: 29
- Nntp-Posting-Host: g.gp.cs.cmu.edu
-
- sdoran@kitty.ksu.ksu.edu (Steven Marcotte) writes:
- >What is the advantage of N bitplanes/pixel over N bits/pixel? I would
- >think that the N bin/pixel (packed-pixel) representation would offer
- >better speed than jumping through memory and performing bit twiddling,
- >especially at 8 bits/pixel.
-
- I assume you are contrasting the case where each pixel occupies one address
- location with the case where each bitplane appears (packed) in a separate
- part of the address space. (For example, in the first case a given byte
- might represent the 8-bit value of pixel x=456,y=123; in the second case a
- given byte might represent the low-order bits of eight adjacent pixels.)
-
- I prefer the byte-per-pixel approach myself. However, there are indeed
- cases where separate bitplanes are a win, namely where you want to
- manipulate a bitplane independently. For example, you could handle a cursor
- or a video-game "sprite" by setting appropriate bits in just one bitplane,
- with the remaining bitplanes containing the unchanged background. With
- appropriate color map entries this will give the desired results.
-
- The other main reason for bitplane hardware is that it takes up less address
- space in cases where you don't have exactly 8, 16, or 32 bits/pixel; there
- aren't unused bits in every byte. On real computers with 32-bit or better
- address spaces, this isn't much of a concern, but on PCs it is a big issue.
- A PC video card driver has to do bank-swapping to get at all of the card's
- memory, so avoiding holes in the address space translates directly to fewer
- banks, less swapping. Of course we all know that PCs are brain-damaged in
- every possible way, especially so in video hardware...
-
- regards, tom lane
-