Commit Graph

140 Commits

Author SHA1 Message Date
Pavel Krajcevski
6149c0af3a Add PVR tests
If cmake was able to find Imagination's PVR library, then it'd be nice to make sure that our decompressor matches theirs. We incur a bit of overhead by adding .pvr files into git, but hopefully this cost will be beneficial to actually figuring out how things are working...
2013-09-04 20:21:56 -04:00
Pavel Krajcevski
052157ea49 Rename our tests to start with the prefix 'Test' 2013-09-04 20:21:28 -04:00
Pavel Krajcevski
abd4ba8b54 Abstract away some utilities that we can use across all of our tests, and add a test for a gray image. The test currently seems to be failing, which is likely due to a bug in our bit depth manipulation code. 2013-09-04 20:20:37 -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
bb525ae9dc If all of the PVR blocks are the same then we don't need so much code. 2013-09-04 15:28:51 -04:00
Pavel Krajcevski
9273625eeb Add initial decompressor test 2013-09-02 19:14:50 -04:00
Pavel Krajcevski
4bbd80aab2 Make sure to preserve bit depth when bilinearly upscaling 2013-09-02 19:14:31 -04:00
Pavel Krajcevski
3f4ffa61b5 Reverse byte order (and interpret the data as a 64 bit word) for PVRTC blocks 2013-09-02 19:13:53 -04:00
Pavel Krajcevski
df81c73456 Default wrap mode to clamp 2013-09-02 19:12:43 -04:00
Pavel Krajcevski
5cde88d3b7 Add Image tests 2013-08-31 18:31:38 -04:00
Pavel Krajcevski
1d25e31d2a Bilinear upscale bug fixes. 2013-08-31 18:30:47 -04:00
Pavel Krajcevski
40b479487c Add accessors for image dimensions 2013-08-31 17:05:26 -04:00
Pavel Krajcevski
36641c2268 Don't set all of the memory to zero when we specify an image without any pixels 2013-08-31 16:43:32 -04:00
Pavel Krajcevski
992c72e4b5 Fix asserts 2013-08-31 16:40:49 -04:00
Pavel Krajcevski
fa37aba768 Add comparison operator for pixels 2013-08-31 16:37:58 -04:00
Pavel Krajcevski
8bf682f04e Add comment for RGBA packing 2013-08-31 16:37:40 -04:00
Pavel Krajcevski
b3a07e21f7 Add assignment operator 2013-08-31 16:37:07 -04:00
Pavel Krajcevski
26005bfd27 Disambiguate the Image.h from PVRTCEncoder and Core 2013-08-31 16:36:10 -04:00
Pavel Krajcevski
21199bc264 Add Pixel tests 2013-08-31 16:06:00 -04:00
Pavel Krajcevski
8c2127c08a When packing ARGB pixels make sure to convert them to 8-bit depth first 2013-08-31 16:05:50 -04:00
Pavel Krajcevski
1ffbdea2b8 Make sure to handle 0 bit depth a bit more gracefully 2013-08-31 16:05:28 -04:00
Pavel Krajcevski
9a0fbebac3 Fix bug when going from smaller to higher bit depth 2013-08-31 16:04:58 -04:00
Pavel Krajcevski
ad17404bf7 Begin counting the bits from the beginning of the byte stream. The way I was doing it before was silly... 2013-08-31 14:33:44 -04:00
Pavel Krajcevski
f280c2bb33 Fix some compiler warnings. 2013-08-31 13:30:12 -04:00
Pavel Krajcevski
53a8c8e3cd Fix bug where the defaulted value caused a crash (wtf?) 2013-08-30 19:08:53 -04:00
Pavel Krajcevski
012d9e3ce0 Add preliminary tests for PVRTC pixels 2013-08-30 19:08:20 -04:00
Pavel Krajcevski
ab0dbbfa6e Bugfix
The bug was that bitIdx was not being taken into account when we realized that there was enough pixel depth to stay within the current byte when reading pixel values.
2013-08-30 18:45:14 -04:00
Pavel Krajcevski
1cc8f57538 Add block tests 2013-08-30 18:44:50 -04:00
Pavel Krajcevski
90662a56cd First pass at PVRTC Decompressor 2013-08-29 18:35:15 -04:00
Pavel Krajcevski
c59deae728 Add accessors for the color channels and a method for packing the information into a 32 bit RGBA int 2013-08-29 18:34:53 -04:00
Pavel Krajcevski
f822c15868 Pixel depth defaults to 8 2013-08-29 18:34:25 -04:00
Pavel Krajcevski
73f4992081 If we want a color channel with zero depth then it should default to full intensity, but we will remember that there is zero depth there. 2013-08-29 18:33:56 -04:00
Pavel Krajcevski
b3d7cd7877 Constify a few things 2013-08-29 18:32:48 -04:00
Pavel Krajcevski
40743d612b Add a logical definition of an image for PVRTC 2013-08-29 18:31:42 -04:00
Pavel Krajcevski
d3daed8969 Add block definitions for PVRTC 2013-08-29 12:08:32 -04:00
Pavel Krajcevski
55a61b5d8d constify some method declarations 2013-08-29 11:57:46 -04:00
Pavel Krajcevski
c5fb5ba0b1 Reorder color channels to match PVRTC spec 2013-08-29 11:57:18 -04:00
Pavel Krajcevski
53e7879742 Add PVRTC Pixel class
This class accepts a pixels with up to 8-bit components. With the way PVRTC is laid out, there are many different bit modes that we could run into. This lets us change between any that we'd like to deal with.
2013-08-28 17:52:45 -04:00
Pavel Krajcevski
5c80b4f373 Initial files for PVRTC encoder. Starting with a decompressor. 2013-08-27 18:25:15 -04:00