home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!usc!cs.utexas.edu!rutgers!cbmvax!cbmehq!cbmger!peterk
- From: peterk@cbmger.de.so.commodore.com (Dr. Peter Kittel, Commodore Germany)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Chunky Pixels vs. Bitplanes (was: Chunky Chip Set...)
- Message-ID: <10617@cbmger.de.so.commodore.com>
- Date: 27 Jan 93 07:58:54 GMT
- References: <Karsten_Weiss.0oqi@ibase.stgt.sub.org>
- Organization: Commodore Germany
- Lines: 52
-
- Reply-To: cbmehq!cbmger!peterk@cbmvax.commodore.com
- Followup-To: comp.sys.amiga.programmer
- Distribution:
- Organization: Commodore Germany
- Keywords:
-
- In article <Karsten_Weiss.0oqi@ibase.stgt.sub.org> Karsten_Weiss@ibase.stgt.sub.org (Karsten Weiss) writes:
- >In a message dated Mon 25 Jan 93 2:50, Peterk@cbmger.de.so.commodore.com (
- >wrote:
- >
- > P> Yes, for n*8 bits/pixel, chunky is in most cases the best option. (I
- > P> still
- > P> believe there also situations where planar can be better also here.)
- > P> If you have some odd number of bits, then I guess the planar structure
- > P> has more advantages.
- >
- >I think there are many examples which proof that you are wrong here. Just
- >imagine a simple DrawLine routine (with the processor of course).
-
- But imagine the same, say, on a 3-bit or 5-bit display. In a plane
- architecture the number of operations decreases proportionally, with
- chunky not.
-
- Someone other also told about other effects where you intentionally
- touch only some of the bitplanes, e.g. to shade an area. There also you
- get direct speed advantages with planes, where you have the same number
- of memory accesses with chunky, *plus* that masking and or'ing that
- is else counted as a plane disadvantage. These may be special cases
- in comparison to your "simple DrawLine rountine", yes, I admit that
- fully. The only thing I am debating is the argument I also heard that
- chunky *always* is better. And this definitely doesn't hold.
-
- >I am sure that nobody can do a faster drawline for a planar screen than for
- >a chunky screen - NO MATTER HOW MANY COLORS THE LINE HAS!
-
- Hmm, you're wrong: You say no matter how many colors, so I choose two,
- 1 bitplane! In this case we have the following scenario (using Bresenham):
- If the line is more horizontal (and your program is not too dumb), you
- have fewer memory accesses (down to 1/8) than in chunky. Line drawing
- here is in most cases an OR into a register byte, that only eventually
- gets read or written from/to memory. Planes win here. If the line is
- vertical, you have as many memory accesses for plane and for chunky,
- and the operation of setting one bit in that byte is the same. So the
- two alternatives turn out with equal timing. In the average case, plane
- wins. - When using more than 2 colors, there may exist a limit (heavily
- dependant on programming skills) where you get a breakeven between planes
- and chunky. And don't ask me where that precisely is :-)
-
- --
- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions...
- Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk
- Wer's nicht kann, soll's bleiben klopfen oder Steine lassen!
-