Lines Matching refs:Lab
54 8 bit Lab PCS:
60 16 bit Lab PCS:
142 // Standard XYZ to Lab. it can handle negative XZY numbers in some cases
143 void CMSEXPORT cmsXYZ2Lab(const cmsCIEXYZ* WhitePoint, cmsCIELab* Lab, const cmsCIEXYZ* xyz)
154 Lab->L = 116.0*fy - 16.0;
155 Lab->a = 500.0*(fx - fy);
156 Lab->b = 200.0*(fy - fz);
160 // Standard XYZ to Lab. It can return negative XYZ in some cases
161 void CMSEXPORT cmsLab2XYZ(const cmsCIEXYZ* WhitePoint, cmsCIEXYZ* xyz, const cmsCIELab* Lab)
168 y = (Lab-> L + 16.0) / 116.0;
169 x = y + 0.002 * Lab -> a;
170 z = y - 0.005 * Lab -> b;
218 void CMSEXPORT cmsLabEncoded2FloatV2(cmsCIELab* Lab, const cmsUInt16Number wLab[3])
220 Lab->L = L2float2(wLab[0]);
221 Lab->a = ab2float2(wLab[1]);
222 Lab->b = ab2float2(wLab[2]);
226 void CMSEXPORT cmsLabEncoded2Float(cmsCIELab* Lab, const cmsUInt16Number wLab[3])
228 Lab->L = L2float4(wLab[0]);
229 Lab->a = ab2float4(wLab[1]);
230 Lab->b = ab2float4(wLab[2]);
256 cmsCIELab Lab;
258 Lab.L = Clamp_L_doubleV2(fLab ->L);
259 Lab.a = Clamp_ab_doubleV2(fLab ->a);
260 Lab.b = Clamp_ab_doubleV2(fLab ->b);
262 wLab[0] = L2Fix2(Lab.L);
263 wLab[1] = ab2Fix2(Lab.a);
264 wLab[2] = ab2Fix2(Lab.b);
300 cmsCIELab Lab;
302 Lab.L = Clamp_L_doubleV4(fLab ->L);
303 Lab.a = Clamp_ab_doubleV4(fLab ->a);
304 Lab.b = Clamp_ab_doubleV4(fLab ->b);
306 wLab[0] = L2Fix4(Lab.L);
307 wLab[1] = ab2Fix4(Lab.a);
308 wLab[2] = ab2Fix4(Lab.b);
349 void CMSEXPORT cmsLab2LCh(cmsCIELCh* LCh, const cmsCIELab* Lab)
351 LCh -> L = Lab -> L;
352 LCh -> C = pow(Sqr(Lab ->a) + Sqr(Lab ->b), 0.5);
353 LCh -> h = atan2deg(Lab ->b, Lab ->a);
358 void CMSEXPORT cmsLCh2Lab(cmsCIELab* Lab, const cmsCIELCh* LCh)
362 Lab -> L = LCh -> L;
363 Lab -> a = LCh -> C * cos(h);
364 Lab -> b = LCh -> C * sin(h);
437 // Returns dE on two Lab values
482 cmsFloat64Number ComputeLBFD(const cmsCIELab* Lab)
486 if (Lab->L > 7.996969)
487 yt = (Sqr((Lab->L+16)/116)*((Lab->L+16)/116))*100;
489 yt = 100 * (Lab->L / 903.3);
718 static cmsUInt16Number LABblack[4] = { 0, 0x8080, 0x8080 }; // V4 Lab encoding