Commit graph

16 commits

Author SHA1 Message Date
Pavel Krajcevski baab69dc99 Fix some MSVC compiler snafus 2013-09-28 22:21:31 -04:00
Pavel Krajcevski 340f4f3141 Add pixel packing routines 2013-09-24 19:29:03 -04:00
Pavel Krajcevski 1636232717 Make sure that when changing from higher to lower bit depth (i.e. perform a division) that we round to the nearest value 2013-09-24 17:45:19 -04:00
Pavel Krajcevski 7184d49ccd Add unpack RGBA for our pixels 2013-09-12 14:41:00 -04:00
Pavel Krajcevski f5e0aa4f9f Make sure to clear the MSBs of channels that have zero depth that get converted to higher depth values 2013-09-10 13:21:48 -04:00
Pavel Krajcevski fa37aba768 Add comparison operator for pixels 2013-08-31 16:37:58 -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 53a8c8e3cd Fix bug where the defaulted value caused a crash (wtf?) 2013-08-30 19:08:53 -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 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 55a61b5d8d constify some method declarations 2013-08-29 11:57:46 -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