summaryrefslogtreecommitdiff
path: root/src/rgb_xyz.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-06-23 11:57:50 +0100
committerCarl Hetherington <cth@carlh.net>2017-06-23 11:57:50 +0100
commit3a5b068428bcc2080908a01204411038225d3851 (patch)
tree5ed2f1f753d1ffdd48765842d7f31a669166b016 /src/rgb_xyz.cc
parent863d9cc51b406500dba596b6f1de733ec3f410c5 (diff)
Make xyz_to_xyz into a constructor of OpenJPEGImage where it makes more sense.
Diffstat (limited to 'src/rgb_xyz.cc')
-rw-r--r--src/rgb_xyz.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index b4307756..d0774e7c 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -348,28 +348,3 @@ dcp::rgb_to_xyz (
return xyz;
}
-
-
-/** @param xyz_16 XYZ image data in packed 16:16:16, 48bpp, 16X, 16Y,
- * 16Z, with the 2-byte value for each X/Y/Z component stored as
- * little-endian.
- */
-shared_ptr<dcp::OpenJPEGImage>
-dcp::xyz_to_xyz (uint8_t const * xyz_16, dcp::Size size, int stride)
-{
- shared_ptr<OpenJPEGImage> xyz_12 (new OpenJPEGImage (size));
-
- int jn = 0;
- for (int y = 0; y < size.height; ++y) {
- uint16_t const * p = reinterpret_cast<uint16_t const *> (xyz_16 + y * stride);
- for (int x = 0; x < size.width; ++x) {
- /* Truncate 16-bit to 12-bit */
- xyz_12->data(0)[jn] = *p++ >> 4;
- xyz_12->data(1)[jn] = *p++ >> 4;
- xyz_12->data(2)[jn] = *p++ >> 4;
- ++jn;
- }
- }
-
- return xyz_12;
-}