Commit Graph

625 Commits

Author SHA1 Message Date
Pavel Krajcevski
2af172e5e5 Add power method iteration for square matrices 2014-02-20 15:47:14 -05:00
Pavel Krajcevski
7ed5c13405 Allow additional indexable types
Instead of using operator() to index into the second operand of the
VectorAddition function, use operator[]. This way we can add to pointers
and std::vector types as well.
2014-02-20 15:36:59 -05:00
Pavel Krajcevski
1b7691993d Add initial matrix tests 2014-02-20 15:34:12 -05:00
Pavel Krajcevski
62cce58c2f Fix some of the vector multiplication and divide routines.
In general, we want the scalar division of vectors and matrices to
have the matrix come first and the scalar come second. It doesn't make
sense to divide a scalar by a vector or to divide a matrix by a vector,
so these should now produce errors at compile time.

Also, make sure to add additional types that can be multiplied together
using the * operator. If we multiply two vectors together, that's a dot
product. The size restrictions should be enforced at compile time by the
template parameters for VectorBase<T, N>::Dot

In this way, we can support vector/matrix multiplication by retaining the
* operator as well.
2014-02-20 14:49:35 -05:00
Pavel Krajcevski
2d7ee21fb7 Let the compiler choose what precision we want to do the vector-scalar multiplication/division in. 2014-02-19 19:36:28 -05:00
Pavel Krajcevski
366a7cdfe4 Add some YCoCg tests 2014-02-19 19:35:29 -05:00
Pavel Krajcevski
9dc23db287 Add YCoCg pixel type 2014-02-18 13:25:29 -05:00
Pavel Krajcevski
4fc75f22dc Fix vector operators to avoid needing overloads 2014-02-17 13:02:43 -05:00
Pavel Krajcevski
0875ee0ddb Constify 2014-02-16 18:29:08 -05:00
Pavel Krajcevski
2213e1b7d6 Add tests for special vector cases 2014-02-16 18:28:37 -05:00
Pavel Krajcevski
45b739a44a Add some tests for VectorBase 2014-02-16 17:17:25 -05:00
Pavel Krajcevski
92f5893650 Add first vector tests 2014-02-16 13:20:43 -05:00
Pavel Krajcevski
9f0603aaa8 Add scaling tests to make sure that bit depths are preserved. 2014-02-16 12:33:05 -05:00
Pavel Krajcevski
543185fe2a Add normalization function to vectors 2014-02-16 12:30:37 -05:00
Pavel Krajcevski
e20d84b1ee Fix gross bug in VectorBase 2014-02-16 12:30:09 -05:00
Pavel Krajcevski
a530ae937e Fix a few bugs. 2014-02-04 12:55:47 -05:00
Pavel Krajcevski
d1f7501584 Merge branch 'master' of git.cs.unc.edu:pavel/FasTC 2014-01-30 14:13:35 -05:00
Pavel Krajcevski
f32a943a90 Some small bugs, fixed #2 2014-01-30 14:12:55 -05:00
Pavel Krajcevski
b61c696529 Some small bugs 2014-01-30 14:09:44 -05:00
Pavel Krajcevski
1a5b748b2c Check for C++11 types in base library 2014-01-30 13:55:55 -05:00
Pavel Krajcevski
37ffc102d0 Add shuffle operator to pixels. 2014-01-30 13:34:52 -05:00
Pavel Krajcevski
426d12e5c9 Fix formatting 2014-01-29 14:54:14 -05:00
Pavel Krajcevski
01b37778be Update readme to reflect command line tool changes 2014-01-29 14:53:16 -05:00
Pavel Krajcevski
e62400eb01 Merge from master 2014-01-29 14:51:00 -05:00
Pavel Krajcevski
bf7ef5cd9e Merge branch 'master' of git.cs.unc.edu:pavel/FasTC 2014-01-29 14:38:09 -05:00
Pavel Krajcevski
211bc5aece Add PVRTC support to KTX writer 2014-01-29 14:37:19 -05:00
Pavel Krajcevski
4601cf00c7 Small bugfix 2014-01-29 14:37:04 -05:00
Pavel Krajcevski
754cd3532a Don't crash if we can't parse the filename 2014-01-29 14:36:37 -05:00
Pavel Krajcevski
aa7e73c4b3 Add growable buffer to support dynamic ktx file sizes. 2014-01-29 14:04:08 -05:00
Pavel Krajcevski
95ec307380 Fix delete to delete [] 2014-01-29 14:03:34 -05:00
Pavel Krajcevski
1b5b8c3900 Add hooks to support filenames with .ktx extension 2014-01-24 14:00:14 -05:00
Pavel Krajcevski
552b8440b1 Add KTX writer. 2014-01-23 18:24:21 -05:00
Pavel Krajcevski
553dc44ca5 Allow access to the compressed data if the user promises not to change it. 2014-01-23 18:23:55 -05:00
Pavel Krajcevski
95e86cbf0d Add KTX loaders 2014-01-23 14:43:05 -05:00
Pavel Krajcevski
d0ff861551 Alphabetize 2014-01-23 14:42:54 -05:00
Pavel Krajcevski
64747eb828 Constify 2014-01-23 14:42:28 -05:00
Pavel Krajcevski
917c4dc9dd Add a scoped allocator in order to deal with errors cleaner 2014-01-23 14:38:02 -05:00
Pavel Krajcevski
955fe204ad Add OpenGL discovery to read/write KTX files 2014-01-23 14:33:37 -05:00
Pavel Krajcevski
f64c2d57a2 Merge branch 'master' into MinGW 2014-01-21 16:25:49 -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
f2c153feba Add a command line switch to not produce decompressed output 2013-12-09 11:45:57 -05:00
Pavel Krajcevski
3734d643a6 Fix some compiler warnings on MSVC 2013-12-02 12:52:44 -05:00
Pavel Krajcevski
6249a4a077 Merge branch 'master' of git.cs.unc.edu:pavel/FasTC 2013-11-19 15:14:14 -05:00
Pavel Krajcevski
5d93d4d7e9 Add option to flip image along Y-axis to accomodate different image formats. 2013-11-19 15:01:54 -05:00
Pavel Krajcevski
baced12633 Add tga filename detection. 2013-11-19 14:56:21 -05:00
Pavel Krajcevski
325b04847e Remove some compiler cruft with our TGA loader. 2013-11-19 14:56:10 -05:00
Pavel Krajcevski
e780560d1e Move default bit depth definitions to abstracted pixel buffer loading function. 2013-11-19 14:55:41 -05:00
Pavel Krajcevski
7359f9e758 Some compilers treat hex literals as unsigned, which causes problems 2013-11-19 14:54:59 -05:00