rohezal
Advanced Member
- Joined
- Oct 18, 2009
- Messages
- 1,712
Then I understood the jpg compression algorithm wrong, sorry. A nvidia guy told me once about gpu texture compression algorithms with a fixed size memory usage. They are uncompressed by hardware on the fly when the texture is loaded in the texture cache, so no time is lost:
One was:
Take 4x4 pixels. Take 2 Pixels Colors and store them seperately. Each compressed pixel has just 4 bits. The first 2 bits mark how much it looks like PixelColor1 the other 2 bits said how much it looks like PixelColor2.
For 24 bpp:
This way you used only 24+24 + 4*4*4 = 48 + 64 = 112 Bits = 14 Bytes.
Uncompressed:
24 * 4 * 4 = 384 Bits = 48 Bytes.
This way you need 3.5 times less memory independ of the input image and the image looks ok (maybe a bit blocky, depends on the image).
One was:
Take 4x4 pixels. Take 2 Pixels Colors and store them seperately. Each compressed pixel has just 4 bits. The first 2 bits mark how much it looks like PixelColor1 the other 2 bits said how much it looks like PixelColor2.
For 24 bpp:
This way you used only 24+24 + 4*4*4 = 48 + 64 = 112 Bits = 14 Bytes.
Uncompressed:
24 * 4 * 4 = 384 Bits = 48 Bytes.
This way you need 3.5 times less memory independ of the input image and the image looks ok (maybe a bit blocky, depends on the image).
Last edited by a moderator: