Commit Graph

581 Commits

Author SHA1 Message Date
Pavel Krajcevski
f47c880198 Make sure to use the proper delete 2014-04-22 19:28:49 -04:00
Pavel Krajcevski
c40829a3b7 Fix some compiler warnings 2014-04-15 14:18:12 -04:00
Pavel Krajcevski
03b9e7f413 Merge branch 'ModularizeBPTC', remote-tracking branch 'origin' 2014-04-10 13:50:58 -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
ea1c61913a Small patch to fix loading of non-multiple-of-four images 2014-04-02 13:59:08 -04:00
Pavel Krajcevski
640b098af7 Small formatting change 2014-04-02 13:57:17 -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
f951dda449 Fix bug caught by clang 2014-03-23 19:52:51 -04:00
Pavel Krajcevski
aba347778e Fix a few compiler warnings 2014-03-23 17:48:17 -04:00
Pavel Krajcevski
5725220ba6 Merge branch 'master' into ModularizeBPTC 2014-03-23 17:41:46 -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
fe69dc9fb5 Fix small bug with large consequences 2014-03-21 20:26:45 -04:00
Pavel Krajcevski
dcc12eb28a Intel compiler hates floats 2014-03-21 20:25:59 -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
2b17cf6f97 Add scalar-matrix multiplication 2014-03-21 01:17:19 -04:00
Pavel Krajcevski
63b8744917 Pull out multiplication routines so that they can be specialized if need be 2014-03-21 01:16:45 -04:00
Pavel Krajcevski
31c799a02a Add equality operators 2014-03-21 01:15:35 -04:00
Pavel Krajcevski
e06f60c536 Fix some compiler warnings. 2014-03-21 01:14:36 -04:00
Pavel Krajcevski
037cb0951b Built-in rand was causing severe perf issues. 2014-03-21 01:13:57 -04:00
Pavel Krajcevski
675ebc28a1 Add matrix equality operator 2014-03-20 18:33:24 -04:00
Pavel Krajcevski
125809d721 Add return type to function 2014-03-20 18:33:11 -04:00
Pavel Krajcevski
65b874693e Move stopwatch.h to Core/src/include 2014-03-20 18:32:54 -04:00
Pavel Krajcevski
840ae71cbc Add small tool that decompresses an image. 2014-03-18 19:37:42 -04:00
Pavel Krajcevski
ff210ed741 Fix serious bug in Image.cpp 2014-03-18 19:37:26 -04:00
Pavel Krajcevski
83588a0c97 Fix a bunch of bugs in the decoder 2014-03-18 19:37:03 -04:00
Pavel Krajcevski
914eeae284 PThreads are weird on OS X 2014-03-13 21:45:14 -04:00
Pavel Krajcevski
b1ef548a7c Fix test iteration constant 2014-03-13 21:45:03 -04:00
Pavel Krajcevski
44ebe5d0bb Hook ASTC decompressor into the rest of FasTC 2014-03-12 19:41:48 -04:00
Pavel Krajcevski
c6364cc2a7 Made utils functions static inline and removed block size from compression specification
I'm not completely sure what the best strategy is in this case. Ultimately, it's good
that the format itself carries the block dimensions. It makes a lot of the code somewhat
uglier though, but really the only thing that we're sullying is the succinct ability to
determine what large-scale format it's in (PVRTC vs ASTC instead of 2bpp PVRTC vs 4bpp).
2014-03-12 19:38:35 -04:00
Pavel Krajcevski
0afa26ac74 Add proper return value 2014-03-12 19:38:17 -04:00
Pavel Krajcevski
0cac0c5c0a Add .astc file loader 2014-03-12 19:26:39 -04:00