Forward-port raw_convert precision parameter from v0.
[libdcp.git] / src / stereo_picture_frame.cc
index 893a9f72fd2cc7d6e1f58dbb3fcea87f151d712f..0b56b21632c5b444131042aa80d26f7ef68bac98 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
-#include <openjpeg.h>
-#include "AS_DCP.h"
-#include "KM_fileio.h"
 #include "stereo_picture_frame.h"
 #include "exceptions.h"
 #include "argb_frame.h"
-#include "lut.h"
 #include "util.h"
 #include "gamma_lut.h"
 #include "rgb_xyz.h"
+#include "AS_DCP.h"
+#include "KM_fileio.h"
+#include <openjpeg.h>
 
 #define DCI_GAMMA 2.6
 
@@ -63,6 +62,8 @@ StereoPictureFrame::~StereoPictureFrame ()
  *  @param reduce a factor by which to reduce the resolution
  *  of the image, expressed as a power of two (pass 0 for no
  *  reduction).
+ *  @param srgb_gamma Reciprocal of gamma to use when doing the
+ *  output gamma correction (after conversion from XYZ to RGB).
  *
  *  @return An ARGB representation of one of the eyes (left or right)
  *  of this frame.  This is ARGB in the Cairo sense, so that each
@@ -83,7 +84,7 @@ StereoPictureFrame::argb_frame (Eye eye, int reduce, float srgb_gamma) const
                break;
        }
        
-       return xyz_to_rgb (xyz_frame, GammaLUT::cache.get (12, DCI_GAMMA), GammaLUT::cache.get (12, 1 / srgb_gamma));
+       return xyz_to_rgb (xyz_frame, GammaLUT::cache.get (12, DCI_GAMMA, false), GammaLUT::cache.get (12, 1 / srgb_gamma, false));
 }
 
 uint8_t const *