Commit graph

13 commits

Author SHA1 Message Date
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 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 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 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 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
Renamed from BPTCEncoder/src/BC7Compressor.cpp (Browse further)