diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-21 22:40:17 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-22 00:05:28 +0200 |
| commit | 5c711929b4f1670ef756a7e54ea59d207c7253a6 (patch) | |
| tree | 75f07653c5958e9753180ead45bf77f785826a45 /src | |
| parent | 6e322c48a00cd0a115a654777b7bc873138a2866 (diff) | |
Rename lut -> double_lut.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gamma_transfer_function.cc | 2 | ||||
| -rw-r--r-- | src/gamma_transfer_function.h | 2 | ||||
| -rw-r--r-- | src/identity_transfer_function.cc | 2 | ||||
| -rw-r--r-- | src/identity_transfer_function.h | 2 | ||||
| -rw-r--r-- | src/modified_gamma_transfer_function.cc | 2 | ||||
| -rw-r--r-- | src/modified_gamma_transfer_function.h | 2 | ||||
| -rw-r--r-- | src/piecewise_lut.h | 4 | ||||
| -rw-r--r-- | src/rgb_xyz.cc | 10 | ||||
| -rw-r--r-- | src/s_gamut3_transfer_function.cc | 2 | ||||
| -rw-r--r-- | src/s_gamut3_transfer_function.h | 2 | ||||
| -rw-r--r-- | src/transfer_function.cc | 4 | ||||
| -rw-r--r-- | src/transfer_function.h | 4 |
12 files changed, 19 insertions, 19 deletions
diff --git a/src/gamma_transfer_function.cc b/src/gamma_transfer_function.cc index ff9073a1..83c9929f 100644 --- a/src/gamma_transfer_function.cc +++ b/src/gamma_transfer_function.cc @@ -56,7 +56,7 @@ GammaTransferFunction::GammaTransferFunction (double gamma) vector<double> -GammaTransferFunction::make_lut (double from, double to, int bit_depth, bool inverse) const +GammaTransferFunction::make_double_lut(double from, double to, int bit_depth, bool inverse) const { int const bit_length = int(std::pow(2.0f, bit_depth)); auto lut = vector<double>(bit_length); diff --git a/src/gamma_transfer_function.h b/src/gamma_transfer_function.h index e7294000..79804ad6 100644 --- a/src/gamma_transfer_function.h +++ b/src/gamma_transfer_function.h @@ -58,7 +58,7 @@ public: bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override; protected: - std::vector<double> make_lut (double from, double to, int bit_depth, bool inverse) const override; + std::vector<double> make_double_lut(double from, double to, int bit_depth, bool inverse) const override; private: double _gamma; diff --git a/src/identity_transfer_function.cc b/src/identity_transfer_function.cc index b6f03d07..a2260ee2 100644 --- a/src/identity_transfer_function.cc +++ b/src/identity_transfer_function.cc @@ -49,7 +49,7 @@ using namespace dcp; vector<double> -IdentityTransferFunction::make_lut (double from, double to, int bit_depth, bool) const +IdentityTransferFunction::make_double_lut(double from, double to, int bit_depth, bool) const { int const bit_length = int(std::pow(2.0f, bit_depth)); auto lut = vector<double>(bit_length); diff --git a/src/identity_transfer_function.h b/src/identity_transfer_function.h index f6e80abb..d111e057 100644 --- a/src/identity_transfer_function.h +++ b/src/identity_transfer_function.h @@ -49,7 +49,7 @@ public: bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override; protected: - std::vector<double> make_lut (double from, double to, int bit_depth, bool inverse) const override; + std::vector<double> make_double_lut(double from, double to, int bit_depth, bool inverse) const override; }; diff --git a/src/modified_gamma_transfer_function.cc b/src/modified_gamma_transfer_function.cc index 991e642e..a54a090a 100644 --- a/src/modified_gamma_transfer_function.cc +++ b/src/modified_gamma_transfer_function.cc @@ -59,7 +59,7 @@ ModifiedGammaTransferFunction::ModifiedGammaTransferFunction (double power, doub vector<double> -ModifiedGammaTransferFunction::make_lut (double from, double to, int bit_depth, bool inverse) const +ModifiedGammaTransferFunction::make_double_lut(double from, double to, int bit_depth, bool inverse) const { int const bit_length = int(std::pow(2.0f, bit_depth)); auto lut = vector<double>(bit_length); diff --git a/src/modified_gamma_transfer_function.h b/src/modified_gamma_transfer_function.h index 0427dd61..ae27be85 100644 --- a/src/modified_gamma_transfer_function.h +++ b/src/modified_gamma_transfer_function.h @@ -77,7 +77,7 @@ public: bool about_equal (std::shared_ptr<const TransferFunction>, double epsilon) const override; protected: - std::vector<double> make_lut (double from, double to, int bit_depth, bool inverse) const override; + std::vector<double> make_double_lut(double from, double to, int bit_depth, bool inverse) const override; private: double _power; diff --git a/src/piecewise_lut.h b/src/piecewise_lut.h index 772e0aed..f2f21a92 100644 --- a/src/piecewise_lut.h +++ b/src/piecewise_lut.h @@ -49,8 +49,8 @@ class PiecewiseLUT2 public: PiecewiseLUT2(std::shared_ptr<const TransferFunction> fn, double boundary, int low_bits, int high_bits, bool inverse) : _boundary(boundary) - , _low(fn->lut(0, boundary, low_bits, inverse)) - , _high(fn->lut(boundary, 1, high_bits, inverse)) + , _low(fn->double_lut(0, boundary, low_bits, inverse)) + , _high(fn->double_lut(boundary, 1, high_bits, inverse)) , _low_scale(static_cast<int>(std::pow(2.0f, low_bits)) - 1) , _high_scale(static_cast<int>(std::pow(2.0f, high_bits)) - 1) { diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc index e6c5105d..cd0c7f60 100644 --- a/src/rgb_xyz.cc +++ b/src/rgb_xyz.cc @@ -81,8 +81,8 @@ dcp::xyz_to_rgba ( int* xyz_y = xyz_image->data (1); int* xyz_z = xyz_image->data (2); - auto lut_in = conversion.out()->lut(0, 1, 12, false); - auto lut_out = conversion.in()->lut(0, 1, 16, true); + auto lut_in = conversion.out()->double_lut(0, 1, 12, false); + auto lut_out = conversion.in()->double_lut(0, 1, 16, true); boost::numeric::ublas::matrix<double> const matrix = conversion.xyz_to_rgb (); double fast_matrix[9] = { @@ -158,8 +158,8 @@ dcp::xyz_to_rgb ( int* xyz_y = xyz_image->data (1); int* xyz_z = xyz_image->data (2); - auto lut_in = conversion.out()->lut(0, 1, 12, false); - auto lut_out = conversion.in()->lut(0, 1, 16, true); + auto lut_in = conversion.out()->double_lut(0, 1, 12, false); + auto lut_out = conversion.in()->double_lut(0, 1, 16, true); auto const matrix = conversion.xyz_to_rgb (); double fast_matrix[9] = { @@ -287,7 +287,7 @@ rgb_to_xyz_internal( double x, y, z; } d; - auto lut_in = conversion.in()->lut(0, 1, 12, false); + auto lut_in = conversion.in()->double_lut(0, 1, 12, false); auto lut_out = make_inverse_gamma_lut(conversion.out()); /* This is is the product of the RGB to XYZ matrix, the Bradford transform and the DCI companding */ diff --git a/src/s_gamut3_transfer_function.cc b/src/s_gamut3_transfer_function.cc index 512a2951..831fcb53 100644 --- a/src/s_gamut3_transfer_function.cc +++ b/src/s_gamut3_transfer_function.cc @@ -49,7 +49,7 @@ using namespace dcp; vector<double> -SGamut3TransferFunction::make_lut (double from, double to, int bit_depth, bool inverse) const +SGamut3TransferFunction::make_double_lut(double from, double to, int bit_depth, bool inverse) const { int const bit_length = int(std::pow(2.0f, bit_depth)); auto lut = vector<double>(bit_length); diff --git a/src/s_gamut3_transfer_function.h b/src/s_gamut3_transfer_function.h index 50b4875a..6d69f296 100644 --- a/src/s_gamut3_transfer_function.h +++ b/src/s_gamut3_transfer_function.h @@ -49,7 +49,7 @@ public: bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const override; protected: - std::vector<double> make_lut (double from, double to, int bit_depth, bool inverse) const override; + std::vector<double> make_double_lut(double from, double to, int bit_depth, bool inverse) const override; }; diff --git a/src/transfer_function.cc b/src/transfer_function.cc index 7b17fd36..be507af1 100644 --- a/src/transfer_function.cc +++ b/src/transfer_function.cc @@ -50,7 +50,7 @@ using namespace dcp; vector<double> const& -TransferFunction::lut (double from, double to, int bit_depth, bool inverse) const +TransferFunction::double_lut(double from, double to, int bit_depth, bool inverse) const { boost::mutex::scoped_lock lm (_mutex); @@ -61,7 +61,7 @@ TransferFunction::lut (double from, double to, int bit_depth, bool inverse) cons return i->second; } - _luts[descriptor] = make_lut(from, to, bit_depth, inverse); + _luts[descriptor] = make_double_lut(from, to, bit_depth, inverse); return _luts[descriptor]; } diff --git a/src/transfer_function.h b/src/transfer_function.h index 9dc517e3..033c3045 100644 --- a/src/transfer_function.h +++ b/src/transfer_function.h @@ -61,12 +61,12 @@ public: virtual ~TransferFunction () {} /** @return A look-up table (of size 2^bit_depth) */ - std::vector<double> const& lut (double from, double to, int bit_depth, bool inverse) const; + std::vector<double> const& double_lut(double from, double to, int bit_depth, bool inverse) const; virtual bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const = 0; protected: - virtual std::vector<double> make_lut (double from, double to, int bit_depth, bool inverse) const = 0; + virtual std::vector<double> make_double_lut(double from, double to, int bit_depth, bool inverse) const = 0; private: struct LUTDescriptor { |
