openjpeg-cdist bump again.
[libdcp.git] / src / lut_cache.h
index 0985a0c0cb5a08c0f38f6796b8b7e6970446a1c2..9bffa7b065c13dbc46fffa66ef4debe8a1e51c5d 100644 (file)
 
 #include <list>
 #include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace dcp {
 
 template<class T>
-class LUTCache
+class LUTCache : public boost::noncopyable
 {
 public:
-       boost::shared_ptr<T> get (int bit_depth, float gamma)
+       boost::shared_ptr<T> get (int bit_depth, float gamma, bool linearised)
        {
                for (typename std::list<boost::shared_ptr<T> >::iterator i = _cache.begin(); i != _cache.end(); ++i) {
                        if ((*i)->bit_depth() == bit_depth && (*i)->gamma() == gamma) {
@@ -35,7 +38,7 @@ public:
                        }
                }
 
-               boost::shared_ptr<T> lut (new T (bit_depth, gamma));
+               boost::shared_ptr<T> lut (new T (bit_depth, gamma, linearised));
                _cache.push_back (lut);
                return lut;
        }
@@ -44,4 +47,6 @@ private:
        std::list<boost::shared_ptr<T> > _cache;
 };
 
+}
+
 #endif