46 short default_handle_type)
49 float clipminx, clipminy, clipmaxx, clipmaxy;
56 clipminx =
min_ff(minx, maxx);
57 clipminy =
min_ff(miny, maxy);
58 clipmaxx =
max_ff(minx, maxx);
59 clipmaxy =
max_ff(miny, maxy);
67 for (a = 0; a < tot; a++) {
68 if (default_handle_type ==
HD_VECT) {
105 for (a = 0; a <
CM_TOT; a++) {
135 for (a = 0; a <
CM_TOT; a++) {
160 const float white[3],
165 for (a = 0; a < 3; a++) {
166 const float delta =
max_ff(white[a] - black[a], 1e-5f);
167 r_bwmul[a] = 1.0f / delta;
172 const float black[3],
173 const float white[3])
192 int a,
b, removed = 0;
203 for (a = 0,
b = 0; a < cuma->
totpoint; a++) {
204 if (&cuma->
curve[a] != point) {
216 return (removed != 0);
223 int a,
b, removed = 0;
226 cmp[0] = cuma->
curve[0];
227 for (a = 1,
b = 1; a < cuma->
totpoint - 1; a++) {
249 bool foundloc =
false;
253 for (a = 0,
b = 0; a < cuma->
totpoint; a++) {
319 for (
int i = 0; i < cuma->
totpoint; i++) {
330 cuma->
curve[0].
flag &= ~CUMA_HANDLE_AUTO_ANIM;
331 cuma->
curve[1].
flag &= ~CUMA_HANDLE_AUTO_ANIM;
369 for (
int i = 0; i < cuma->
totpoint; i++) {
397 cuma->
curve[0].
y = 0.025f;
399 cuma->
curve[1].
y = 0.135f;
400 cuma->
curve[2].
x = 0.298f;
409 cuma->
curve[5].
y = 0.135f;
411 cuma->
curve[6].
y = 0.025f;
415 cuma->
curve[0].
y = 0.025f;
421 cuma->
curve[2].
y = 0.025f;
431 for (i = 0; i < cuma->
totpoint; i++) {
432 newpoints[i].
y = cuma->
curve[last - i].
y;
436 cuma->
curve = newpoints;
439 const int num_points = cuma->
totpoint * 2 - 1;
442 for (
int i = 0; i < cuma->
totpoint; i++) {
443 const int src_last_point = cuma->
totpoint - i - 1;
444 const int dst_last_point = num_points - i - 1;
445 new_points[i] = cuma->
curve[src_last_point];
446 new_points[i].
x = (1.0f - cuma->
curve[src_last_point].
x) * 0.5f;
447 new_points[dst_last_point] = new_points[i];
448 new_points[dst_last_point].
x = 0.5f + cuma->
curve[src_last_point].
x * 0.5f;
452 cuma->
curve = new_points;
457 cuma->
table =
nullptr;
465 for (a = 0; a < cuma->
totpoint; a++) {
489#define p2_h1 ((p2)-3)
490#define p2_h2 ((p2) + 3)
492 const float *p1, *p3;
495 float len, len_a, len_b;
496 float dvec_a[2], dvec_b[2];
498 if (bezt->
h1 == 0 && bezt->
h2 == 0) {
504 if (prev ==
nullptr) {
506 pt[0] = 2.0f * p2[0] - p3[0];
507 pt[1] = 2.0f * p2[1] - p3[1];
514 if (
next ==
nullptr) {
516 pt[0] = 2.0f * p2[0] - p1[0];
517 pt[1] = 2.0f * p2[1] - p1[1];
539 tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a;
540 tvec[1] = dvec_b[1] / len_b + dvec_a[1] / len_a;
550 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
551 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
552 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
553 bezt->
vec[0][1] = bezt->
vec[1][1];
556 if (ydiff1 <= 0.0f) {
557 if (prev->vec[1][1] > bezt->
vec[0][1]) {
558 bezt->
vec[0][1] = prev->vec[1][1];
562 if (prev->vec[1][1] < bezt->
vec[0][1]) {
563 bezt->
vec[0][1] = prev->vec[1][1];
574 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
575 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
576 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
577 bezt->
vec[2][1] = bezt->
vec[1][1];
580 if (ydiff1 <= 0.0f) {
581 if (
next->vec[1][1] < bezt->
vec[2][1]) {
582 bezt->
vec[2][1] =
next->vec[1][1];
586 if (
next->vec[1][1] > bezt->
vec[2][1]) {
587 bezt->
vec[2][1] =
next->vec[1][1];
612 const float first[2],
621 if (cuma->
ext_in[0] == 0.0f) {
622 return first[1] + cuma->
ext_in[1] * 10000.0f;
625 return first[1] + cuma->
ext_in[1] * (x - first[0]) / cuma->
ext_in[0];
633 if (cuma->
ext_out[0] == 0.0f) {
634 return last[1] - cuma->
ext_out[1] * 10000.0f;
637 return last[1] + cuma->
ext_out[1] * (x - last[0]) / cuma->
ext_out[0];
648 start[1][0], start[2][0], end[0][0], end[1][0], point,
CM_RESOL - 1,
sizeof(
float[2]));
650 start[1][1], start[2][1], end[0][1], end[1][1], point + 1,
CM_RESOL - 1,
sizeof(
float[2]));
665 if (cuma->
curve ==
nullptr) {
682 for (
int a = 0; a < bezt_totpoint; a++) {
685 bezt[a].
vec[1][0] = cmp[a].
x;
686 bezt[a].
vec[1][1] = cmp[a].
y;
714 BezTriple bezt_pre = bezt[bezt_totpoint - 1];
722 bezt_pre.
h1 = bezt_pre.
h2 = bezt[bezt_totpoint - 1].
h2;
723 bezt_pre.
vec[1][0] = bezt[bezt_totpoint - 1].
vec[1][0] - table_range;
724 bezt_pre.
vec[1][1] = bezt[bezt_totpoint - 1].
vec[1][1];
726 bezt_post.
h1 = bezt_post.
h2 = bezt[0].
h1;
727 bezt_post.
vec[1][0] = bezt[0].
vec[1][0] + table_range;
728 bezt_post.
vec[1][1] = bezt[0].
vec[1][1];
730 bezt_prev = &bezt_pre;
731 bezt_post_ptr = &bezt_post;
735 bezt_post_ptr =
nullptr;
739 for (
int a = 0; a < bezt_totpoint; a++) {
740 bezt_next = (a != bezt_totpoint - 1) ? &bezt[a + 1] : bezt_post_ptr;
742 bezt_prev = &bezt[a];
746 bezt_pre.
vec[0][0] = bezt[bezt_totpoint - 1].
vec[0][0] - table_range;
747 bezt_pre.
vec[0][1] = bezt[bezt_totpoint - 1].
vec[0][1];
748 bezt_pre.
vec[2][0] = bezt[bezt_totpoint - 1].
vec[2][0] - table_range;
749 bezt_pre.
vec[2][1] = bezt[bezt_totpoint - 1].
vec[2][1];
751 bezt_post.
vec[0][0] = bezt[0].
vec[0][0] + table_range;
752 bezt_post.
vec[0][1] = bezt[0].
vec[0][1];
753 bezt_post.
vec[2][0] = bezt[0].
vec[2][0] + table_range;
754 bezt_post.
vec[2][1] = bezt[0].
vec[2][1];
758 if (bezt_totpoint > 2 && !use_wrapping) {
759 float hlen, nlen, vec[3];
763 hlen =
len_v3v3(bezt[0].vec[1], bezt[0].vec[2]);
766 if (vec[0] < bezt[0].vec[1][0]) {
767 vec[0] = bezt[0].
vec[1][0];
772 if (nlen > FLT_EPSILON) {
778 int a = bezt_totpoint - 1;
781 hlen =
len_v3v3(bezt[a].vec[1], bezt[a].vec[0]);
784 if (vec[0] > bezt[a].vec[1][0]) {
785 vec[0] = bezt[a].
vec[1][0];
790 if (nlen > FLT_EPSILON) {
803 const int totpoint = use_wrapping ? (bezt_totpoint + 1) *
CM_RESOL :
805 float *allpoints =
static_cast<float *
>(
MEM_callocN(totpoint * 2 *
sizeof(
float),
"table"));
806 float *point = allpoints;
815 for (
int a = 0; a < bezt_totpoint - 1; a++, point += 2 *
CM_RESOL) {
826 cuma->
ext_in[0] = bezt[0].
vec[0][0] - bezt[0].
vec[1][0];
827 cuma->
ext_in[1] = bezt[0].
vec[0][1] - bezt[0].
vec[1][1];
830 cuma->
ext_in[0] /= ext_in_range;
831 cuma->
ext_in[1] /= ext_in_range;
833 int out_a = bezt_totpoint - 1;
834 cuma->
ext_out[0] = bezt[out_a].
vec[1][0] - bezt[out_a].
vec[2][0];
835 cuma->
ext_out[1] = bezt[out_a].
vec[1][1] - bezt[out_a].
vec[2][1];
838 cuma->
ext_out[0] /= ext_out_range;
839 cuma->
ext_out[1] /= ext_out_range;
848 float *firstpoint = allpoints;
849 float *lastpoint = allpoints + 2 * (totpoint - 1);
855 for (
int a = 0; a <=
CM_TABLE; a++) {
860 while (cur_x >= point[0] && point != lastpoint) {
864 if ((point == firstpoint || (point == lastpoint && cur_x >= point[0])) && !use_wrapping) {
876 float fac1 = point[0] - point[-2];
877 float fac2 = point[0] - cur_x;
878 if (fac1 > FLT_EPSILON) {
884 cmp[a].
y = fac1 * point[-1] + (1.0f - fac1) * point[1];
900 for (a = 0; a < 3; a++) {
911 cumap->
flag &= ~CUMA_PREMULLED;
917 for (a = 0; a < 3; a++) {
918 if (cumap->
cm[a].
table ==
nullptr) {
928 if (cumap->
cm[3].
table ==
nullptr) {
933 for (a = 0; a < 3; a++) {
959 float dx = 0.0f, dy = 0.0f;
966 for (a = 0; a < cuma->
totpoint; a++) {
971 else if (cmp[a].x > clipr->
xmax) {
977 else if (cmp[a].y > clipr->
ymax) {
982 for (a = 0; a < cuma->
totpoint; a++) {
1000 std::stable_sort(cuma->
curve,
1005 if (rem_doubles && cuma->
totpoint > 2) {
1006 for (a = 0; a < cuma->
totpoint - 1; a++) {
1007 dx = cmp[a].
x - cmp[a + 1].
x;
1008 dy = cmp[a].
y - cmp[a + 1].
y;
1009 if (
sqrtf(dx * dx + dy * dy) < thresh) {
1034 int a, cur = cumap->
cur;
1036 for (a = 0; a <
CM_TOT; a++) {
1070 return (1.0f - fi) * cuma->
table[i].
y + (fi)*cuma->
table[i + 1].
y;
1080 if (val < cumap->clipr.ymin) {
1100 const float vecin[3])
1144 const CurveMap *curve_map = curve_mapping->
cm + 3;
1157 const float scaling_ratio = (new_max - new_min) / (maximum - minimum);
1158 const float new_median = new_min + (median - minimum) * scaling_ratio;
1162 input.y == minimum ? new_min : new_median,
1163 input.z == minimum ? new_min : new_median);
1164 return blender::float3(input.x == maximum ? new_max : median_or_min.x,
1165 input.y == maximum ? new_max : median_or_min.y,
1166 input.z == maximum ? new_max : median_or_min.z);
1171 const float vecin[3],
1172 const float black[3],
1173 const float bwmul[3])
1175 const float r = (vecin[0] - black[0]) * bwmul[0];
1176 const float g = (vecin[1] - black[1]) * bwmul[1];
1177 const float b = (vecin[2] - black[2]) * bwmul[2];
1178 const float balanced_color[3] = {r, g,
b};
1180 switch (cumap->
tone) {
1198 const float vecin[3])
1204 uchar vecout_byte[3],
1205 const uchar vecin_byte[3])
1207 float vecin[3], vecout[3];
1209 vecin[0] =
float(vecin_byte[0]) / 255.0f;
1210 vecin[1] =
float(vecin_byte[1]) / 255.0f;
1211 vecin[2] =
float(vecin_byte[2]) / 255.0f;
1222 if (cumap->
black[0] != 0.0f) {
1225 if (cumap->
black[1] != 0.0f) {
1228 if (cumap->
black[2] != 0.0f) {
1231 if (cumap->
white[0] != 1.0f) {
1234 if (cumap->
white[1] != 1.0f) {
1237 if (cumap->
white[2] != 1.0f) {
1241 for (
int a = 0; a <
CM_TOT; a++) {
1247 if (cumap->
cm[a].
curve[0].
x != 0.0f) {
1250 if (cumap->
cm[a].
curve[0].
y != 0.0f) {
1253 if (cumap->
cm[a].
curve[1].
x != 1.0f) {
1256 if (cumap->
cm[a].
curve[1].
y != 1.0f) {
1266 for (
int i = 0; i <
CM_TOT; i++) {
1274 for (
int i = 0; i <
CM_TOT; i++) {
1275 const CurveMap *curve_map = &curve_mapping->
cm[i];
1281 float start_slopes[
CM_TOT],
1282 float end_slopes[
CM_TOT])
1284 float range_dividers[
CM_TOT];
1286 for (
int i = 0; i <
CM_TOT; i++) {
1287 const CurveMap *curve_map = &curve_mapping->
cm[i];
1290 start_slopes[i] = 0.0f;
1291 end_slopes[i] = 0.0f;
1295 if (curve_map->
ext_in[0] != 0.0f) {
1296 start_slopes[i] = curve_map->
ext_in[1] / (curve_map->
ext_in[0] * range_dividers[i]);
1299 start_slopes[i] = 1e8f;
1302 if (curve_map->
ext_out[0] != 0.0f) {
1303 end_slopes[i] = curve_map->
ext_out[1] / (curve_map->
ext_out[0] * range_dividers[i]);
1306 end_slopes[i] = 1e8f;
1316 const CurveMap *curve_map = &curve_mapping->
cm[index];
1329 if (curve_map->
curve[0].
x != 0 || curve_map->
curve[0].
y != 0) {
1332 if (curve_map->
curve[1].
x != 0 || curve_map->
curve[1].
y != 0) {
1342 if (cumap ==
nullptr) {
1346 for (a = 0; a <
CM_TOT; a++) {
1347 if (cumap->
cm[a].
table ==
nullptr) {
1358 *
array =
static_cast<float *
>(
MEM_callocN(
sizeof(
float) * (*size) * 4,
"CurveMapping"));
1360 for (a = 0; a < *
size; a++) {
1362 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1372 *
array =
static_cast<float *
>(
MEM_callocN(
sizeof(
float) * (*size) * 4,
"CurveMapping"));
1374 for (a = 0; a < *
size; a++) {
1376 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1379 (*array)[a * 4 + 1] = cumap->
cm[1].
table[a].
y;
1382 (*array)[a * 4 + 2] = cumap->
cm[2].
table[a].
y;
1385 (*array)[a * 4 + 3] = cumap->
cm[3].
table[a].
y;
1398 for (
int a = 0; a <
CM_TOT; a++) {
1406 cumap->
flag &= ~CUMA_PREMULLED;
1408 for (
int a = 0; a <
CM_TOT; a++) {
1417#define INV_255 (1.0f / 255.0f)
1421 int bin =
int((f * 255.0f) + 0.5f);
1430 Scopes *scopes,
const int idx,
const float fx,
const float rgb[3],
const float ycc[3])
1436 scopes->
vecscope[idx + 0] = yuv[1];
1437 scopes->
vecscope[idx + 1] = yuv[2];
1439 int color_idx = (idx / 2) * 3;
1481 int x1 = roundf(hist->
co[0][0] * ibuf->
x);
1482 int x2 = roundf(hist->
co[1][0] * ibuf->
x);
1483 int y1 = roundf(hist->
co[0][1] * ibuf->
y);
1484 int y2 = roundf(hist->
co[1][1] * ibuf->
y);
1501 for (i = 0; i < 256; i++) {
1502 x =
int(0.5f + x1 +
float(i) * (x2 - x1) / 255.0f);
1503 y =
int(0.5f + y1 +
float(i) * (y2 - y1) / 255.0f);
1537 hist->
data_r[i] = rgba[0];
1538 hist->
data_g[i] = rgba[1];
1539 hist->
data_b[i] = rgba[2];
1540 hist->
data_a[i] = rgba[3];
1582 Scopes *scopes = data->scopes;
1583 const ImBuf *ibuf = data->ibuf;
1585 const uchar *display_buffer = data->display_buffer;
1586 const int ycc_mode = data->ycc_mode;
1594 float *
min = data_chunk->
min;
1595 float *max = data_chunk->
max;
1597 const float *rf =
nullptr;
1598 const uchar *rc =
nullptr;
1599 const int rows_per_sample_line = ibuf->
y / scopes->
sample_lines;
1600 const int savedlines = y / rows_per_sample_line;
1601 const bool do_sample_line = (savedlines < scopes->
sample_lines) &&
1602 (y % rows_per_sample_line) == 0;
1609 rc = display_buffer + size_t(y) * ibuf->
x * ibuf->
channels;
1612 for (
int x = 0; x < ibuf->
x; x++) {
1613 float rgba[4], ycc[3], luma;
1639 for (
int c = 4; c--;) {
1648 if (ycc_mode == -1) {
1652 rgb_to_ycc(rgba[0], rgba[1], rgba[2], &ycc[0], &ycc[1], &ycc[2], ycc_mode);
1664 if (do_sample_line) {
1666 const int idx = 2 * (ibuf->
x * savedlines +
x);
1676 void *__restrict chunk_join,
1677 void *__restrict chunk)
1688 const uint *bin_r_c = data_chunk->
bin_r;
1689 const uint *bin_g_c = data_chunk->
bin_g;
1690 const uint *bin_b_c = data_chunk->
bin_b;
1691 const uint *bin_a_c = data_chunk->
bin_a;
1693 const float *
min = data_chunk->
min;
1694 const float *max = data_chunk->
max;
1696 for (
int b = 256;
b--;) {
1697 bin_lum[
b] += bin_lum_c[
b];
1698 bin_r[
b] += bin_r_c[
b];
1699 bin_g[
b] += bin_g_c[
b];
1700 bin_b[
b] += bin_b_c[
b];
1701 bin_a[
b] += bin_a_c[
b];
1704 for (
int c = 3; c--;) {
1705 if (
min[c] < join_chunk->
min[c]) {
1706 join_chunk->
min[c] =
min[c];
1708 if (max[c] > join_chunk->
max[c]) {
1709 join_chunk->
max[c] = max[c];
1720 uint nl, na, nr, ng, nb;
1721 double divl, diva, divr, divg, divb;
1722 const uchar *display_buffer =
nullptr;
1724 void *cache_handle =
nullptr;
1731 if (scopes->
ok == 1) {
1774 for (a = 0; a < 3; a++) {
1775 scopes->
minmax[a][0] = 25500.0f;
1776 scopes->
minmax[a][1] = -25500.0f;
1803 scopes->
vecscope =
static_cast<float *
>(
1813 ibuf, view_settings, display_settings, &cache_handle);
1820 data.cm_processor = cm_processor;
1821 data.display_buffer = display_buffer;
1822 data.ycc_mode = ycc_mode;
1829 settings.use_threading = (ibuf->
y > 256);
1830 settings.userdata_chunk = &data_chunk;
1831 settings.userdata_chunk_size =
sizeof(data_chunk);
1836 nl = na = nr = nb = ng = 0;
1837 for (a = 0; a < 256; a++) {
1838 if (data_chunk.
bin_lum[a] > nl) {
1841 if (data_chunk.
bin_r[a] > nr) {
1842 nr = data_chunk.
bin_r[a];
1844 if (data_chunk.
bin_g[a] > ng) {
1845 ng = data_chunk.
bin_g[a];
1847 if (data_chunk.
bin_b[a] > nb) {
1848 nb = data_chunk.
bin_b[a];
1850 if (data_chunk.
bin_a[a] > na) {
1851 na = data_chunk.
bin_a[a];
1854 divl = nl ? 1.0 /
double(nl) : 1.0;
1855 diva = na ? 1.0 /
double(na) : 1.0;
1856 divr = nr ? 1.0 /
double(nr) : 1.0;
1857 divg = ng ? 1.0 /
double(ng) : 1.0;
1858 divb = nb ? 1.0 /
double(nb) : 1.0;
1860 for (a = 0; a < 256; a++) {
1908 STRNCPY(settings->display_device, display_name);
1920 const char *view_transform)
1925 if (!view_transform) {
1934 view_settings->
flag = 0;
1935 view_settings->
gamma = 1.0f;
1954 new_settings->
flag = settings->flag;
1955 new_settings->
exposure = settings->exposure;
1956 new_settings->
gamma = settings->gamma;
1957 new_settings->
temperature = settings->temperature;
1958 new_settings->
tint = settings->tint;
1960 if (settings->curve_mapping) {
1970 if (settings->curve_mapping) {
1972 settings->curve_mapping =
nullptr;
1979 if (settings->curve_mapping) {
1989 if (settings->curve_mapping) {
2004 STRNCPY(colorspace_settings->
name, settings->name);
void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2])
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
#define BLI_assert_unreachable()
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE int compare_ff(float a, float b, float max_diff)
#define BLI_YUV_ITU_BT709
#define BLI_YCC_JFIF_0_255
#define BLI_YCC_ITU_BT601
void rgb_to_ycc(float r, float g, float b, float *r_y, float *r_cb, float *r_cr, int colorspace)
void rgb_to_yuv(float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
#define BLI_YCC_ITU_BT709
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void mul_v2_v2(float r[2], const float a[2])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define STRNCPY(dst, src)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
#define INIT_MINMAX(min, max)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr)
#define BLO_read_struct_array(reader, struct_name, array_size, ptr_p)
#define BLO_read_struct(reader, struct_name, ptr_p)
typedef double(DMatrix)[4][4]
@ CUMA_EXTEND_EXTRAPOLATE
@ SCOPES_WAVEFRM_YCC_JPEG
@ SCOPES_WAVEFRM_RGB_PARADE
@ CURVE_PRESET_CONSTANT_MEDIAN
ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
unsigned char * IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, void **cache_handle)
const char * IMB_colormanagement_display_get_default_view_transform_name(ColorManagedDisplay *display)
BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char[3])
ColormanageProcessor * IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_init_default_view_settings(ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_validate_settings(const ColorManagedDisplaySettings *display_settings, ColorManagedViewSettings *view_settings)
void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor, float pixel[3])
void IMB_display_buffer_release(void *cache_handle)
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
void IMB_colormanagement_processor_free(ColormanageProcessor *cm_processor)
void IMB_colormanagement_processor_apply_v4(ColormanageProcessor *cm_processor, float pixel[4])
const char * IMB_colormanagement_display_get_default_name()
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_dupallocN)(const void *vmemh)
#define unit_float_to_uchar_clamp(val)
T reduce_max(const VecBase< T, Size > &a)
T reduce_min(const VecBase< T, Size > &a)
T min(const T &a, const T &b)
T max(const T &a, const T &b)
VecBase< float, 3 > float3
struct CurveMapping * curve_mapping
CurveMapPoint * premultable
short default_handle_type
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
ColormanageProcessor * cm_processor
const uchar * display_buffer