Various fixes to XYZ/RGB transforms.
[libdcp.git] / src / transfer_function.h
index 31a794e20f5af59877b5b9eb7855311fc2f37833..16d00c1abc62a7fa39ea857c9ce0bd7a8ceba741 100644 (file)
@@ -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;
 };
 
 }