summaryrefslogtreecommitdiff
path: root/src/rgb_xyz.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-24 22:56:33 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-24 22:56:33 +0100
commite1e7de8d73bedd0c741e7df0390068c67867e09f (patch)
tree02f007aad80f4d99707f2507a81b0685865026d0 /src/rgb_xyz.cc
parentceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (diff)
Tidying.
Diffstat (limited to 'src/rgb_xyz.cc')
-rw-r--r--src/rgb_xyz.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index a5fd2a24..a8766b8e 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -32,6 +32,11 @@
*/
+/** @file rgb_xyz.cc
+ * @brief Conversion between RGB and XYZ
+ */
+
+
#include "colour_conversion.h"
#include "compose.hpp"
#include "dcp_assert.h"
@@ -154,7 +159,7 @@ dcp::xyz_to_rgb (
double const * lut_in = conversion.out()->lut (12, false);
double const * lut_out = conversion.in()->lut (16, true);
- boost::numeric::ublas::matrix<double> const matrix = conversion.xyz_to_rgb ();
+ auto const matrix = conversion.xyz_to_rgb ();
double fast_matrix[9] = {
matrix (0, 0), matrix (0, 1), matrix (0, 2),
@@ -166,7 +171,7 @@ dcp::xyz_to_rgb (
int const width = xyz_image->size().width;
for (int y = 0; y < height; ++y) {
- uint16_t* rgb_line = reinterpret_cast<uint16_t*> (rgb + y * stride);
+ auto rgb_line = reinterpret_cast<uint16_t*> (rgb + y * stride);
for (int x = 0; x < width; ++x) {
int cx = *xyz_x++;
@@ -228,8 +233,8 @@ dcp::xyz_to_rgb (
void
dcp::combined_rgb_to_xyz (ColourConversion const & conversion, double* matrix)
{
- boost::numeric::ublas::matrix<double> const rgb_to_xyz = conversion.rgb_to_xyz ();
- boost::numeric::ublas::matrix<double> const bradford = conversion.bradford ();
+ auto const rgb_to_xyz = conversion.rgb_to_xyz ();
+ auto const bradford = conversion.bradford ();
matrix[0] = (bradford (0, 0) * rgb_to_xyz (0, 0) + bradford (0, 1) * rgb_to_xyz (1, 0) + bradford (0, 2) * rgb_to_xyz (2, 0))
* DCI_COEFFICIENT * 65535;