summaryrefslogtreecommitdiff
path: root/src/lib/dcp_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-10-18 13:47:29 +0200
committerCarl Hetherington <cth@carlh.net>2023-10-18 13:47:29 +0200
commit1baae6f052775956bab33a8d9ae9f94066227225 (patch)
tree9c634a1b2914d4bf889e171b73c770469415f799 /src/lib/dcp_video.cc
parent6eba9bffa2371aa71b8981b1a7bcde0448d7623e (diff)
parentb0c1482f98c7e00634c1bc3dd801e76ce69907e2 (diff)
Merge branch 'grok2' into v2.17.xv2.17.8
This is the DoM support for Aaron Boxer's "grok" GPU J2K encoder, with some cleanups and other assorted/related DoM changes.
Diffstat (limited to 'src/lib/dcp_video.cc')
-rw-r--r--src/lib/dcp_video.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc
index 8eb76fdd6..940ca31d2 100644
--- a/src/lib/dcp_video.cc
+++ b/src/lib/dcp_video.cc
@@ -118,6 +118,30 @@ DCPVideo::convert_to_xyz (shared_ptr<const PlayerVideo> frame, dcp::NoteHandler
return xyz;
}
+dcp::Size
+DCPVideo::get_size() const
+{
+ 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) const
+{
+ 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.
*/