Commit Graph

250 Commits

Author SHA1 Message Date
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
Pavel Krajcevski
f825b28051 Single color partition with alpha bugfix.
When we detect that a partition has a single color in each subset, we can generate almost an exact representation of this value for most compression modes. However, when we were doing this subset matching, we were ignoring the error introduced by modes that had completely opaque representations against data that had transparent pixels. This bug fix essentially includes this error in our "best fit" calculations and makes everything work out for the better.
2013-03-19 11:58:21 -04:00
Pavel Krajcevski
6f6ca2d867 Another bug fix.
With the old code, it was possible that we skipped a compression with unlucky
preemption of our threads. I'm not exactly sure why, but that caused deadlock
(livelock?) in some very unfortunate circumstances. This new algorithm should
work regardless of how many threads execute at once and should also prevent
textures in the compression job list from being skipped. This algorithm seems
to be an improvement on low-core count machines (around 4 cores), but it is
slower on high-core count machines (40 cores or more)...
2013-03-11 16:20:52 -04:00
Pavel Krajcevski
9c48aaa7f2 Remove unused ResetTestAndSet function 2013-03-11 15:10:15 -04:00
Pavel Krajcevski
da44e58160 Actual bug fix 2013-03-11 15:08:44 -04:00
Pavel Krajcevski
cd17ddaa0b Add check for Clang. 2013-03-11 14:51:32 -04:00
Pavel Krajcevski
fa56d37080 Fix a few bugs in our atomic compression algorithm 2013-03-11 14:41:25 -04:00
Pavel Krajcevski
7c3b3d8144 Fix a few bugs in our CompressionJobList's 2013-03-11 14:41:08 -04:00
Pavel Krajcevski
ae2324153d Repurpose the rest of our scaffolding to use Compression Jobs 2013-03-09 13:36:39 -05:00
Pavel Krajcevski
435f935de3 Update atomics compression algorithm
In general, we want to use this algorithm only with self-contained compression
lists. As such, we've added all of the proper synchronization primitives in
the list object itself. That way, different threads that are working on the
same list will be able to communicate. Ideally, this should eliminate the
number of user-space context switches that happen. Whether or not this is
faster than the other synchronization algorithms that we've tried remains
to be seen...
2013-03-09 13:34:10 -05:00
Pavel Krajcevski
abd3961a09 Add a new interface to compressing files which we will call a 'compression job' 2013-03-09 13:22:42 -05:00
Pavel Krajcevski
8054740900 Don't freak out if the file already exists... overwrite it. 2013-03-07 02:43:33 -05:00
Pavel Krajcevski
1aa62003b9 Apparently rand() returns zero too. Avoid that. 2013-03-07 02:43:08 -05:00
Pavel Krajcevski
42e75a5e4c Fix debug image comparison to make sure that the difference in our images takes into account alpha. 2013-03-07 02:35:40 -05:00
Pavel Krajcevski
b1ccdb1359 Added header files for libpng 1.5.13 in order to properly match the compiled libraries. 2013-03-07 02:34:09 -05:00
Pavel Krajcevski
e150d4ee18 Add -a flag to unix command line tool as well 2013-03-07 02:31:21 -05:00
Pavel Krajcevski
9a5e0d197d Fixed a lot of untested bugs with our windows filestream 2013-03-07 02:31:01 -05:00
Pavel Krajcevski
da0d2be695 Small cosmetic and newline change 2013-03-06 21:02:33 -05:00
Pavel Krajcevski
dbabd5e399 Add command line option to choose atomics path for compression. 2013-03-06 20:58:01 -05:00
Pavel Krajcevski
3d1d1e359f Actually, it turns out the min/max thing was an MSVC issue. 2013-03-06 20:57:05 -05:00
Pavel Krajcevski
da010a465f Formatting fixes 2013-03-06 20:52:15 -05:00
Pavel Krajcevski
2a41e873fa Add function for compressing a texture using atomics... 2013-03-06 20:44:25 -05:00
Pavel Krajcevski
599ded49d1 Remove global scope min/max 2013-03-06 20:38:00 -05:00
Pavel Krajcevski
bacf327246 Fix MSVC compiler errors with the atomics 2013-03-06 19:57:20 -05:00
Pavel Krajcevski
342614a6ec Fix the horribly wrong check for atomic support with MSVC 2013-03-06 19:56:38 -05:00
Pavel Krajcevski
2127c04987 Add flag to compression settings to use atomics. 2013-03-06 19:01:31 -05:00
Pavel Krajcevski
c475ee1dec Use standard library min/max 2013-03-06 19:01:19 -05:00