]> git.sesse.net Git - movit/blobdiff - flat_input.h
FlatInput can only auto-expand from linear or sRGB, not e.g. Rec. 601/709 gamma.
[movit] / flat_input.h
index 3bcdc76d61a46a4555e7f8ab1b822ff101dc6efa..2e14488ea7d983da1cad04ea6a31fb99d4b06fb3 100644 (file)
@@ -17,7 +17,10 @@ public:
        void finalize();
 
        // TODO: Check that we actually have the required extension.
-       virtual bool can_output_linear_gamma() const { return true; }
+       virtual bool can_output_linear_gamma() const {
+               return (image_format.gamma_curve == GAMMA_LINEAR ||
+                       image_format.gamma_curve == GAMMA_sRGB);
+       }
 
        std::string output_fragment_shader();