summaryrefslogtreecommitdiff
path: root/src/transfer_function.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-03 21:33:30 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-03 21:33:30 +0000
commit9655ed4740f08899698052f232256fcf7b77c58e (patch)
tree195e8f30ec4c5dd5beeecfb371acf7a3ceaa7898 /src/transfer_function.h
parent986bb0acba0aa73fc2ac0190a32e8fa8c6e636b4 (diff)
Various fixes to XYZ/RGB transforms.
Diffstat (limited to 'src/transfer_function.h')
-rw-r--r--src/transfer_function.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/transfer_function.h b/src/transfer_function.h
index 31a794e2..16d00c1a 100644
--- a/src/transfer_function.h
+++ b/src/transfer_function.h
@@ -29,17 +29,22 @@ namespace dcp {
class TransferFunction : public boost::noncopyable
{
public:
+ TransferFunction (bool inverse);
+
virtual ~TransferFunction ();
- float const * lut (int bit_depth) const;
+ /** @return A look-up table (of size 2^bit_depth) whose values range from 0 to 1 */
+ double const * lut (int bit_depth) const;
- virtual bool about_equal (boost::shared_ptr<const TransferFunction> other, float epsilon) const = 0;
+ virtual bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const;
protected:
- virtual float * make_lut (int bit_depth) const = 0;
+ virtual double * make_lut (int bit_depth) const = 0;
+
+ bool _inverse;
private:
- mutable std::map<int, float*> _luts;
+ mutable std::map<int, double*> _luts;
};
}