summaryrefslogtreecommitdiff
path: root/src/mono_picture_frame.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-27 20:02:16 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-28 00:46:04 +0000
commit75788462338b1b4f464d075465da3cb372c40004 (patch)
tree24046b4554f71ae399bbd310f5df2db2c4e69f47 /src/mono_picture_frame.cc
parent8520636e803e9eb17c9f73272f340d0e1c17ad67 (diff)
Change colourspace handling round a bit:1.0-colour-cleanup
- move the essence of GammaLUT into TransferFunction and handle different bit depths more neatly - add ColourConversion to describe input gamma correction, colour transformation and then output gamma correction in one class. - add default ColourConversions for sRGB->XYZ, Rec709->XYZ and XYZ->RGB.
Diffstat (limited to 'src/mono_picture_frame.cc')
-rw-r--r--src/mono_picture_frame.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc
index f3063c0c..31499c64 100644
--- a/src/mono_picture_frame.cc
+++ b/src/mono_picture_frame.cc
@@ -24,9 +24,9 @@
#include "mono_picture_frame.h"
#include "exceptions.h"
#include "argb_frame.h"
-#include "gamma_lut.h"
#include "util.h"
#include "rgb_xyz.h"
+#include "colour_conversion.h"
#include "KM_fileio.h"
#include "AS_DCP.h"
#include <openjpeg.h>
@@ -123,7 +123,7 @@ MonoPictureFrame::argb_frame (int reduce, float srgb_gamma) const
{
return xyz_to_rgba (
decompress_j2k (const_cast<uint8_t*> (_buffer->RoData()), _buffer->Size(), reduce),
- GammaLUT::cache.get (12, DCI_GAMMA, false), GammaLUT::cache.get (12, 1 / srgb_gamma, false)
+ ColourConversion::xyz_to_rgb
);
}
@@ -132,7 +132,7 @@ MonoPictureFrame::rgb_frame (uint8_t* buffer) const
{
xyz_to_rgb (
decompress_j2k (const_cast<uint8_t*> (_buffer->RoData()), _buffer->Size(), 0),
- GammaLUT::cache.get (12, DCI_GAMMA, false), GammaLUT::cache.get (12, 1 / 2.4, false),
+ ColourConversion::xyz_to_rgb,
buffer
);
}