home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 18022 < prev    next >
Encoding:
Text File  |  1993-01-01  |  8.9 KB  |  195 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mpifr-bonn.mpg.de!speckled.mpifr-bonn.mpg.de!mlelstv
  3. From: mlelstv@speckled.mpifr-bonn.mpg.de (Michael van Elst)
  4. Subject: Re: Chunky Pixels vs. Bitplanes (was: Chunky Chip Set...)
  5. Message-ID: <1993Jan1.141207.20262@mpifr-bonn.mpg.de>
  6. Sender: news@mpifr-bonn.mpg.de
  7. Nntp-Posting-Host: speckled
  8. Organization: Max-Planck-Institut f"ur Radioastronomie
  9. References: <Karsten_Weiss.0n2o@ibase.stgt.sub.org> <1hbngoINNglt@uwm.edu>           <1992Dec31.011428.2926@mpifr-bonn.mpg.de> <doiron.0kd5@starpt.UUCP>
  10. Date: Fri, 1 Jan 1993 14:12:07 GMT
  11. Lines: 182
  12.  
  13. In <doiron.0kd5@starpt.UUCP> doiron@starpt.UUCP (Glenn Doiron) writes:
  14. >> 
  15. >> Never said that you get an advantage in this situation. Here it is a tie.
  16.  
  17. >It's a tie if you're using special hardware, with a 32-point wide vertical
  18. >line which happens to lie entirely within the span of a single longword.
  19. >Wow, it was a tie.  Now, how about some more realistic examples?
  20.  
  21. We were talking about blitting a rectangle.
  22.  
  23. >> >> Simple. The display hardware to _show_ bitplanes needs additional
  24. >> >> shiftregisters and buffer which makes the hardware more expensive.
  25. >> 
  26. >> >Nope.  RAMDAC's show the display, buddy.  Not the TI chip.  And getting a
  27. >> >planar display out of VRAM is a trick I'd like to see... well it could be
  28. >> >done, if you want to store one plane in each VRAM, then muck about with the
  29. >> >hardware, majorly.
  30. >> 
  31. >> Sure, RAMDAC's generate the analog signal. RAMDAC's however use chunky pixels
  32. >> (they need all bits of a pixel to generate the analog signal for the pixel).
  33.  
  34. >So what, planar systems still need all bits of a pixel to generate the
  35. >pixel, too.  Your point?
  36.  
  37. Read again. I said one would need additional shift registers and buffers
  38. for the display hardware. You denied telling that the RAMDAC would do that.
  39. I pointed out that all RAMDACS await chunky pixels which can't be delivered
  40. directly by a plane oriented memory system. So you need _shift registers_
  41. and _buffers_.
  42.  
  43. >> So if you have a plane oriented memory (which is no real problem with VRAMs
  44. >> although you may get some alignment restrictions) then you have to convert
  45. >> it in hardware. This needs _shiftregisters_ and _buffers_. An example for
  46. >> such a hardware is the Denise and the Lisa chip (both also have a priority
  47. >> logic and Denise includes the RAMDAC).
  48.  
  49. >... which use DRAM's, not VRAMS.  No amount of 'alignment restrictions' is
  50. >going to cut it for VRAM planar, unless, as I said, you do funky
  51. >address/data schemes and put one plane in each VRAM, then mess further with
  52. >your RAMDAC feeding setup.  Using VRAMS like DRAMS will result in a loss of
  53. >all the performance gains VRAMS were supposed to give you in the first
  54. >place.
  55.  
  56. Rubbish. VRAMs simply give you a second I/O port for sequential output.
  57. The advantage is that you all the display refresh accesses do not stall
  58. the first port used by the rendering processor (CPU, blitter, what else).
  59. This gives you twice the bandwidth at 130% the cost for this special
  60. application.
  61.  
  62. >> >> 32x32 pixels (well-aligned) with 8 bitplanes need 2x32x8 fetches and stores.
  63. >> >> (2 words per line, 32 lines, 8 planes). In chunky you have 16x32 fetches 
  64. >> >> and stores (16 wrods per line, 32 lines).
  65. >> 
  66. >> >Once again, you are considering the best, break-even case, where all your
  67. >> >data is perfectly sized and aligned.  If you're going to be doing just
  68. >> >that, why bother with bitmap displays at all, when a character based
  69. >> >display will do just as good?
  70. >> 
  71. >> Because we do not talk about _text_ displays. You are right that we get
  72. >> some inefficiencies with non-aligned data. But so with chunky pixels
  73. >> if your memory isn't pixel oriented (f.e. if the memory is 16bit wide
  74. >> you "waste" bandwidth on odd addresses).
  75. >> 
  76. >> Thus bitplane devices are usually same speed as chunky pixel devices. But
  77. >> you can scale bitplane devices easily with the obvious performance advantages.
  78. >> You can never scale chunky pixel devices.
  79.  
  80. >"Scale"??  Remember, scaling is at least (in this example) 8x slower in
  81. >planar than chunky.
  82.  
  83. I'm talking about "scaling" the display to different display depths.
  84.  
  85. And as I also pointed out, bitmap scaling (that's what you thought of)
  86. is about same speed for chunky and bitplanes.
  87.  
  88. >> >Oh, obviously.  If you can make this magical piece of hardware, I'm sure
  89. >> >Commodore has a job position open for you.  Or any other number of chip
  90. >> >designers.
  91. >> 
  92. >> I could probably make that from discrete parts of fpgas but I have no
  93. >> experience in doing asics or even full custom designs.
  94.  
  95. >Why hasn't someone done it already?  Musn't be very cost-effective.
  96.  
  97. Correct. Bitplanes have the additional burden to feed a RAMDAC still
  98. with chunky pixels. Read what I said above. If someone came out with
  99. a RAMDAC that includes the necessary logic the price difference would
  100. become much smaller.
  101.  
  102. >Rubbish.  Show me a piece of code that can do that.  More special-case
  103. >optimizations? (sigh...)
  104.  
  105. That's not reall "special case". It is _optimization_, you need to use
  106. more complicated algorithms with a planar system. I always said: chunky
  107. is _simpler_ to use.
  108.  
  109. >But you're saying chunky->bitplane conversion is a small fraction of the
  110. >whole operation.  It's not.  That ridiculous amount of masking/shifting
  111. >might even take longer than the matrix multiplications.  For instance, on a
  112. >68000, each shift takes *2* additional clock cycles! (yuck!)
  113.  
  114. Then do not use shifts on 68000. Seems that you talk about advantages
  115. and disadvantages when using a 68000 processor. Don't forget that an
  116. 68000 is too slow in any case. That's why the Amiga has a blitter.
  117.  
  118. >> bitmap scaling can bit done on a per-plane basis.
  119.  
  120. >As I said, this is 8x the amount of work chunky has to do.  (You're doing
  121. >it a bit at a time instead of a byte at a time.)
  122.  
  123. YOU may do it that way. I simply use a table that maps several pixels
  124. to their scaled counterparts.
  125.  
  126. >You gave enough examples where special vaporware or special-case
  127. >optimizations might make them break even with chunky's results without
  128. >any optimization whatsoever.
  129.  
  130. My optimizations (which are possible for nearly any operation) show that
  131. bitplanes break even with chunky's results. That's what I was trying to
  132. show you. Both are about _same_ speed when handling the same amount of
  133. data. But bitplanes can be scaled in depth easily while chunky pixels
  134. cannot. This happends to be a slight advantage for chunky when you use
  135. 8bit, 16bit or 32bit displays.
  136.  
  137. >Oh, yeah.  Right.  Most graphics operations consist of 32-bit wide
  138. >vertical lines, conincidentally placed on a long-word boundary.  Most
  139. >operations consist of exactly doubling the size of horizontal/vertical
  140. >dimension.  Most operations consist of blitting data that's perfectly sized
  141. >and aligned to a perfectly aligned place on the screen.  Yep, that's all of
  142. >them.  I can't think of any other graphics operations you can do.
  143.  
  144. Most time consuming graphics operations consist of modifying larger areas,
  145. drawing diagonal lines or lots of number crunching to generate an image.
  146.  
  147. In the first case bitplanes have an advantage when the image depth is
  148. different from the memory architecture and a slight disadvantage when
  149. the image directly maps to the memroy architecture (f.e. 8bits/pixel).
  150.  
  151. In the second case you have a major advantage for chunky pixels. But
  152. the fact that lines cover less memory than filled areas and some
  153. optimizations possible with non-vertical lines make this advantage less
  154. important.
  155.  
  156. In the third case the rendering speed isn't important as the calculations
  157. outweigh any efficiency differences.
  158.  
  159. >Suppose you have hundreds, thousands of blits?  In general the speed of
  160. >blits isn't that critical for most productivity software, but
  161. >graphically-oriented software will benefit greatly from chunky
  162. >architecture.
  163.  
  164. Not at all.
  165.  
  166. >On WHAT???  Where you live?  If you wear underoos?  WHAT???!?? <foaming at
  167. >the mouth>
  168.  
  169. Think of rendering a 2 color horzontal line (the base case for chunky).
  170.  
  171. >Oh, I see.  More special case optimizations.  So you SAY it's a 256-color
  172. >display-  BUT you guarantee the top 2 bitplanes are already clear?
  173.  
  174. I don't say it is a 256 color display. That's the major point of bitplanes.
  175. It can be a 2,4,8,16,32,64,128 or 256 color display and the layering software
  176. will take into account what you need. Clearing the unused bitplanes (which
  177. happens if you have several depths in a single viewport) is done _once_
  178. for each newly created layer.
  179.  
  180. >Urrm, maybe I didn't explain that correctly.  Some chips will take a
  181. >1-pixel chunky image (same as 1-plane planar image), and write out 8-bit
  182. >data of value X for a 1 and Y for a 0.  So your character sets in chunky
  183. >actually only take up 1/8th as much, and foreground/background colors can
  184. >be set before you start the blit.  It's a function of the processor being
  185. >used, not chunky pixels.
  186.  
  187. Correct :)
  188.  
  189. Regards,
  190. -- 
  191. Michael van Elst
  192. UUCP:     universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
  193. Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
  194.                                 "A potential Snark may lurk in every tree."
  195.