Commit graph

476 commits

Author SHA1 Message Date
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 87d82ea443 Merge branch 'master' into PVRTCDecoder to use GTest
Conflicts:
	CMakeLists.txt
2013-08-30 16:18:56 -04:00
Pavel Krajcevski bdbed413b5 Tell CMake to look in individual test directories for tests if they exist 2013-08-30 12:54:07 -04:00
Pavel Krajcevski 2d470a387a Add GTest framework 2013-08-30 12:53:44 -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
Pavel Krajcevski 0db3f830a6 Fix error from merge where we renamed the project to FasTC 2013-08-27 14:43:55 -04:00
Pavel Krajcevski 9fe7a08422 Fix a bunch of errors incurred from refactoring. 2013-08-27 14:39:31 -04:00
Pavel Krajcevski 03a7934644 Get rid of evil tabs once and forever (from cpp/h files) 2013-08-26 16:54:08 -04:00
Pavel Krajcevski af2318027b More refactoring 2013-08-26 16:11:53 -04:00
Pavel Krajcevski 0304bd4187 Refactor a bunch of things to renforce a bunch of style rules. 2013-08-26 16:11:39 -04:00
Pavel Krajcevski 9282541160 Comments and bug fixes.
Added comments to the imagefile header. There were method declarations in the file that did not actually correspond to methods either. These were removed.
2013-08-22 18:35:01 -04:00
Pavel Krajcevski 25eba39870 Change the name of everything to FasTC 2013-08-22 18:35:01 -04:00
Pavel Krajcevski fc1baea05f Add a lot of comments and code cleanup 2013-08-22 18:33:42 -04:00
Pavel Krajcevski f1f1294b2e Add tab formatting. 2013-08-22 18:33:42 -04:00
Pavel Krajcevski 921c3e9f16 Add comments to BC7CompressionMode.h 2013-08-22 18:33:41 -04:00
Pavel Krajcevski a19f83d123 Switch the PVR loader to use the library provided with the imagination SDK 2013-08-22 18:08:52 -04:00
Pavel Krajcevski e6bd4b5317 Only use the PVR loader if the library for loading has been found. 2013-08-22 18:08:29 -04:00
Pavel Krajcevski 07e9c2c531 Add CMake modules folder and file to look for PVRTexLib 2013-08-22 18:06:39 -04:00
Pavel Krajcevski edf7a948c4 Recognize pvr images when loading data. 2013-08-20 15:28:02 -04:00
Pavel Krajcevski 081866907f More formatting fixes. 2013-08-20 15:27:36 -04:00
Pavel Krajcevski 9d4f412f65 Skeleton for reading .pvr files 2013-08-20 15:12:57 -04:00
Pavel Krajcevski 31d2b5bcea Formatting fixes 2013-08-20 15:12:18 -04:00
Pavel Krajcevski b072d10b6c Multiple single pixel error by number of pixels in the partition 2013-04-08 17:03:14 -04:00
Pavel Krajcevski d23125e14c Another bug fix.
In the previous commit, we simply accomodated for alpha errors when compressing single color partitions. In fact, the issue was a bit more greivous: we weren't computing the proper error term at all! This fixed that function so that we emphasize the error metrics induced by *squaring* the error in each channel and then returning that as a measurement of the acceptability of using a single color compression for that partition.
2013-04-08 16:44:15 -04:00
Pavel Krajcevski ff18e8f33e Bug fix
When the compressor recognized that a shape was a single color, it determines
an optimal encoding for that color. However, only the error in the single
pixel was returned as the error for the overall shape. This caused problems
with modes that do not support alpha and shapes that do have alpha.
2013-03-30 11:16:32 -04:00
Pavel Krajcevski d80078f1dd Fix formatting issues on Readme.md 2013-03-27 21:39:38 -03:00
Pavel Krajcevski 2362413bad Add readme 2013-03-27 20:37:24 -04:00