libdcp
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
dcp::ModifiedGammaTransferFunction Class Reference

#include <modified_gamma_transfer_function.h>

Inheritance diagram for dcp::ModifiedGammaTransferFunction:
dcp::TransferFunction

Public Member Functions

 ModifiedGammaTransferFunction (double power, double threshold, double A, double B)
 
double power () const
 
double threshold () const
 
double A () const
 
double B () const
 
bool about_equal (std::shared_ptr< const TransferFunction >, double epsilon) const override
 
- Public Member Functions inherited from dcp::TransferFunction
 TransferFunction (TransferFunction const &)=delete
 
TransferFunctionoperator= (TransferFunction const &)=delete
 
double const * lut (int bit_depth, bool inverse) const
 

Protected Member Functions

double * make_lut (int bit_depth, bool inverse) const override
 

Private Attributes

double _power
 
double _threshold
 
double _A
 
double _B
 

Detailed Description

A transfer function which for an input x gives a linear output y where

y = x / B for x <= threshold y = ((x + A) / (1 + A))^power for x > threshold

The reverse transform is

x = y * B for y <= threshold / B x = (1 + A) * y ^ (1 / power) - A for y > threshold / B

Definition at line 56 of file modified_gamma_transfer_function.h.

Member Function Documentation

◆ make_lut()

double * ModifiedGammaTransferFunction::make_lut ( int  bit_depth,
bool  inverse 
) const
overrideprotectedvirtual

Make a LUT and return an array allocated by new

Implements dcp::TransferFunction.

Definition at line 61 of file modified_gamma_transfer_function.cc.


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