Archive: Full Screen AVS at different Color Depths


18th November 2001 01:27 UTC

Full Screen AVS at different Color Depths
Hey Everyone:

I have done an experiment with screen resolutions and color depths on the effect of frame rates of Winamp's (version 2.77) bundled AVS visualizations in full screen mode.

My computer has a 750 Mhz Athlon CPU, 160MB of PC100 RAM, a Sound Blaster 16 PCI sound card, and a 3dfx Voodoo4 4500 AGP video card. I used the Marco - katmanduCommercial1 visualization on a certain song from the same point in the song. I expected to get better frame rates for every resolution by using 16-bit color. Instead, I got better frame rates at 32-bit color. This is perplexing, since theoretically there is more video data to process at 32-bit color. My only explanation is that the visualizations are programmed in 32-bit color and the video card must downsample the picture to achieve 16-bit color. Could anyone shed some light on this?

Thanks...


18th November 2001 07:33 UTC

AVS does not use hardware acceleration, None. Make sure the options are the same with 32 bit color, there are a lot of options in AVS


18th November 2001 14:35 UTC

Logical
Actually it's very logical if you know the how's and why's.

In 32-bit color, only 24-bits are used for colour: one byte red, one byte green and one byte blue. The remaining byte is not used, but it does make it so that every pixel spans exactly 32-bits, which is exactly the size of the cpu datapaths and registers since a 386.

In 16-bit color, all bits are used: 5 bits red, 6 bits green and 5 bits blue. The channels are mixed across the 2 bytes.

Now because 32-bit has each channel in a separate byte, it's easy to extract them and perform operations on them. In 16-bit color, the channels have to be bitmasked and shifted out before operations can be done, and they have to be put back together afterwards.

In 3D hardware acceleration this is no problem, because the designer can do the operations needed for 16-bit color freely in the hardware design. In software mode though, on a 32-bit CPU, it's a lot easier and faster to go for 32-bit.


18th November 2001 14:41 UTC

And...
And to confirm your suspicion, yes the AVS effects are all coded in 32-bit (if you look at the APE API you'll notice this). But my explanation might shed some light on other cases where 32-bit is faster than 16-bit.


18th November 2001 23:54 UTC

Thank You
Many thanks to everyone who replied. That certainly shed some light on this.