w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cmssm.c File Reference
#include "lcms2_internal.h"
Include dependency graph for cmssm.c:

Go to the source code of this file.

Classes

struct  cmsSpherical
 
struct  cmsGDBPoint
 
struct  cmsGDB
 
struct  cmsLine
 
struct  cmsPlane
 
struct  _spiral
 

Macros

#define SECTORS   16
 
#define NSTEPS   (sizeof(Spiral) / sizeof(struct _spiral))
 

Enumerations

enum  GDBPointType { GP_EMPTY , GP_SPECIFIED , GP_MODELED }
 

Functions

static cmsFloat64Number _cmsAtan2 (cmsFloat64Number y, cmsFloat64Number x)
 
static void ToSpherical (cmsSpherical *sp, const cmsVEC3 *v)
 
static void ToCartesian (cmsVEC3 *v, const cmsSpherical *sp)
 
static void QuantizeToSector (const cmsSpherical *sp, int *alpha, int *theta)
 
static void LineOf2Points (cmsLine *line, cmsVEC3 *a, cmsVEC3 *b)
 
static void GetPointOfLine (cmsVEC3 *p, const cmsLine *line, cmsFloat64Number t)
 
static cmsBool ClosestLineToLine (cmsVEC3 *r, const cmsLine *line1, const cmsLine *line2)
 
cmsHANDLE cmsGBDAlloc (cmsContext ContextID)
 
void cmsGBDFree (cmsHANDLE hGBD)
 
static cmsGDBPointGetPoint (cmsGDB *gbd, const cmsCIELab *Lab, cmsSpherical *sp)
 
cmsBool cmsGDBAddPoint (cmsHANDLE hGBD, const cmsCIELab *Lab)
 
cmsBool cmsGDBCheckPoint (cmsHANDLE hGBD, const cmsCIELab *Lab)
 
static int FindNearSectors (cmsGDB *gbd, int alpha, int theta, cmsGDBPoint *Close[])
 
static cmsBool InterpolateMissingSector (cmsGDB *gbd, int alpha, int theta)
 
cmsBool cmsGDBCompute (cmsHANDLE hGBD, cmsUInt32Number dwFlags)
 

Variables

static const struct _spiral Spiral []
 

Macro Definition Documentation

◆ NSTEPS

#define NSTEPS   (sizeof(Spiral) / sizeof(struct _spiral))

Definition at line 437 of file cmssm.c.

◆ SECTORS

#define SECTORS   16

Definition at line 39 of file cmssm.c.

Enumeration Type Documentation

◆ GDBPointType

Enumerator
GP_EMPTY 
GP_SPECIFIED 
GP_MODELED 

Definition at line 50 of file cmssm.c.

Function Documentation

◆ _cmsAtan2()

static cmsFloat64Number _cmsAtan2 ( cmsFloat64Number  y,
cmsFloat64Number  x 
)
static

Definition at line 101 of file cmssm.c.

References a, atan2(), M_PI, cordic::x, and y.

Referenced by ToSpherical().

◆ ClosestLineToLine()

static cmsBool ClosestLineToLine ( cmsVEC3 r,
const cmsLine line1,
const cmsLine line2 
)
static

Definition at line 217 of file cmssm.c.

References _cmsVEC3dot(), _cmsVEC3minus(), a, b, c, D, d, e, fabs, GetPointOfLine(), line2, MATRIX_DET_TOLERANCE, r, sc, TRUE, u, and w0.

Referenced by InterpolateMissingSector().

◆ cmsGBDAlloc()

cmsHANDLE cmsGBDAlloc ( cmsContext  ContextID)

Definition at line 302 of file cmssm.c.

References _cmsMallocZero(), and NULL.

◆ cmsGBDFree()

void cmsGBDFree ( cmsHANDLE  hGBD)

Definition at line 313 of file cmssm.c.

References _cmsFree(), cmsGDB::ContextID, and NULL.

◆ cmsGDBAddPoint()

cmsBool cmsGDBAddPoint ( cmsHANDLE  hGBD,
const cmsCIELab Lab 
)

Definition at line 358 of file cmssm.c.

References FALSE, GetPoint(), GP_EMPTY, GP_SPECIFIED, NULL, p, ptr, sp, and TRUE.

◆ cmsGDBCheckPoint()

cmsBool cmsGDBCheckPoint ( cmsHANDLE  hGBD,
const cmsCIELab Lab 
)

Definition at line 390 of file cmssm.c.

References FALSE, GetPoint(), GP_EMPTY, NULL, p, ptr, and sp.

◆ cmsGDBCompute()

cmsBool cmsGDBCompute ( cmsHANDLE  hGBD,
cmsUInt32Number  dwFlags 
)

Definition at line 550 of file cmssm.c.

References _cmsAssert, alpha, cmsUNUSED_PARAMETER, FALSE, InterpolateMissingSector(), NULL, SECTORS, and TRUE.

◆ FindNearSectors()

static int FindNearSectors ( cmsGDB gbd,
int  alpha,
int  theta,
cmsGDBPoint Close[] 
)
static

Definition at line 440 of file cmssm.c.

References a, _spiral::AdvX, _spiral::AdvY, alpha, cmsGDB::Gamut, GP_EMPTY, i, NSTEPS, pt, SECTORS, Spiral, and t.

Referenced by InterpolateMissingSector().

◆ GetPoint()

static cmsGDBPoint* GetPoint ( cmsGDB gbd,
const cmsCIELab Lab,
cmsSpherical sp 
)
static

◆ GetPointOfLine()

static void GetPointOfLine ( cmsVEC3 p,
const cmsLine line,
cmsFloat64Number  t 
)
static

Definition at line 194 of file cmssm.c.

References p, VX, VY, and VZ.

Referenced by ClosestLineToLine().

◆ InterpolateMissingSector()

◆ LineOf2Points()

static void LineOf2Points ( cmsLine line,
cmsVEC3 a,
cmsVEC3 b 
)
static

Definition at line 182 of file cmssm.c.

References _cmsVEC3init(), a, b, n, u, VX, VY, and VZ.

Referenced by InterpolateMissingSector().

◆ QuantizeToSector()

static void QuantizeToSector ( const cmsSpherical sp,
int alpha,
int theta 
)
static

Definition at line 168 of file cmssm.c.

References alpha, floor, int(), SECTORS, and sp.

Referenced by GetPoint().

◆ ToCartesian()

static void ToCartesian ( cmsVEC3 v,
const cmsSpherical sp 
)
static

Definition at line 142 of file cmssm.c.

References a, alpha, b, cos(), L, M_PI, sin(), sp, v, VX, VY, and VZ.

Referenced by InterpolateMissingSector().

◆ ToSpherical()

static void ToSpherical ( cmsSpherical sp,
const cmsVEC3 v 
)
static

Definition at line 119 of file cmssm.c.

References _cmsAtan2(), a, b, L, r, sp, sqrt(), v, VX, VY, and VZ.

Referenced by GetPoint(), and InterpolateMissingSector().

Variable Documentation

◆ Spiral

const struct _spiral Spiral[]
static
Initial value:
= { {0, -1}, {+1, -1}, {+1, 0}, {+1, +1}, {0, +1}, {-1, +1},
{-1, 0}, {-1, -1}, {-1, -2}, {0, -2}, {+1, -2}, {+2, -2},
{+2, -1}, {+2, 0}, {+2, +1}, {+2, +2}, {+1, +2}, {0, +2},
{-1, +2}, {-2, +2}, {-2, +1}, {-2, 0}, {-2, -1}, {-2, -2} }

Referenced by FindNearSectors().