diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-05-20 09:36:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-05-23 16:55:28 +0200 |
| commit | 8e017c66d86c09a4689afeac0d7989d24daef745 (patch) | |
| tree | c21a3c0533d9aaf82e1d13b4af117bbe554c0c77 /src/lib/dcp_video.cc | |
| parent | f7dc39fb8730ccf854d60b819a985050fee0d4b1 (diff) | |
Move convert_to_xyz out of DCPVideo.
Diffstat (limited to 'src/lib/dcp_video.cc')
| -rw-r--r-- | src/lib/dcp_video.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index 50d33e9d5..2cecee95b 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -30,6 +30,7 @@ */ +#include "colour_conversion.h" #include "compose.hpp" #include "config.h" #include "cross.h" @@ -100,26 +101,6 @@ DCPVideo::DCPVideo (shared_ptr<const PlayerVideo> frame, shared_ptr<const cxml:: _resolution = Resolution (node->optional_number_child<int>("Resolution").get_value_or(static_cast<int>(Resolution::TWO_K))); } -shared_ptr<dcp::OpenJPEGImage> -DCPVideo::convert_to_xyz (shared_ptr<const PlayerVideo> frame, dcp::NoteHandler note) -{ - shared_ptr<dcp::OpenJPEGImage> xyz; - - auto image = frame->image (bind(&PlayerVideo::keep_xyz_or_rgb, _1), VideoRange::FULL, false); - if (frame->colour_conversion()) { - xyz = dcp::rgb_to_xyz ( - image->data()[0], - image->size(), - image->stride()[0], - frame->colour_conversion().get(), - note - ); - } else { - xyz = make_shared<dcp::OpenJPEGImage>(image->data()[0], image->size(), image->stride()[0]); - } - - return xyz; -} /** J2K-encode this frame on the local host. * @return Encoded data. |
