diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-04-22 13:58:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-04-22 13:58:16 +0100 |
| commit | 86bfdeb77f55b379302a65b22f57fc0583ec6b3c (patch) | |
| tree | 66ed8eb0e4855c520b1b1a0d9dae052a0ad5bfe6 /src/transfer_function.h | |
| parent | 3c88524c9a2418d6d2d8b8eac29737c95b9a7411 (diff) | |
Express colour conversions as chromaticities and adjust so that
everything is specified as something_to_xyz and then you can get
an inverse LUT if you want one.
Diffstat (limited to 'src/transfer_function.h')
| -rw-r--r-- | src/transfer_function.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/transfer_function.h b/src/transfer_function.h index 4105f3d4..7f7187b5 100644 --- a/src/transfer_function.h +++ b/src/transfer_function.h @@ -30,22 +30,18 @@ namespace dcp { class TransferFunction : public boost::noncopyable { public: - TransferFunction (bool inverse); - virtual ~TransferFunction (); /** @return A look-up table (of size 2^bit_depth) whose values range from 0 to 1 */ - double const * lut (int bit_depth) const; + double const * lut (int bit_depth, bool inverse) const; - virtual bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const; + virtual bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const = 0; protected: - virtual double * make_lut (int bit_depth) const = 0; - - bool _inverse; + virtual double * make_lut (int bit_depth, bool inverse) const = 0; private: - mutable std::map<int, double*> _luts; + mutable std::map<std::pair<int, bool>, double*> _luts; /** mutex to protect _luts */ mutable boost::mutex _mutex; }; |
