31 void hsv_to_rgb(
float h,
float s,
float v,
float *r_r,
float *r_g,
float *r_b)
35 nr =
fabsf(h * 6.0f - 3.0f) - 1.0f;
36 ng = 2.0f -
fabsf(h * 6.0f - 2.0f);
37 nb = 2.0f -
fabsf(h * 6.0f - 4.0f);
39 CLAMP(nr, 0.0f, 1.0f);
40 CLAMP(nb, 0.0f, 1.0f);
41 CLAMP(ng, 0.0f, 1.0f);
43 *r_r = ((nr - 1.0f) * s + 1.0f) *
v;
44 *r_g = ((ng - 1.0f) * s + 1.0f) *
v;
45 *r_b = ((nb - 1.0f) * s + 1.0f) *
v;
48 void hsl_to_rgb(
float h,
float s,
float l,
float *r_r,
float *r_g,
float *r_b)
50 float nr, ng, nb, chroma;
52 nr =
fabsf(h * 6.0f - 3.0f) - 1.0f;
53 ng = 2.0f -
fabsf(h * 6.0f - 2.0f);
54 nb = 2.0f -
fabsf(h * 6.0f - 4.0f);
56 CLAMP(nr, 0.0f, 1.0f);
57 CLAMP(nb, 0.0f, 1.0f);
58 CLAMP(ng, 0.0f, 1.0f);
60 chroma = (1.0f -
fabsf(2.0f *
l - 1.0f)) * s;
62 *r_r = (nr - 0.5f) * chroma +
l;
63 *r_g = (ng - 0.5f) * chroma +
l;
64 *r_b = (nb - 0.5f) * chroma +
l;
70 hsv_to_rgb(hsv[0], hsv[1], hsv[2], &r_rgb[0], &r_rgb[1], &r_rgb[2]);
76 hsl_to_rgb(hsl[0], hsl[1], hsl[2], &r_rgb[0], &r_rgb[1], &r_rgb[2]);
79 void rgb_to_yuv(
float r,
float g,
float b,
float *r_y,
float *r_u,
float *r_v,
int colorspace)
85 y = 0.299f *
r + 0.587f * g + 0.114f * b;
86 u = -0.147f *
r - 0.289f * g + 0.436f * b;
87 v = 0.615f *
r - 0.515f * g - 0.100f * b;
92 y = 0.2126f *
r + 0.7152f * g + 0.0722f * b;
93 u = -0.09991f *
r - 0.33609f * g + 0.436f * b;
94 v = 0.615f *
r - 0.55861f * g - 0.05639f * b;
103 void yuv_to_rgb(
float y,
float u,
float v,
float *r_r,
float *r_g,
float *r_b,
int colorspace)
107 switch (colorspace) {
110 g =
y - 0.394f * u - 0.581f *
v;
116 r =
y + 1.28033f *
v;
117 g =
y - 0.21482f * u - 0.38059f *
v;
118 b =
y + 2.12798f * u;
130 void rgb_to_ycc(
float r,
float g,
float b,
float *r_y,
float *r_cb,
float *r_cr,
int colorspace)
133 float y = 128.0f, cr = 128.0f, cb = 128.0f;
139 switch (colorspace) {
141 y = (0.257f * sr) + (0.504f * sg) + (0.098f * sb) + 16.0f;
142 cb = (-0.148f * sr) - (0.291f * sg) + (0.439f * sb) + 128.0f;
143 cr = (0.439f * sr) - (0.368f * sg) - (0.071f * sb) + 128.0f;
146 y = (0.183f * sr) + (0.614f * sg) + (0.062f * sb) + 16.0f;
147 cb = (-0.101f * sr) - (0.338f * sg) + (0.439f * sb) + 128.0f;
148 cr = (0.439f * sr) - (0.399f * sg) - (0.040f * sb) + 128.0f;
151 y = (0.299f * sr) + (0.587f * sg) + (0.114f * sb);
152 cb = (-0.16874f * sr) - (0.33126f * sg) + (0.5f * sb) + 128.0f;
153 cr = (0.5f * sr) - (0.41869f * sg) - (0.08131f * sb) + 128.0f;
169 void ycc_to_rgb(
float y,
float cb,
float cr,
float *r_r,
float *r_g,
float *r_b,
int colorspace)
171 float r = 128.0f, g = 128.0f, b = 128.0f;
173 switch (colorspace) {
175 r = 1.164f * (
y - 16.0f) + 1.596f * (cr - 128.0f);
176 g = 1.164f * (
y - 16.0f) - 0.813f * (cr - 128.0f) - 0.392f * (cb - 128.0f);
177 b = 1.164f * (
y - 16.0f) + 2.017f * (cb - 128.0f);
180 r = 1.164f * (
y - 16.0f) + 1.793f * (cr - 128.0f);
181 g = 1.164f * (
y - 16.0f) - 0.534f * (cr - 128.0f) - 0.213f * (cb - 128.0f);
182 b = 1.164f * (
y - 16.0f) + 2.115f * (cb - 128.0f);
185 r =
y + 1.402f * cr - 179.456f;
186 g =
y - 0.34414f * cb - 0.71414f * cr + 135.45984f;
187 b =
y + 1.772f * cb - 226.816f;
198 void hex_to_rgb(
const char *hexcol,
float *r_r,
float *r_g,
float *r_b)
200 unsigned int ri, gi, bi;
202 if (hexcol[0] ==
'#') {
206 if (sscanf(hexcol,
"%02x%02x%02x", &ri, &gi, &bi) == 3) {
209 else if (sscanf(hexcol,
"%01x%01x%01x", &ri, &gi, &bi) == 3) {
217 *r_r = *r_g = *r_b = 0.0f;
221 *r_r = (
float)ri * (1.0f / 255.0f);
222 *r_g = (
float)gi * (1.0f / 255.0f);
223 *r_b = (
float)bi * (1.0f / 255.0f);
224 CLAMP(*r_r, 0.0f, 1.0f);
225 CLAMP(*r_g, 0.0f, 1.0f);
226 CLAMP(*r_b, 0.0f, 1.0f);
229 void rgb_to_hsv(
float r,
float g,
float b,
float *r_h,
float *r_s,
float *r_v)
242 k = -2.0f / 6.0f - k;
248 *r_h =
fabsf(k + (g - b) / (6.0f * chroma + 1e-20f));
249 *r_s = chroma / (
r + 1e-20f);
256 rgb_to_hsv(rgb[0], rgb[1], rgb[2], &r_hsv[0], &r_hsv[1], &r_hsv[2]);
259 void rgb_to_hsl(
float r,
float g,
float b,
float *r_h,
float *r_s,
float *r_l)
261 const float cmax =
max_fff(
r, g, b);
262 const float cmin =
min_fff(
r, g, b);
263 float h, s,
l =
min_ff(1.0, (cmax + cmin) / 2.0f);
269 float d = cmax - cmin;
270 s =
l > 0.5f ? d / (2.0f - cmax - cmin) : d / (cmax + cmin);
272 h = (g - b) / d + (g < b ? 6.0f : 0.0f);
274 else if (cmax == g) {
275 h = (b -
r) / d + 2.0f;
278 h = (
r - g) / d + 4.0f;
290 const float orig_s = *r_s;
291 const float orig_h = *r_h;
299 else if (*r_s <= 0.0f) {
304 if (*r_h == 0.0f && orig_h >= 1.0f) {
317 rgb_to_hsl(rgb[0], rgb[1], rgb[2], &r_hsl[0], &r_hsl[1], &r_hsl[2]);
322 const float orig_h = *r_h;
323 const float orig_s = *r_s;
332 else if (*r_s <= 1
e-8) {
336 if (*r_h == 0.0f && orig_h >= 1.0f) {
350 if (
UNLIKELY(hsv[0] < 0.0f || hsv[0] > 1.0f)) {
351 hsv[0] = hsv[0] -
floorf(hsv[0]);
353 CLAMP(hsv[1], 0.0f, 1.0f);
354 CLAMP(hsv[2], 0.0f, v_max);
365 unsigned int r, g, b;
371 r = (
unsigned int)(rf * 255.0f);
372 g = (
unsigned int)(gf * 255.0f);
373 b = (
unsigned int)(bf * 255.0f);
375 col = (
r + (g * 256) + (b * 256 * 256));
381 unsigned int ir, ig, ib;
397 return (ir + (ig * 256) + (ib * 256 * 256));
402 *r_r = ((
float)(((
col)) & 0xFF)) * (1.0f / 255.0f);
403 *r_g = ((
float)(((
col) >> 8) & 0xFF)) * (1.0f / 255.0f);
404 *r_b = ((
float)(((
col) >> 16) & 0xFF)) * (1.0f / 255.0f);
409 r_col[0] = ((
float)col_ub[0]) * (1.0f / 255.0f);
410 r_col[1] = ((
float)col_ub[1]) * (1.0f / 255.0f);
411 r_col[2] = ((
float)col_ub[2]) * (1.0f / 255.0f);
416 r_col[0] = ((
float)col_ub[0]) * (1.0f / 255.0f);
417 r_col[1] = ((
float)col_ub[1]) * (1.0f / 255.0f);
418 r_col[2] = ((
float)col_ub[2]) * (1.0f / 255.0f);
419 r_col[3] = ((
float)col_ub[3]) * (1.0f / 255.0f);
437 return (
c < 0.0f) ? 0.0f :
c * (1.0f / 12.92f);
440 return powf((
c + 0.055f) * (1.0f / 1.055f), 2.4f);
445 if (
c < 0.0031308f) {
446 return (
c < 0.0f) ? 0.0f :
c * 12.92f;
449 return 1.055f *
powf(
c, 1.0f / 2.4f) - 0.055f;
509 for (
c = 0;
c < 3;
c++) {
510 offset[
c] = lift[
c] * gain[
c];
511 slope[
c] = gain[
c] * (1.0f - lift[
c]);
516 power[
c] = 1.0f / gamma[
c];
528 rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2);
530 hsv[0] += hue_offset;
534 else if (hsv[0] < 0.0f) {
538 hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2);
559 static unsigned short hipart(
const float f)
563 unsigned short us[2];
568 #ifdef __BIG_ENDIAN__
580 unsigned short us[2];
584 if (i < 0x80 || (i >= 0x8000 && i < 0x8080)) {
588 if (i >= 0x7f80 && i < 0x8000) {
595 #ifdef __BIG_ENDIAN__
617 for (i = 0; i < 0x10000; i++) {
631 for (b = 0; b <= 255; b++) {
649 {2.52432244e+03f, -1.06185848e-03f, 3.11067539e+00f},
650 {3.37763626e+03f, -4.34581697e-04f, 1.64843306e+00f},
651 {4.10671449e+03f, -8.61949938e-05f, 6.41423749e-01f},
652 {4.66849800e+03f, 2.85655028e-05f, 1.29075375e-01f},
653 {4.60124770e+03f, 2.89727618e-05f, 1.48001316e-01f},
654 {3.78765709e+03f, 9.36026367e-06f, 3.98995841e-01f},
658 {-7.50343014e+02f, 3.15679613e-04f, 4.73464526e-01f},
659 {-1.00402363e+03f, 1.29189794e-04f, 9.08181524e-01f},
660 {-1.22075471e+03f, 2.56245413e-05f, 1.20753416e+00f},
661 {-1.42546105e+03f, -4.01730887e-05f, 1.44002695e+00f},
662 {-1.18134453e+03f, -2.18913373e-05f, 1.30656109e+00f},
663 {-5.00279505e+02f, -4.59745390e-06f, 1.09090465e+00f},
667 {0.0f, 0.0f, 0.0f, 0.0f},
668 {0.0f, 0.0f, 0.0f, 0.0f},
669 {0.0f, 0.0f, 0.0f, 0.0f},
670 {-2.02524603e-11f, 1.79435860e-07f, -2.60561875e-04f, -1.41761141e-02f},
671 {-2.22463426e-13f, -1.55078698e-08f, 3.81675160e-04f, -7.30646033e-01f},
672 {6.72595954e-13f, -2.73059993e-08f, 4.24068546e-04f, -7.52204323e-01f},
678 rgb[0] = 0.826270103f;
679 rgb[1] = 0.994478524f;
680 rgb[2] = 1.56626022f;
682 else if (
t < 965.0f) {
683 rgb[0] = 4.70366907f;
688 int i = (
t >= 6365.0f) ?
691 (
t >= 1902.0f) ? 3 : (
t >= 1449.0f) ? 2 : (
t >= 1167.0f) ? 1 : 0;
697 const float t_inv = 1.0f /
t;
698 rgb[0] =
r[0] * t_inv +
r[1] *
t +
r[2];
699 rgb[1] = g[0] * t_inv + g[1] *
t + g[2];
700 rgb[2] = ((b[0] *
t + b[1]) *
t + b[2]) *
t + b[3];
706 for (
int i = 0; i <
width; i++) {
713 r_table[i * 4 + 3] = 0.0f;
typedef float(TangentPoint)[2]
MINLINE float max_fff(float a, float b, float c)
MINLINE float max_ff(float a, float b)
MINLINE float min_ffff(float a, float b, float c, float d)
MINLINE float min_ff(float a, float b)
MINLINE float min_fff(float a, float b, float c)
#define BLI_YUV_ITU_BT709
#define BLI_YCC_JFIF_0_255
#define BLI_YCC_ITU_BT601
#define BLI_YUV_ITU_BT601
#define BLI_YCC_ITU_BT709
MINLINE void copy_v3_v3(float r[3], const float a[3])
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Group RGB to Bright Vector Camera CLAMP
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
#define unit_float_to_uchar_clamp_v4(v1, v2)
#define unit_float_to_uchar_clamp_v3(v1, v2)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
static void blackbody_temperature_to_rgb(float rgb[3], float t)
void rgb_to_hsl(float r, float g, float b, float *r_h, float *r_s, float *r_l)
static const float blackbody_table_g[6][3]
void rgb_to_hsl_compat(float r, float g, float b, float *r_h, float *r_s, float *r_l)
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3])
static const float blackbody_table_b[6][4]
unsigned int rgb_to_cpack(float r, float g, float b)
unsigned short BLI_color_to_srgb_table[0x10000]
int constrain_rgb(float *r, float *g, float *b)
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
unsigned int hsv_to_cpack(float h, float s, float v)
void hsl_to_rgb_v(const float hsl[3], float r_rgb[3])
void BLI_init_srgb_conversion(void)
void ycc_to_rgb(float y, float cb, float cr, float *r_r, float *r_g, float *r_b, int colorspace)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
void minmax_rgb(short c[3])
void rgb_to_ycc(float r, float g, float b, float *r_y, float *r_cb, float *r_cr, int colorspace)
static const float blackbody_table_r[6][3]
void rgb_to_yuv(float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
void rgb_to_hsv_compat(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
void blackbody_temperature_to_rgb_table(float *r_table, int width, float min, float max)
static unsigned short hipart(const float f)
void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
void hsv_clamp_v(float hsv[3], float v_max)
void hsl_to_rgb(float h, float s, float l, float *r_r, float *r_g, float *r_b)
void rgb_byte_set_hue_float_offset(unsigned char rgb[3], float hue_offset)
float srgb_to_linearrgb(float c)
void hex_to_rgb(const char *hexcol, float *r_r, float *r_g, float *r_b)
float BLI_color_from_srgb_table[256]
float linearrgb_to_srgb(float c)
void lift_gamma_gain_to_asc_cdl(const float *lift, const float *gamma, const float *gain, float *offset, float *slope, float *power)
void yuv_to_rgb(float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace)
void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void cpack_to_rgb(unsigned int col, float *r_r, float *r_g, float *r_b)
void rgb_to_hsl_compat_v(const float rgb[3], float r_hsl[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
static float index_to_float(const unsigned short i)
void rgb_float_set_hue_float_offset(float rgb[3], float hue_offset)