44 using std::dynamic_pointer_cast;
46 using std::shared_ptr;
52 IdentityTransferFunction::make_double_lut(
double from,
double to,
int bit_depth,
bool)
const
54 int const bit_length = int(std::pow(2.0f, bit_depth));
55 auto lut = vector<double>(bit_length);
56 for (
int i = 0; i < bit_length; ++i) {
57 double x = double(i) / (bit_length - 1);
58 lut[i] = (x * (to - from)) + from;
66 IdentityTransferFunction::about_equal (shared_ptr<const TransferFunction> other,
double)
const
68 auto o = dynamic_pointer_cast<const IdentityTransferFunction>(other);
69 return static_cast<bool>(o);
IdentityTransferFunction class.
Namespace for everything in libdcp.