45 float *
X,
float *
Y,
float *
Z)
51 *
Y = (
L * cielab->
Y0) / 903.292
F;
52 cby = 7.787F * (*
Y / cielab->
Y0) + 16.0
F / 116.0
F;
54 cby = (
L + 16.0F) / 116.0
F;
55 *
Y = cielab->
Y0 * cby * cby * cby;
60 *
X = cielab->
X0 * (tmp - 0.13793F) / 7.787
F;
62 *
X = cielab->
X0 * tmp * tmp * tmp;
66 *
Z = cielab->
Z0 * (tmp - 0.13793F) / 7.787
F;
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);
202 static 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.0
F, 127),
276 -128.0F * 32, 128.0F * 32);
278 refBlackWhite[3] - 128.0
F, 127),
279 -128.0F * 32, 128.0F * 32);
287 -128.0F * 32, 128.0F * 32);
void _TIFFmemset(void *p, int v, tmsize_t c)
void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32 *r, uint32 *g, uint32 *b)
float Yg2g[CIELABTORGB_TABLE_RANGE+1]
GLdouble GLdouble GLdouble r
GLint GLint GLint GLint GLint x
unsigned char TIFFRGBValue
int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *display, float *refWhite)
float pow(float __x, int __y)
#define CLAMP(f, min, max)
#define CIELABTORGB_TABLE_RANGE
float Yb2b[CIELABTORGB_TABLE_RANGE+1]
GLboolean GLboolean GLboolean b
void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b, float *X, float *Y, float *Z)
float Yr2r[CIELABTORGB_TABLE_RANGE+1]
int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
static float CLAMPw(float v, float vmin, float vmax)
void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, uint32 *r, uint32 *g, uint32 *b)
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
GLboolean GLboolean GLboolean GLboolean a
#define Code2V(c, RB, RW, CR)
#define TIFFroundup_32(x, y)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *