summaryrefslogtreecommitdiff
path: root/src/lib/dcp_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-07-06 23:09:08 +0200
committerCarl Hetherington <cth@carlh.net>2023-07-07 13:58:35 +0200
commit7158e24762c77465b2827bfa8c96d2fe2368be37 (patch)
tree8098b96e1f0632b7f9c540ba2c2dd4cd40437f1b /src/lib/dcp_video.cc
parentd5e87cdc4003ed1e7c31cd4991a1c31ad7d4e3a2 (diff)
Patch from Aaron.
Diffstat (limited to 'src/lib/dcp_video.cc')
-rw-r--r--src/lib/dcp_video.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc
index 8eb76fdd6..78e973ca3 100644
--- a/src/lib/dcp_video.cc
+++ b/src/lib/dcp_video.cc
@@ -118,6 +118,27 @@ DCPVideo::convert_to_xyz (shared_ptr<const PlayerVideo> frame, dcp::NoteHandler
return xyz;
}
+dcp::Size
+DCPVideo::get_size(void) {
+ auto image = _frame->image (bind(&PlayerVideo::keep_xyz_or_rgb, _1), VideoRange::FULL, false);
+ return image->size();
+}
+
+void
+DCPVideo::convert_to_xyz (uint16_t *dst) {
+
+ auto image = _frame->image (bind(&PlayerVideo::keep_xyz_or_rgb, _1), VideoRange::FULL, false);
+ if (_frame->colour_conversion()) {
+ dcp::rgb_to_xyz (
+ image->data()[0],
+ dst,
+ image->size(),
+ image->stride()[0],
+ _frame->colour_conversion().get()
+ );
+ }
+}
+
/** J2K-encode this frame on the local host.
* @return Encoded data.
*/