Commit graph

122 commits

Author SHA1 Message Date
Pavel Krajcevski
a263907e0f Fix some small bugs and compiler warnings 2015-02-11 21:26:31 -08:00
Pavel Krajcevski
8142047b55 Add missing files 2014-12-01 11:24:27 -05:00
Pavel Krajcevski
ae878d4aed Split BPTC decompression into two stages.
In one stage, decompose the block into logical bit values. Then,
if we want to decomrpss into an output image, do the proper interpolation.
Otherwise, return the logical block as-is to do things like figure out proper
mode crap and other stats.
2014-11-19 19:09:53 -05:00
Pavel Krajcevski
fb7805d875 Bring CMake integration up to date.
- Add a way to generate a FasTCConfig.cmake file so that you can
use cmake without having to install it.
- Add install paths for users that want to install it.
- Hide all public headers in FasTC/ qualified include path, this way we
know what files are public directly from the source. Also, it lets us
define build-tree and install-tree include directories a lot easier.
2014-11-18 17:07:26 -05:00
Pavel Krajcevski
995eacd5b6 Fix small crash bug 2014-08-26 13:44:09 -04:00
Pavel Krajcevski
c8e19252e3 Fix another bug that I thought I fixed... I should really make integration tests 2014-04-22 19:52:59 -04:00
Pavel Krajcevski
c40829a3b7 Fix some compiler warnings 2014-04-15 14:18:12 -04:00
Pavel Krajcevski
8660b24ffe Fix multithreaded npot bug.
There was a bug where certain blocks were not being written due to
improper iterating over non power-of-two textures depending on the
thread that got split across a newline of blocks. This should now
be fixed.

The offending command line arguments looked something like:

CLTool/tc -q 0 -t 32 -j 32 /path/to/npot-texture.png
2014-04-10 13:39:04 -04:00
Pavel Krajcevski
127c825337 Actually clamp the initial value 2014-04-09 13:55:27 -04:00
Pavel Krajcevski
ed2bcc3838 Fix some small bugs to hook into NVTT 2014-03-28 11:40:52 -04:00
Pavel Krajcevski
fabf6830ee Fix bug so that we at least generate *some* endpoints 2014-03-28 11:40:38 -04:00
Pavel Krajcevski
2141d71dd0 More perf fixes 2014-03-26 18:11:12 -04:00
Pavel Krajcevski
1bfda210c0 Merge from origin 2014-03-25 18:28:05 -04:00
Pavel Krajcevski
7fa561f67f Formatting. 2014-03-25 18:27:26 -04:00
Pavel Krajcevski
6505944f57 Cache the pixel computation for the cluster upon creation 2014-03-25 16:24:30 -04:00
Pavel Krajcevski
4128bcf073 Template the number of buckets during error calc so the compiler can unroll... 2014-03-25 16:24:08 -04:00
Pavel Krajcevski
6012b53cdb Formatting 2014-03-25 16:23:04 -04:00
Pavel Krajcevski
7af6cca4d5 Get rid of float conversion lookup table 2014-03-25 16:21:17 -04:00
Pavel Krajcevski
663caada50 Generalize BPTC compression.
1. Split compression parameter generation and compression parameter
packing. This gives a good performance boost, since we don't pack every
single time we compress. The error is computed each time, and only the
best parameters are packed.

2. Allow the shape selection function to specify up to ten shapes to
try for compression. We were already doing this kind of hackily where
we allowed both a three and two partition shape. This makes it a little
cleaner and exposes it to the user.
2014-03-25 11:40:06 -04:00
Pavel Krajcevski
aba347778e Fix a few compiler warnings 2014-03-23 17:48:17 -04:00
Pavel Krajcevski
d03732fc09 Move BPTC shapes header to include folder 2014-03-22 21:17:46 -04:00
Pavel Krajcevski
671454f57d Some small formatting changes 2014-03-22 20:40:28 -04:00
Pavel Krajcevski
5bd306d09b Actually use the simulated annealing setting. 2014-03-22 20:07:17 -04:00
Pavel Krajcevski
220a736a36 Move the other BPTC settings into the settings struct 2014-03-22 19:52:58 -04:00
Pavel Krajcevski
9144db4de6 Actually pass block coordinates to shape selection function 2014-03-22 19:25:21 -04:00
Pavel Krajcevski
891e2cfee8 Formatting 2014-03-22 19:24:51 -04:00
Pavel Krajcevski
9f259744de Get rid of comment 2014-03-21 20:36:54 -04:00
Pavel Krajcevski
e936cce0cb More refactoring.
Change RGBACluster to be a class that only really persists once per block.
When we switch shapes and do operations on them, then we really only need
to change which points in the block are accessed. We don't need to do this
very often, so just change the mask whenever we need it. This brings us back
closer to our original performance, but we're still not where we were when
we started refactoring.
2014-03-21 20:27:00 -04:00
Pavel Krajcevski
cf937f2ad3 Refactor shape and mode selection
We suffered another performance hit. This time it comes from the fact
that we're copying around a lot of data based on what partition we're
choosing. We can get rid of this a tad by only copying the data that we
need once and then using getters/setters that selectively pull from
an array based on our shape index.
2014-03-21 18:02:02 -04:00
Pavel Krajcevski
26e816b3db Add settings for BPTC compression 2014-03-21 12:45:47 -04:00
Pavel Krajcevski
6954d7b154 Refactor RGBAEndpoints
Changed the RGBAEndpoints to use the vector/matrix classes in
FasTCBase. This caused a ~20ms performance hit on an 8-core machine
which is likely due to the compiler having difficulty compiling away
some procedure call overheads. Upon profiling, the biggest bottleneck
is still by far the QuantizedError function, so any and all further
optimization should be focused on that.
2014-03-21 01:21:07 -04:00
Pavel Krajcevski
e06f60c536 Fix some compiler warnings. 2014-03-21 01:14:36 -04:00
Pavel Krajcevski
c6948e8421 Merge branch 'master' into ModularizeBPTC 2014-02-27 14:20:50 -05:00
Pavel Krajcevski
1a5b748b2c Check for C++11 types in base library 2014-01-30 13:55:55 -05:00
Pavel Krajcevski
c37dca1068 Split calculation of compression parameters from packing them. 2014-01-21 16:23:18 -05:00
Pavel Krajcevski
ea953979fe Move bitstream to FasTC base lib 2014-01-21 15:04:39 -05:00
Pavel Krajcevski
f12ee09f7e Some formatting and rearrange the BPTC code to be more structured like the others 2014-01-21 14:46:25 -05:00
Pavel Krajcevski
3734d643a6 Fix some compiler warnings on MSVC 2013-12-02 12:52:44 -05:00
Pavel Krajcevski
7359f9e758 Some compilers treat hex literals as unsigned, which causes problems 2013-11-19 14:54:59 -05:00
Pavel Krajcevski
6794a0fffb Add hooks to NVTT bc7_export library if present on the users machine. Assumes that all of the cross platform problems are fixed for incorporation into FasTC... Otherwise the options to use NVTT are ignored. 2013-11-19 12:03:03 -05:00
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
8e76d149ba Remove a bunch of code that assumes that we get our pixel data in block stream order... 2013-11-06 18:23:19 -05:00
Pavel Krajcevski
289bcc9d44 Make the block index for the stat function the pointer reinterpreted as an integer. This way we know exactly what block it is because we simply need to sort the stats in the output log. 2013-09-28 22:39:27 -04:00
Pavel Krajcevski
baab69dc99 Fix some MSVC compiler snafus 2013-09-28 22:21:31 -04:00
Pavel Krajcevski
f1924bd221 Try to send a single string that encompasses a stat to the stream so that when we do synchronization it will crunch the entire string at once. 2013-09-28 21:43:25 -04:00
Pavel Krajcevski
dcf389d346 Merge PVRTC compressor into split library. 2013-09-27 17:30:16 -04:00
Pavel Krajcevski
e0ec005ac8 Fix link problems 2013-09-18 14:00:53 -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
28cf254fe5 Initial decoupling of base library from core library. Includes a few formatting changes as well. 2013-09-13 19:36:37 -04:00