home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!math.fu-berlin.de!uni-paderborn.de!urmel.informatik.rwth-aachen.de!Germany.EU.net!mpifr-bonn.mpg.de!specklec.mpifr-bonn.mpg.de!mlelstv
- From: mlelstv@specklec.mpifr-bonn.mpg.de (Michael van Elst)
- Subject: Re: Chunky Pixels vs. Bitplanes (was: Chunky Chip Set...)
- Message-ID: <1993Jan3.204843.15155@mpifr-bonn.mpg.de>
- Sender: news@mpifr-bonn.mpg.de
- Nntp-Posting-Host: specklec
- Organization: Max-Planck-Institut f"ur Radioastronomie
- References: <Karsten_Weiss.0n2o@ibase.stgt.sub.org> <1hbngoINNglt@uwm.edu> <1993Jan3.035112.5898@mpifr-bonn.mpg.de> <doiron.0kl6@starpt.UUCP>
- Date: Sun, 3 Jan 1993 20:48:43 GMT
- Lines: 77
-
- In <doiron.0kl6@starpt.UUCP> doiron@starpt.UUCP (Glenn Doiron) writes:
- >Yes, but you could use 256-color chunky pixels instead of 1024 color planar
- >pixels and chunky would be faster.
-
- Simply to get more colors when needed.
-
- >I still, however, don't understand why
- >you are using scaling like it's the next best thing since the Amiga, you
- >are operating under reduced capacity.
-
- Because often you don't need full capacity. Using screens with different
- resolutions is one solution to the problem. Having layers that simply
- leave bitplanes untouched is another solution.
-
- A very popular example for this is a text window on top of a coloured
- background.
-
- >(inner loop)
- > x'=x * (1/xscale)
- > y'=y * (1/yscale) ;which does scaling
- > getpixel(x',y'): putpixel(x,y)
-
- Well, this isn't really scaling (which would need to calculate new
- pixel values, f.e. with a linear filter). However, you wouldn't use
- this algorithm in the form given as you want to avoid multiplications
- and divisions.
-
- > xrot=cos(theta)/xscale
- > yrot=sin(theta)/yscale
- >(inner loop)
- > x'=x * xrot
- > y'=y * yrot ;which will do your scaling and rotation in one fell swoop.
- > getpixel(x',y'): putpixel(x,y)
-
- >The key to why chunky is so much faster lies in the last getpixel/putpixel
- >pair.
-
- Both examples use very expensive operations for each pixel. The rendering
- is only a small fraction and splitting a pixel value into bits is only
- a small part of the rendering operation.
-
- >I've put up an algorithm that clearly shows why chunky is ridiculously
- >faster, using a general purpose algorithm that can scale/magnify/rotate any
- >image to any degree (no sanity checks :). You're welcome to continue to
- >argue, but I really think that for all intents and purposes I've proven my
- >point.
-
- Can't see that. You get to the point where you use single writepixel
- and readpixel operations where you don't need that just because this
- is the optimal case of chunky and the worst case of bitplanes. And you
- simply 'forget' that your calculations take more time than the pixel
- operations.
-
- >OK, ok, take your depth scaling. Your welcome. As I said before, if you
- >want to cut down to 128 colors, why not just go to 16? Chunky would be
- >faster THEN.
-
- 16 might be to small, and 16 color chunky is still quite slow as no
- processor used will support nibble operations. Most advantages of chunky
- displays come from the fact that the processor explicitely supports
- operations on a 'chunk' (8 bits in most cases).
-
- >Bingo. Chunky is still faster.
-
- Why faster ? Same operation, same amount of data, same speed.
-
- >Your correct, the _ratio_ is still the same, but the _amount of time_
- >wasted goes up incrementally, 2x, 4x, 8x etc.
-
- Can't follow your argument here.
-
- Regards,
- --
- Michael van Elst
- UUCP: universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
- Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
- "A potential Snark may lurk in every tree."
-