VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
grcolourspace.h File Reference
#include "gdef.h"
#include <vector>
#include "grcolourspacematrix.h"
#include "grcolourspacetypes.h"
#include "grcolourspaceranges.h"
#include "grcolourspacemap.h"
#include "grcolourspacetables.h"

Go to the source code of this file.

Classes

class  Gr::ColourSpace::triple< T >
 A 3-tuple for holding rgb or yuv triples. More...
 
class  Gr::ColourSpace::triple< T >
 A 3-tuple for holding rgb or yuv triples. More...
 
class  Gr::ColourSpace::cache< T >
 A cache for a complete set of rgb/yuv mappings, amounting to about 50MB of data. More...
 

Namespaces

 Gr
 Static image classes.
 
 Gr::ColourSpace
 Provides rgb/yuv colourspace mapping functions.
 

Functions

unsigned int g_colourspace_r (unsigned int y, unsigned int u, unsigned int v)
 
unsigned int g_colourspace_g (unsigned int y, unsigned int u, unsigned int v)
 
unsigned int g_colourspace_b (unsigned int y, unsigned int u, unsigned int v)
 
unsigned int g_colourspace_y (unsigned int r, unsigned int g, unsigned int b)
 
unsigned int g_colourspace_u (unsigned int r, unsigned int g, unsigned int b)
 
unsigned int g_colourspace_v (unsigned int r, unsigned int g, unsigned int b)
 
template<typename Tmatrix , typename Tconverter , typename Ta , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::product (Ta a1, Ta a2, Ta a3, Ttriple tfp) g__noexcept
 Does a cross-product using fp types.
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::y_imp (Ttriple rgb) g__noexcept
 Calculates y from rgb using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::u_imp (Ttriple rgb) g__noexcept
 Calculates u (cb) from rgb using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::v_imp (Ttriple rgb) g__noexcept
 Calculates v (cr) from rgb using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::r_imp (Ttriple yuv) g__noexcept
 Calculates r from yuv using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::g_imp (Ttriple yuv) g__noexcept
 Calculates g from yuv using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Ttriple >
g__constexpr Tconverter::fp_type Gr::ColourSpace::b_imp (Ttriple yuv) g__noexcept
 Calculates b from yuv using fp types. More...
 
template<typename Tmatrix , typename Tconverter , typename Trange_rgb , typename Trange_y , typename Trange_uv , typename Ttriple >
Ttriple Gr::ColourSpace::yuv_imp (Ttriple rgb) g__noexcept
 A top-level function that calculates yuv from rgb with all the implementation options exposed as template parameters.
 
template<typename Tmatrix , typename Tconverter , typename Trange_rgb , typename Trange_y , typename Trange_uv , typename Ttriple >
Ttriple Gr::ColourSpace::rgb_imp (Ttriple yuv) g__noexcept
 A top-level function that calculates rgb from yuv with all the implementation options exposed as template parameters.
 
triple< unsigned char > Gr::ColourSpace::yuv (triple< unsigned char > rgb) g__noexcept
 A top-level function that calculates yuv from rgb with default implementation options.
 
triple< unsigned char > Gr::ColourSpace::rgb (triple< unsigned char > yuv) g__noexcept
 A top-level function that calculates rgb from yuv with default implementation options.
 
unsigned char Gr::ColourSpace::r_int (unsigned char y, unsigned char, unsigned char v) g__noexcept
 A fast conversion from yuv to r.
 
unsigned char Gr::ColourSpace::g_int (unsigned char y, unsigned char u, unsigned char v) g__noexcept
 A fast conversion from yuv to g.
 
unsigned char Gr::ColourSpace::b_int (unsigned char y, unsigned char u, unsigned char) g__noexcept
 A fast conversion from yuv to b.
 
triple< unsigned char > Gr::ColourSpace::rgb_int (triple< unsigned char > yuv) g__noexcept
 A fast conversion from yuv to rgb.
 
unsigned char Gr::ColourSpace::y_int (unsigned char r, unsigned char g, unsigned char b)
 A fast conversion from rgb to y.
 
unsigned char Gr::ColourSpace::u_int (unsigned char r, unsigned char g, unsigned char b)
 A fast conversion from rgb to u.
 
unsigned char Gr::ColourSpace::v_int (unsigned char r, unsigned char g, unsigned char b)
 A fast conversion from rgb to v.
 
triple< unsigned char > Gr::ColourSpace::yuv_int (triple< unsigned char > rgb) g__noexcept
 A fast conversion from rgb to yuv.