Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!chrisg From: chrisg@cbmvax.commodore.com (Chris Green) Newsgroups: comp.sys.amiga.programmer Subject: Re: best way to reverse a bitplane? Message-ID: <21107@cbmvax.commodore.com> Date: 1 May 91 14:07:35 GMT References: <1991Apr29.101302.1@atmo2.atmo.arizona.edu> Reply-To: chrisg@cbmvax.commodore.com (Chris Green) Organization: Commodore, West Chester, PA Lines: 16 In article <1991Apr29.101302.1@atmo2.atmo.arizona.edu> leuthold@atmo2.atmo.arizona.edu writes: >What is the best way to reverse a bitplane? A brute force method would be >to reverse the bytes and then reverse the bits in each byte. The only way I >can think of to reverse the bits in each byte is to mask each bit off then >shift it to its new place and add it to the new byte. Is there a better way? You want a 256 byte table for the bit reversal. A 64K table if you REALLY need it to be fast. -- *-------------------------------------------*---------------------------* |Chris Green - Graphics Software Engineer - chrisg@commodore.COM f | Commodore-Amiga - uunet!cbmvax!chrisg n |My opinions are my own, and do not - killyouridolssonicdeath o |necessarily represent those of my employer.- itstheendoftheworld r *-------------------------------------------*---------------------------d