summaryrefslogtreecommitdiff
path: root/src/stereo_picture_frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stereo_picture_frame.cc')
-rw-r--r--src/stereo_picture_frame.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc
index 293573bd..9d9bef7d 100644
--- a/src/stereo_picture_frame.cc
+++ b/src/stereo_picture_frame.cc
@@ -87,6 +87,22 @@ StereoPictureFrame::argb_frame (Eye eye, int reduce, float srgb_gamma) const
return xyz_to_rgba (xyz_frame, GammaLUT::cache.get (12, DCI_GAMMA, false), GammaLUT::cache.get (12, 1 / srgb_gamma, false));
}
+void
+StereoPictureFrame::rgb_frame (Eye eye, uint8_t* buffer) const
+{
+ shared_ptr<XYZFrame> xyz_frame;
+ switch (eye) {
+ case LEFT:
+ xyz_frame = decompress_j2k (const_cast<uint8_t*> (_buffer->Left.RoData()), _buffer->Left.Size(), 0);
+ break;
+ case RIGHT:
+ xyz_frame = decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), 0);
+ break;
+ }
+
+ return xyz_to_rgb (xyz_frame, GammaLUT::cache.get (12, DCI_GAMMA, false), GammaLUT::cache.get (12, 1 / 2.4, false), buffer);
+}
+
uint8_t const *
StereoPictureFrame::left_j2k_data () const
{