libdcp
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dcp::ColourConversion Class Reference

A representation of all the parameters involved the colourspace conversion of a YUV image to XYZ (via RGB) More...

#include <colour_conversion.h>

Public Member Functions

 ColourConversion (std::shared_ptr< const TransferFunction > in, YUVToRGB yuv_to_rgb, Chromaticity red, Chromaticity green, Chromaticity blue, Chromaticity white, boost::optional< Chromaticity > adjusted_white, std::shared_ptr< const TransferFunction > out)
 
std::shared_ptr< const TransferFunctionin () const
 
YUVToRGB yuv_to_rgb () const
 
Chromaticity red () const
 
Chromaticity green () const
 
Chromaticity blue () const
 
Chromaticity white () const
 
boost::optional< Chromaticityadjusted_white () const
 
std::shared_ptr< const TransferFunctionout () const
 
void set_in (std::shared_ptr< const TransferFunction > f)
 
void set_yuv_to_rgb (YUVToRGB y)
 
void set_red (Chromaticity red)
 
void set_green (Chromaticity green)
 
void set_blue (Chromaticity blue)
 
void set_white (Chromaticity white)
 
void set_adjusted_white (Chromaticity adjusted_white)
 
void unset_adjusted_white ()
 
void set_out (std::shared_ptr< const TransferFunction > f)
 
bool about_equal (ColourConversion const &other, float epsilon) const
 
boost::numeric::ublas::matrix< double > rgb_to_xyz () const
 
boost::numeric::ublas::matrix< double > xyz_to_rgb () const
 
boost::numeric::ublas::matrix< double > bradford () const
 

Static Public Member Functions

static ColourConversion const & srgb_to_xyz ()
 
static ColourConversion const & rec601_to_xyz ()
 
static ColourConversion const & rec709_to_xyz ()
 
static ColourConversion const & p3_to_xyz ()
 
static ColourConversion const & rec1886_to_xyz ()
 
static ColourConversion const & rec2020_to_xyz ()
 
static ColourConversion const & s_gamut3_to_xyz ()
 

Protected Attributes

std::shared_ptr< const TransferFunction_in
 
YUVToRGB _yuv_to_rgb
 
Chromaticity _red
 
Chromaticity _green
 
Chromaticity _blue
 
Chromaticity _white
 
boost::optional< Chromaticity_adjusted_white
 
std::shared_ptr< const TransferFunction_out
 

Detailed Description

A representation of all the parameters involved the colourspace conversion of a YUV image to XYZ (via RGB)

Definition at line 70 of file colour_conversion.h.

Member Function Documentation

◆ s_gamut3_to_xyz()

ColourConversion const & ColourConversion::s_gamut3_to_xyz ( )
static

Sony S-Gamut3/S-Log3

Definition at line 158 of file colour_conversion.cc.

Member Data Documentation

◆ _adjusted_white

boost::optional<Chromaticity> dcp::ColourConversion::_adjusted_white
protected

White point that we are adjusting to using a Bradford matrix

Definition at line 180 of file colour_conversion.h.

◆ _in

std::shared_ptr<const TransferFunction> dcp::ColourConversion::_in
protected

Input transfer function (probably a gamma function, or something similar)

Definition at line 172 of file colour_conversion.h.

◆ _out

std::shared_ptr<const TransferFunction> dcp::ColourConversion::_out
protected

Output transfer function (probably an inverse gamma function, or something similar)

Definition at line 182 of file colour_conversion.h.

◆ _yuv_to_rgb

YUVToRGB dcp::ColourConversion::_yuv_to_rgb
protected

Conversion to use from YUV to RGB

Definition at line 174 of file colour_conversion.h.


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