home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17883 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  5.1 KB

  1. Path: sparky!uunet!spool.mu.edu!olivea!bunker!nuconvex!starpt!doiron
  2. From: doiron@starpt.UUCP (Glenn Doiron)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Chunky Pixels vs. Bitplanes  (was: Chunky Chip Set...)
  5. Message-ID: <doiron.0k4a@starpt.UUCP>
  6. Date: 28 Dec 92 22:49:53 GMT
  7. References: <Karsten_Weiss.0n2o@ibase.stgt.sub.org> <1hbngoINNglt@uwm.edu>        <1992Dec28.000531.26783@mpifr-bonn.mpg.de>
  8. Organization: 68K Software Development
  9. Lines: 100
  10. X-NewsSoftware: GRn 1.16f (10.17.92) by Mike Schwartz & Michael B. Smith
  11.  
  12. In article <1992Dec28.000531.26783@mpifr-bonn.mpg.de> mlelstv@specklec.mpifr-bonn.mpg.de (Michael van Elst) writes:
  13. > In <jbickers.0m6w@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes:
  14. > >    You're kidding, right? Sure it's _possible_ to do it with planes,
  15. > >    but don't you think it is easier (and it is definitely faster) to
  16. > >    do it with chunky pixels?
  17. > No kidding. You are right that it is _easier_ with chunky pixels, but it
  18. > isn't necessarily slower. At some point memory bandwidth determines
  19. > execution speed and as long as an image needs the same memory it will
  20. > be processed (about) equally fast. My point is that quite often you
  21. > can live with a lower _depth_ of an image. A chunky pixel display
  22. > will still require processing of the full depth while a planar display
  23. > lets you strip extra bits.
  24.  
  25. Which is correct whenever you want to strip down images to a lower depth.
  26. However, I must inform you that the discussion was about chunky-vs-planar,
  27. not strip-down-to-lower-depth vs. leave-as-is.
  28.  
  29. > >    Well, it should be. Bypassing WritePixel() with chunky pixels will
  30. > >    be quicker than bypassing WritePixel() with planes. There is only
  31. > >    one address calculation, and only one write to memory.
  32. > Well, I'm not really talking about bypassing a routine and killing
  33. > RTG compatibility.
  34. > >> Yep, drawing thin lines is a plus on chunky pixel architectures. Floodfills
  35. > >    Any kind of lines.
  36. > Nope. When you start to make lines thicker than 1 pixel you have to
  37. > fill polygons which has some advantages on bitplanes.
  38.  
  39. Nope.  None.  Nada.  Wrong.  Incorrect.  This type of operation will almost
  40. always be faster on chunky.  The best you can hope for w/ planar is a tie.
  41.  
  42. > >> on the other hand can be faster with bitplanes. Not sure about curve drawing
  43. > >    I don't see how flood filling can be faster with planes. The
  44. > >    classic method is mostly ReadPixel() and WritePixel() operations,
  45. > >    which chunky pixels excel at.
  46. > :) Hmm, the classic method is using Flood(). There's nothing that forbids
  47. > the graphics.library to access the hardware and use every optimization.
  48.  
  49. However, a great deal of the traditional graphics functions function much
  50. faster on chunky systems than planar systems.  ReadPixel() and WritePixel()
  51. are two, but others not commonly used on the Amiga (due to a combo of weak
  52. base CPU/planar architecture) are 2d-bitmap-matrix transformations, such as
  53. scaling, rotation, warping, etc.  All these operation are *much* faster on
  54. a chunky pixel architecture.  I can't think of a single 256-color operation
  55. that will be faster on a planar-architecture than a chunky architecture.
  56. Honest.
  57.  
  58. > >> but most curve drawing routines I know need several multiplications per point.
  59. > >    So? There are incremental algorithms for drawing some sorts of
  60. > >    curves (like circles), and having chunky pixels isn't going to
  61. > >    make the calculation of the curve faster, but it WILL speed up the
  62. > >    WritePixel() part of the routine significantly.
  63. > True. But the WritePixel() (noone will use WritePixel !) part is only a
  64. > small part of the rendering operation.
  65.  
  66. Aargh.  Here's a comparison:
  67.  
  68. (256 color mode)  AGA (16-bit accesses)      Chunky (16-bit accesses)
  69.  32-point line:   256 reads 256 writes       32 writes
  70.  
  71.  32-point line,
  72.  2 pixels thick:  512 reads 512 writes       64 writes
  73.  (Why are bitplanes better for this?  Seems like an additional 960 memory
  74.   accesses to me.)
  75.  
  76.  32x32 blit:      1536 reads 512 writes      1024 reads, up to 1024 writes
  77.          or up to 2304 reads 768 writes
  78.  (second case if either source or dest. non-aligned)
  79.  (including transparency/masking)
  80.  
  81.  Scaling: 32x32 image, blow up to 64x64
  82.   convert to chunky: 8192 reads              no-op
  83.   do mathematical xforms                     do mathematical xforms
  84.   convert to bitplane: 32768 reads           no-op
  85.  
  86. OK, now tell me which one will be slower?  I'm not even factoring in the
  87. ridiculous amount of bit-shifting and masking involved in all these
  88. operations for AGA (excluding the 32x32 blit... blitter was assumed).
  89.  
  90. > -- 
  91. > Michael van Elst
  92. > UUCP:     universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
  93. > Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
  94. >                                 "A potential Snark may lurk in every tree."
  95.  
  96. Glenn Doiron (who thinks this chunky vs. planar stuff is hogwash anyways..
  97.               we need both...)
  98. --
  99. Amiga UUCP+
  100. Origin:  uunet.uu.net!starpt.UUCP!doiron (Organization:68K Software Development)
  101.          BIX: gdoiron
  102.  
  103. ** Not enough memory to perform requested operation.  Add 4 megs and retry.
  104.