MythTV  master
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MythColourSpace Class Reference

#include <mythcolourspace.h>

Collaboration diagram for MythColourSpace:
Collaboration graph
[legend]

Public Member Functions

 MythColourSpace ()=default
 
 MythColourSpace (const MythPrimariesFloat &Primaries, MythPrimaryFloat WhitePoint)
 

Static Public Member Functions

static bool Alike (const MythColourSpace &First, const MythColourSpace &Second, float Fuzz)
 
static QMatrix4x4 RGBtoXYZ (const MythColourSpace &Primaries)
 Create a conversion matrix for RGB to XYZ with the given primaries. More...
 

Public Attributes

MythPrimariesFloat m_primaries {{{0.0F}}}
 
MythPrimaryFloat m_whitePoint {0.0F}
 

Static Public Attributes

static MythColourSpace s_sRGB = {{{{0.640F, 0.330F}, {0.300F, 0.600F}, {0.150F, 0.060F}}}, D65}
 
static MythColourSpace s_BT709 = {{{{0.640F, 0.330F}, {0.300F, 0.600F}, {0.150F, 0.060F}}}, D65}
 
static MythColourSpace s_BT470M = {{{{0.670F, 0.330F}, {0.210F, 0.710F}, {0.140F, 0.080F}}}, Cwp}
 
static MythColourSpace s_BT610_525 = {{{{0.630F, 0.340F}, {0.310F, 0.595F}, {0.155F, 0.070F}}}, D65}
 
static MythColourSpace s_BT610_625 = {{{{0.640F, 0.330F}, {0.290F, 0.600F}, {0.150F, 0.060F}}}, D65}
 
static MythColourSpace s_BT2020 = {{{{0.708F, 0.292F}, {0.170F, 0.797F}, {0.131F, 0.046F}}}, D65}
 

Detailed Description

Definition at line 18 of file mythcolourspace.h.

Constructor & Destructor Documentation

◆ MythColourSpace() [1/2]

MythColourSpace::MythColourSpace ( )
default

◆ MythColourSpace() [2/2]

MythColourSpace::MythColourSpace ( const MythPrimariesFloat Primaries,
MythPrimaryFloat  WhitePoint 
)

Definition at line 21 of file mythcolourspace.cpp.

Member Function Documentation

◆ Alike()

bool MythColourSpace::Alike ( const MythColourSpace First,
const MythColourSpace Second,
float  Fuzz 
)
static

◆ RGBtoXYZ()

QMatrix4x4 MythColourSpace::RGBtoXYZ ( const MythColourSpace Primaries)
static

Create a conversion matrix for RGB to XYZ with the given primaries.

This is a joyous mindbender. There are various explanations on the interweb but this is based on the Kodi implementation - with due credit to Team Kodi.

Invert the result for the XYZ->RGB conversion matrix.

Note
We use QMatrix4x4 because QMatrix3x3 has no inverted method.

Definition at line 65 of file mythcolourspace.cpp.

Referenced by MythVideoColourSpace::GetPrimaryConversion().

Member Data Documentation

◆ s_sRGB

MythColourSpace MythColourSpace::s_sRGB = {{{{0.640F, 0.330F}, {0.300F, 0.600F}, {0.150F, 0.060F}}}, D65}
static

Definition at line 21 of file mythcolourspace.h.

Referenced by MythEDID::ParseBaseBlock().

◆ s_BT709

MythColourSpace MythColourSpace::s_BT709 = {{{{0.640F, 0.330F}, {0.300F, 0.600F}, {0.150F, 0.060F}}}, D65}
static

Definition at line 22 of file mythcolourspace.h.

Referenced by MythVideoColourSpace::GetPrimaries().

◆ s_BT470M

MythColourSpace MythColourSpace::s_BT470M = {{{{0.670F, 0.330F}, {0.210F, 0.710F}, {0.140F, 0.080F}}}, Cwp}
static

Definition at line 23 of file mythcolourspace.h.

◆ s_BT610_525

MythColourSpace MythColourSpace::s_BT610_525 = {{{{0.630F, 0.340F}, {0.310F, 0.595F}, {0.155F, 0.070F}}}, D65}
static

Definition at line 24 of file mythcolourspace.h.

Referenced by MythVideoColourSpace::GetPrimaries().

◆ s_BT610_625

MythColourSpace MythColourSpace::s_BT610_625 = {{{{0.640F, 0.330F}, {0.290F, 0.600F}, {0.150F, 0.060F}}}, D65}
static

Definition at line 25 of file mythcolourspace.h.

Referenced by MythVideoColourSpace::GetPrimaries().

◆ s_BT2020

MythColourSpace MythColourSpace::s_BT2020 = {{{{0.708F, 0.292F}, {0.170F, 0.797F}, {0.131F, 0.046F}}}, D65}
static

Definition at line 26 of file mythcolourspace.h.

Referenced by MythVideoColourSpace::GetPrimaries().

◆ m_primaries

MythPrimariesFloat MythColourSpace::m_primaries {{{0.0F}}}

Definition at line 34 of file mythcolourspace.h.

Referenced by Alike(), MythEDID::Debug(), MythEDID::ParseBaseBlock(), and RGBtoXYZ().

◆ m_whitePoint

MythPrimaryFloat MythColourSpace::m_whitePoint {0.0F}

Definition at line 35 of file mythcolourspace.h.

Referenced by Alike(), MythEDID::Debug(), MythEDID::ParseBaseBlock(), and RGBtoXYZ().


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