45 float *
X,
float *
Y,
float *
Z)
47 float L = (
float)
l * 100.0F / 255.0F;
51 *
Y = (
L * cielab->
Y0) / 903.292F;
52 cby = 7.787F * (*
Y / cielab->
Y0) + 16.0F / 116.0F;
54 cby = (
L + 16.0F) / 116.0F;
55 *
Y = cielab->
Y0 * cby * cby * cby;
58 tmp = (
float)
a / 500.0F + cby;
60 *
X = cielab->
X0 * (tmp - 0.13793F) / 7.787F;
62 *
X = cielab->
X0 * tmp * tmp * tmp;
64 tmp = cby - (
float)
b / 200.0F;
66 *
Z = cielab->
Z0 * (tmp - 0.13793F) / 7.787F;
68 *
Z = cielab->
Z0 * tmp * tmp * tmp;
71#define RINT(R) ((uint32)((R)>0?((R)+0.5):((R)-0.5)))
137 for(
i = 0; i <= cielab->
range;
i++) {
146 for(
i = 0; i <= cielab->
range;
i++) {
155 for(
i = 0; i <= cielab->
range;
i++) {
161 cielab->
X0 = refWhite[0];
162 cielab->
Y0 = refWhite[1];
163 cielab->
Z0 = refWhite[2];
174#define FIX(x) ((int32)((x) * (1L<<SHIFT) + 0.5))
175#define ONE_HALF ((int32)(1<<(SHIFT-1)))
176#define Code2V(c, RB, RW, CR) ((((c)-(int32)(RB))*(float)(CR))/(float)(((RW)-(RB)!=0) ? ((RW)-(RB)) : 1))
177#define CLAMP(f,min,max) ((f)<(min)?(min):(f)>(max)?(max):(f))
178#define HICLAMP(f,max) ((f)>(max)?(max):(f))
188 Cb =
CLAMP(Cb, 0, 255);
189 Cr =
CLAMP(Cr, 0, 255);
202static float CLAMPw(
float v,
float vmin,
float vmax)
239#define LumaRed luma[0]
240#define LumaGreen luma[1]
241#define LumaBlue luma[2]
246 ycbcr->
clamptab = (clamptab += 256);
247 for (
i = 0;
i < 256;
i++)
250 ycbcr->
Cr_r_tab = (
int*) (clamptab + 3*256);
273 for (
i = 0,
x = -128;
i < 256;
i++,
x++) {
275 refBlackWhite[5] - 128.0F, 127),
276 -128.0F * 32, 128.0F * 32);
278 refBlackWhite[3] - 128.0F, 127),
279 -128.0F * 32, 128.0F * 32);
287 -128.0F * 32, 128.0F * 32);
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
double pow(double x, double y)
GLint GLint GLint GLint GLint x
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static float(__cdecl *square_half_float)(float x
float Yb2b[CIELABTORGB_TABLE_RANGE+1]
float Yr2r[CIELABTORGB_TABLE_RANGE+1]
float Yg2g[CIELABTORGB_TABLE_RANGE+1]
void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, uint32 *r, uint32 *g, uint32 *b)
static float CLAMPw(float v, float vmin, float vmax)
#define Code2V(c, RB, RW, CR)
#define CLAMP(f, min, max)
int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32 *r, uint32 *g, uint32 *b)
int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *display, float *refWhite)
void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b, float *X, float *Y, float *Z)
void _TIFFmemset(void *p, int v, tmsize_t c)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
unsigned char TIFFRGBValue
#define CIELABTORGB_TABLE_RANGE
#define TIFFroundup_32(x, y)