summaryrefslogtreecommitdiff
path: root/src/rgb_xyz.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-09-04 00:48:10 +0200
committerCarl Hetherington <cth@carlh.net>2023-10-18 12:53:58 +0200
commit353ed18e817980eaa3afac6cf5d26b1f187f8803 (patch)
tree745724138ac1552256a5f55a0d029f978efe249e /src/rgb_xyz.h
parent621926b6bfc15b6bb0d87c03b00bf831b46e7b14 (diff)
Add rgb_to_xyz for packed int16_t.v1.8.87
Adapted from a patch from Aaron Boxer for grok support.
Diffstat (limited to 'src/rgb_xyz.h')
-rw-r--r--src/rgb_xyz.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rgb_xyz.h b/src/rgb_xyz.h
index d6fb4d35..22e1396d 100644
--- a/src/rgb_xyz.h
+++ b/src/rgb_xyz.h
@@ -94,6 +94,22 @@ extern void xyz_to_rgb (
extern PiecewiseLUT2 make_inverse_gamma_lut(std::shared_ptr<const TransferFunction> fn);
+/** @param rgb RGB data; packed RGB 16:16:16, 48bpp, 16R, 16G, 16B,
+ * with the 2-byte value for each R/G/B component stored as
+ * little-endian; i.e. AV_PIX_FMT_RGB48LE.
+ * @param dst Buffer to fill with packed 16-bit XYZ data, i.e. first
+ * 16-bit word is X, second is Y etc.
+ * @param size size of RGB image in pixels.
+ * @param size stride of RGB data in pixels.
+ */
+extern void rgb_to_xyz (
+ uint8_t const * rgb,
+ uint16_t* dst,
+ dcp::Size size,
+ int stride,
+ ColourConversion const & conversion,
+ boost::optional<NoteHandler> note = boost::optional<NoteHandler>()
+ );
/** @param rgb RGB data; packed RGB 16:16:16, 48bpp, 16R, 16G, 16B,
* with the 2-byte value for each R/G/B component stored as