home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / graphics / 11694 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  2.2 KB

  1. 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
  2. From: tgl+@cs.cmu.edu (Tom Lane)
  3. Newsgroups: comp.graphics
  4. Subject: Re: N bit planes/pixel or N bits/pixel?
  5. Message-ID: <BxIGnI.EzD.2@cs.cmu.edu>
  6. Date: 10 Nov 92 17:30:48 GMT
  7. Article-I.D.: cs.BxIGnI.EzD.2
  8. References: <1dn8rjINNdq3@kitty.ksu.ksu.edu>
  9. Sender: news@cs.cmu.edu (Usenet News System)
  10. Organization: School of Computer Science, Carnegie Mellon
  11. Lines: 29
  12. Nntp-Posting-Host: g.gp.cs.cmu.edu
  13.  
  14. sdoran@kitty.ksu.ksu.edu (Steven Marcotte) writes:
  15. >What is the advantage of N bitplanes/pixel over N bits/pixel?  I would
  16. >think that the N bin/pixel (packed-pixel) representation would offer
  17. >better speed than jumping through memory and performing bit twiddling,
  18. >especially at 8 bits/pixel.
  19.  
  20. I assume you are contrasting the case where each pixel occupies one address
  21. location with the case where each bitplane appears (packed) in a separate
  22. part of the address space.  (For example, in the first case a given byte
  23. might represent the 8-bit value of pixel x=456,y=123; in the second case a
  24. given byte might represent the low-order bits of eight adjacent pixels.)
  25.  
  26. I prefer the byte-per-pixel approach myself.  However, there are indeed
  27. cases where separate bitplanes are a win, namely where you want to
  28. manipulate a bitplane independently.  For example, you could handle a cursor
  29. or a video-game "sprite" by setting appropriate bits in just one bitplane,
  30. with the remaining bitplanes containing the unchanged background.  With
  31. appropriate color map entries this will give the desired results.
  32.  
  33. The other main reason for bitplane hardware is that it takes up less address
  34. space in cases where you don't have exactly 8, 16, or 32 bits/pixel; there
  35. aren't unused bits in every byte.  On real computers with 32-bit or better
  36. address spaces, this isn't much of a concern, but on PCs it is a big issue.
  37. A PC video card driver has to do bank-swapping to get at all of the card's
  38. memory, so avoiding holes in the address space translates directly to fewer
  39. banks, less swapping.  Of course we all know that PCs are brain-damaged in
  40. every possible way, especially so in video hardware...
  41.  
  42.                 regards, tom lane
  43.