libdcp
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
dcp::TransferFunction Class Referenceabstract

A transfer function represented by a lookup table. More...

#include <transfer_function.h>

Inheritance diagram for dcp::TransferFunction:
dcp::GammaTransferFunction dcp::IdentityTransferFunction dcp::ModifiedGammaTransferFunction dcp::SGamut3TransferFunction

Classes

struct  LUTDescriptor
 
struct  LUTDescriptorHasher
 

Public Member Functions

std::vector< double > const & double_lut (double from, double to, int bit_depth, bool inverse) const
 
std::vector< int > const & int_lut (double from, double to, int bit_depth, bool inverse, int scale) const
 
virtual bool about_equal (std::shared_ptr< const TransferFunction > other, double epsilon) const =0
 

Protected Member Functions

virtual std::vector< double > make_double_lut (double from, double to, int bit_depth, bool inverse) const =0
 

Private Member Functions

std::vector< int > make_int_lut (double from, double to, int bit_depth, bool inverse, int scale) const
 
std::vector< double > const & double_lut_unlocked (double from, double to, int bit_depth, bool inverse) const
 

Private Attributes

std::unordered_map< LUTDescriptor, std::vector< double >, LUTDescriptorHasher_double_luts
 
std::unordered_map< LUTDescriptor, std::vector< int >, LUTDescriptorHasher_int_luts
 
boost::mutex _mutex
 

Detailed Description

A transfer function represented by a lookup table.

Definition at line 56 of file transfer_function.h.

Member Function Documentation

◆ double_lut()

vector< double > const & TransferFunction::double_lut ( double  from,
double  to,
int  bit_depth,
bool  inverse 
) const
Returns
A look-up table (of size 2^bit_depth)

Definition at line 53 of file transfer_function.cc.

Member Data Documentation

◆ _mutex

boost::mutex dcp::TransferFunction::_mutex
mutableprivate

mutex to protect _double_luts and _int_luts

Definition at line 93 of file transfer_function.h.


The documentation for this class was generated from the following files: