Commit graph

24 commits

Author SHA1 Message Date
Pavel Krajcevski a80944901e Refactor CompressionJob struct.
In order to better facilitate the change from block stream order to non-block stream order,
a lot of changes were introduced to the way that we feed texture data to the compressors. This
data is embodied in the CompressionJob struct. We have made it so that the compression job
points to both the in and out pointers for our compressed and uncompressed data. Furthermore,
we have made sure that the struct also contains the format that its compressing for, so that if
any threading programs would like to chop up a compression job into smaller chunks based on the
format, it doesn't need to know the format explicitly, it just needs to know certain properties
about the format.

Moreover, the user can now define the start and end pixels from which we would like to compress
to. We can compress subsets of data by changing the in and out pointers and the width and height
values. The compressors will read data linearly until they reach the out pixels based on the width
of the given pixel.
2013-11-08 16:31:19 -05:00
Pavel Krajcevski f70b26a47f Change interface of compression/decompression jobs. 2013-11-06 18:55:53 -05:00
Pavel Krajcevski 9911d5edc5 Get rid of some redundant code =) 2013-10-08 20:30:31 -04:00
Pavel Krajcevski 4baf2ce311 Combine image functionality from PVRTCEncoder into Base library. 2013-10-04 18:35:18 -04:00
Pavel Krajcevski ab598c9ef7 Move Pixel class from PVRTCEncoder to FasTCBase. 2013-10-03 17:25:15 -04:00
Pavel Krajcevski dcf389d346 Merge PVRTC compressor into split library. 2013-09-27 17:30:16 -04:00
Pavel Krajcevski a57c40005c Small bug: don't allocate more memory than we have to. 2013-09-25 20:07:44 -04:00
Pavel Krajcevski 3de9abc908 Make PVRTC block size a constant accessible from the global header 2013-09-24 19:30:31 -04:00
Pavel Krajcevski 75e570ed16 Fix some compiler snafus 2013-09-24 17:46:09 -04:00
Pavel Krajcevski 29bd1368e6 Fix a few compiler warnings and add the BPTCEncoder license. 2013-09-15 14:56:09 -04:00
Pavel Krajcevski 571bf1ebd0 Remove dead code 2013-09-12 15:01:30 -04:00
Pavel Krajcevski f7404c44b9 Refactor debug output for modulation info. 2013-09-12 15:01:19 -04:00
Pavel Krajcevski 1b073eb4b7 Add 2BPP decompression 2013-09-12 14:45:56 -04:00
Pavel Krajcevski b3f8fcd454 Decouple upscale directions so that we can non-uniformly scale images. 2013-09-12 14:44:54 -04:00
Pavel Krajcevski dd625fca71 When going from 344(3/4) pixels to 4555, the alpha channel only has a zero appended to it. Hence we must clear that bit for each pixel that was transparent during decoding. 2013-09-10 13:22:53 -04:00
Pavel Krajcevski eb312ccb0a Small refactor 2013-09-09 14:16:45 -04:00
Pavel Krajcevski 0d0c65f536 Actually index into our pixels properly... 2013-09-06 01:55:25 -04:00
Pavel Krajcevski 2263080faa Fix the interleaving by doing it when we're actually reading in the blocks 2013-09-06 01:55:06 -04:00
Pavel Krajcevski db914018f1 Two enhancements:
1. Make sure to use the same lerping code for both modulation modes when decompressing.
2. Accept a flag during decompression that outputs the debug images that were computed during decompression.
2013-09-06 01:53:10 -04:00
Pavel Krajcevski a6e6138084 Change the lerp function to be more explicit. 2013-09-05 14:49:56 -04:00
Pavel Krajcevski 669b2c0934 Reverse the order for modulating our bits... I'm not convinced that this is right 2013-09-04 20:18:43 -04:00
Pavel Krajcevski 34ab853a62 Make sure to take into account the interleaved nature of the blocks when decompressing 2013-09-04 20:18:03 -04:00
Pavel Krajcevski 90662a56cd First pass at PVRTC Decompressor 2013-08-29 18:35:15 -04:00
Pavel Krajcevski 5c80b4f373 Initial files for PVRTC encoder. Starting with a decompressor. 2013-08-27 18:25:15 -04:00