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) {
104 for (a = 0; a <
CM_TOT; a++) {
134 for (a = 0; a <
CM_TOT; a++) {
159 const float white[3],
164 for (a = 0; a < 3; a++) {
165 const float delta =
max_ff(white[a] - black[a], 1e-5f);
166 r_bwmul[a] = 1.0f / delta;
171 const float black[3],
172 const float white[3])
191 int a,
b, removed = 0;
201 for (a = 0,
b = 0; a < cuma->
totpoint; a++) {
202 if (&cuma->
curve[a] != point) {
214 return (removed != 0);
220 int a,
b, removed = 0;
223 cmp[0] = cuma->
curve[0];
224 for (a = 1,
b = 1; a < cuma->
totpoint - 1; a++) {
246 bool foundloc =
false;
250 for (a = 0,
b = 0; a < cuma->
totpoint; a++) {
342 cuma->
curve[1].
y = 0.5625;
346 cuma->
curve[3].
y = 0.0625;
392 cuma->
curve[2].
x = 0.6765;
393 cuma->
curve[2].
y = 0.7364;
394 cuma->
curve[3].
x = 0.8582;
395 cuma->
curve[3].
y = 0.5133;
397 cuma->
curve[4].
y = 0.2547;
410 cuma->
curve[4].
x = 0.9375;
423 cuma->
curve[0].
y = 0.025f;
425 cuma->
curve[1].
y = 0.135f;
426 cuma->
curve[2].
x = 0.298f;
435 cuma->
curve[5].
y = 0.135f;
437 cuma->
curve[6].
y = 0.025f;
441 cuma->
curve[0].
y = 0.025f;
447 cuma->
curve[2].
y = 0.025f;
468 newpoints[
i].
x = 1.0f - cuma->
curve[last -
i].
x;
469 newpoints[
i].
y = cuma->
curve[last -
i].
y;
472 cuma->
curve = newpoints;
476 const int num_points = cuma->
totpoint * 2 - 1;
478 "curve symmetric points");
480 const int src_last_point = cuma->
totpoint -
i - 1;
481 const int dst_last_point = num_points -
i - 1;
482 new_points[
i] = cuma->
curve[src_last_point];
483 new_points[
i].
x = (1.0f - cuma->
curve[src_last_point].
x) * 0.5f;
484 new_points[dst_last_point] = new_points[
i];
485 new_points[dst_last_point].
x = 0.5f + cuma->
curve[src_last_point].
x * 0.5f;
489 cuma->
curve = new_points;
494 cuma->
table =
nullptr;
502 for (a = 0; a < cuma->
totpoint; a++) {
526#define p2_h1 ((p2) - 3)
527#define p2_h2 ((p2) + 3)
529 const float *p1, *p3;
532 float len, len_a, len_b;
533 float dvec_a[2], dvec_b[2];
535 if (bezt->
h1 == 0 && bezt->
h2 == 0) {
541 if (prev ==
nullptr) {
543 pt[0] = 2.0f * p2[0] - p3[0];
544 pt[1] = 2.0f * p2[1] - p3[1];
551 if (
next ==
nullptr) {
553 pt[0] = 2.0f * p2[0] - p1[0];
554 pt[1] = 2.0f * p2[1] - p1[1];
576 tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a;
577 tvec[1] = dvec_b[1] / len_b + dvec_a[1] / len_a;
587 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
588 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
589 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
590 bezt->
vec[0][1] = bezt->
vec[1][1];
593 if (ydiff1 <= 0.0f) {
594 bezt->
vec[0][1] = std::max(prev->vec[1][1], bezt->
vec[0][1]);
597 bezt->
vec[0][1] = std::min(prev->vec[1][1], bezt->
vec[0][1]);
607 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
608 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
609 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
610 bezt->
vec[2][1] = bezt->
vec[1][1];
613 if (ydiff1 <= 0.0f) {
614 bezt->
vec[2][1] = std::min(
next->vec[1][1], bezt->
vec[2][1]);
617 bezt->
vec[2][1] = std::max(
next->vec[1][1], bezt->
vec[2][1]);
641 const float first[2],
650 if (cuma->
ext_in[0] == 0.0f) {
651 return first[1] + cuma->
ext_in[1] * 10000.0f;
654 return first[1] + cuma->
ext_in[1] * (
x - first[0]) / cuma->
ext_in[0];
662 if (cuma->
ext_out[0] == 0.0f) {
663 return last[1] - cuma->
ext_out[1] * 10000.0f;
677 start[1][0], start[2][0], end[0][0], end[1][0], point,
CM_RESOL - 1,
sizeof(
float[2]));
679 start[1][1], start[2][1], end[0][1], end[1][1], point + 1,
CM_RESOL - 1,
sizeof(
float[2]));
694 if (cuma->
curve ==
nullptr) {
710 for (
int a = 0; a < bezt_totpoint; a++) {
713 bezt[a].
vec[1][0] = cmp[a].
x;
714 bezt[a].
vec[1][1] = cmp[a].
y;
742 BezTriple bezt_pre = bezt[bezt_totpoint - 1];
750 bezt_pre.
h1 = bezt_pre.
h2 = bezt[bezt_totpoint - 1].
h2;
751 bezt_pre.
vec[1][0] = bezt[bezt_totpoint - 1].
vec[1][0] - table_range;
752 bezt_pre.
vec[1][1] = bezt[bezt_totpoint - 1].
vec[1][1];
754 bezt_post.
h1 = bezt_post.
h2 = bezt[0].
h1;
755 bezt_post.
vec[1][0] = bezt[0].
vec[1][0] + table_range;
756 bezt_post.
vec[1][1] = bezt[0].
vec[1][1];
758 bezt_prev = &bezt_pre;
759 bezt_post_ptr = &bezt_post;
763 bezt_post_ptr =
nullptr;
767 for (
int a = 0; a < bezt_totpoint; a++) {
768 bezt_next = (a != bezt_totpoint - 1) ? &bezt[a + 1] : bezt_post_ptr;
770 bezt_prev = &bezt[a];
774 bezt_pre.
vec[0][0] = bezt[bezt_totpoint - 1].
vec[0][0] - table_range;
775 bezt_pre.
vec[0][1] = bezt[bezt_totpoint - 1].
vec[0][1];
776 bezt_pre.
vec[2][0] = bezt[bezt_totpoint - 1].
vec[2][0] - table_range;
777 bezt_pre.
vec[2][1] = bezt[bezt_totpoint - 1].
vec[2][1];
779 bezt_post.
vec[0][0] = bezt[0].
vec[0][0] + table_range;
780 bezt_post.
vec[0][1] = bezt[0].
vec[0][1];
781 bezt_post.
vec[2][0] = bezt[0].
vec[2][0] + table_range;
782 bezt_post.
vec[2][1] = bezt[0].
vec[2][1];
786 if (bezt_totpoint > 2 && !use_wrapping) {
787 float hlen, nlen, vec[3];
791 hlen =
len_v3v3(bezt[0].vec[1], bezt[0].vec[2]);
794 vec[0] = std::max(vec[0], bezt[0].vec[1][0]);
798 if (nlen > FLT_EPSILON) {
804 int a = bezt_totpoint - 1;
807 hlen =
len_v3v3(bezt[a].vec[1], bezt[a].vec[0]);
810 vec[0] = std::min(vec[0], bezt[a].vec[1][0]);
814 if (nlen > FLT_EPSILON) {
827 const int totpoint = use_wrapping ? (bezt_totpoint + 1) *
CM_RESOL :
830 float *point = allpoints;
839 for (
int a = 0; a < bezt_totpoint - 1; a++, point += 2 *
CM_RESOL) {
850 cuma->
ext_in[0] = bezt[0].
vec[0][0] - bezt[0].
vec[1][0];
851 cuma->
ext_in[1] = bezt[0].
vec[0][1] - bezt[0].
vec[1][1];
854 cuma->
ext_in[0] /= ext_in_range;
855 cuma->
ext_in[1] /= ext_in_range;
857 int out_a = bezt_totpoint - 1;
858 cuma->
ext_out[0] = bezt[out_a].
vec[1][0] - bezt[out_a].
vec[2][0];
859 cuma->
ext_out[1] = bezt[out_a].
vec[1][1] - bezt[out_a].
vec[2][1];
862 cuma->
ext_out[0] /= ext_out_range;
863 cuma->
ext_out[1] /= ext_out_range;
869 cuma->
range = 1.0f / range;
872 float *firstpoint = allpoints;
873 float *lastpoint = allpoints + 2 * (totpoint - 1);
878 for (
int a = 0; a <=
CM_TABLE; a++) {
883 while (cur_x >= point[0] && point != lastpoint) {
887 if ((point == firstpoint || (point == lastpoint && cur_x >= point[0])) && !use_wrapping) {
899 float fac1 = point[0] - point[-2];
900 float fac2 = point[0] - cur_x;
901 if (fac1 > FLT_EPSILON) {
907 cmp[a].
y = fac1 * point[-1] + (1.0f - fac1) * point[1];
923 for (a = 0; a < 3; a++) {
940 for (a = 0; a < 3; a++) {
941 if (cumap->
cm[a].
table ==
nullptr) {
950 if (cumap->
cm[3].
table ==
nullptr) {
955 for (a = 0; a < 3; a++) {
981 float dx = 0.0f, dy = 0.0f;
988 for (a = 0; a < cuma->
totpoint; a++) {
993 else if (cmp[a].
x > clipr->
xmax) {
999 else if (cmp[a].
y > clipr->
ymax) {
1004 for (a = 0; a < cuma->
totpoint; a++) {
1022 std::stable_sort(cuma->
curve,
1027 if (rem_doubles && cuma->
totpoint > 2) {
1028 for (a = 0; a < cuma->
totpoint - 1; a++) {
1029 dx = cmp[a].
x - cmp[a + 1].
x;
1030 dy = cmp[a].
y - cmp[a + 1].
y;
1031 if (
sqrtf(dx * dx + dy * dy) < thresh) {
1056 int a, cur = cumap->
cur;
1058 for (a = 0; a <
CM_TOT; a++) {
1092 return (1.0f - fi) * cuma->
table[
i].
y + (fi)*cuma->
table[
i + 1].
y;
1102 if (val < cumap->clipr.ymin) {
1122 const float vecin[3])
1166 const CurveMap *curve_map = curve_mapping->
cm + 3;
1179 const float scaling_ratio = (new_max - new_min) / (maximum - minimum);
1180 const float new_median = new_min + (median - minimum) * scaling_ratio;
1184 input.y == minimum ? new_min : new_median,
1185 input.z == minimum ? new_min : new_median);
1187 input.y == maximum ? new_max : median_or_min.y,
1188 input.z == maximum ? new_max : median_or_min.z);
1193 const float vecin[3],
1194 const float black[3],
1195 const float bwmul[3])
1197 const float r = (vecin[0] - black[0]) * bwmul[0];
1198 const float g = (vecin[1] - black[1]) * bwmul[1];
1199 const float b = (vecin[2] - black[2]) * bwmul[2];
1200 const float balanced_color[3] = {r, g,
b};
1202 switch (cumap->
tone) {
1220 const float vecin[3])
1226 uchar vecout_byte[3],
1227 const uchar vecin_byte[3])
1229 float vecin[3], vecout[3];
1231 vecin[0] =
float(vecin_byte[0]) / 255.0f;
1232 vecin[1] =
float(vecin_byte[1]) / 255.0f;
1233 vecin[2] =
float(vecin_byte[2]) / 255.0f;
1244 if (cumap->
black[0] != 0.0f) {
1247 if (cumap->
black[1] != 0.0f) {
1250 if (cumap->
black[2] != 0.0f) {
1253 if (cumap->
white[0] != 1.0f) {
1256 if (cumap->
white[1] != 1.0f) {
1259 if (cumap->
white[2] != 1.0f) {
1263 for (
int a = 0; a <
CM_TOT; a++) {
1269 if (cumap->
cm[a].
curve[0].
x != 0.0f) {
1272 if (cumap->
cm[a].
curve[0].
y != 0.0f) {
1275 if (cumap->
cm[a].
curve[1].
x != 1.0f) {
1278 if (cumap->
cm[a].
curve[1].
y != 1.0f) {
1297 const CurveMap *curve_map = &curve_mapping->
cm[
i];
1303 float start_slopes[
CM_TOT],
1304 float end_slopes[
CM_TOT])
1306 float range_dividers[
CM_TOT];
1309 const CurveMap *curve_map = &curve_mapping->
cm[
i];
1312 start_slopes[
i] = 0.0f;
1313 end_slopes[
i] = 0.0f;
1317 if (curve_map->
ext_in[0] != 0.0f) {
1318 start_slopes[
i] = curve_map->
ext_in[1] / (curve_map->
ext_in[0] * range_dividers[
i]);
1321 start_slopes[
i] = 1e8f;
1324 if (curve_map->
ext_out[0] != 0.0f) {
1325 end_slopes[
i] = curve_map->
ext_out[1] / (curve_map->
ext_out[0] * range_dividers[
i]);
1328 end_slopes[
i] = 1e8f;
1338 const CurveMap *curve_map = &curve_mapping->
cm[index];
1351 if (curve_map->
curve[0].
x != 0 || curve_map->
curve[0].
y != 0) {
1354 if (curve_map->
curve[1].
x != 0 || curve_map->
curve[1].
y != 0) {
1364 if (cumap ==
nullptr) {
1368 for (a = 0; a <
CM_TOT; a++) {
1369 if (cumap->
cm[a].
table ==
nullptr) {
1382 for (a = 0; a < *
size; a++) {
1384 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1396 for (a = 0; a < *
size; a++) {
1398 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1401 (*array)[a * 4 + 1] = cumap->
cm[1].
table[a].
y;
1404 (*array)[a * 4 + 2] = cumap->
cm[2].
table[a].
y;
1407 (*array)[a * 4 + 3] = cumap->
cm[3].
table[a].
y;
1420 for (
int a = 0; a <
CM_TOT; a++) {
1430 for (
int a = 0; a <
CM_TOT; a++) {
1439#define INV_255 (1.0f / 255.0f)
1443 int bin = int((f * 255.0f) + 0.5f);
1452 Scopes *scopes,
const int idx,
const float fx,
const float rgb[3],
const float ycc[3])
1461 int color_idx = (idx / 2) * 3;
1503 int x1 =
roundf(hist->
co[0][0] * ibuf->
x);
1504 int x2 =
roundf(hist->
co[1][0] * ibuf->
x);
1505 int y1 =
roundf(hist->
co[0][1] * ibuf->
y);
1506 int y2 =
roundf(hist->
co[1][1] * ibuf->
y);
1523 for (
i = 0;
i < 256;
i++) {
1524 x = int(0.5f + x1 +
float(
i) * (x2 - x1) / 255.0f);
1525 y = int(0.5f + y1 +
float(
i) * (y2 - y1) / 255.0f);
1607 const uchar *display_buffer =
data->display_buffer;
1608 const int ycc_mode =
data->ycc_mode;
1616 float *
min = data_chunk->
min;
1617 float *
max = data_chunk->
max;
1619 const float *rf =
nullptr;
1620 const uchar *rc =
nullptr;
1621 const int rows_per_sample_line = ibuf->
y / scopes->
sample_lines;
1622 const int savedlines =
y / rows_per_sample_line;
1623 const bool do_sample_line = (savedlines < scopes->
sample_lines) &&
1624 (
y % rows_per_sample_line) == 0;
1631 rc = display_buffer + size_t(
y) * ibuf->
x * ibuf->
channels;
1634 for (
int x = 0;
x < ibuf->
x;
x++) {
1635 float rgba[4], ycc[3], luma;
1661 for (
int c = 4; c--;) {
1670 if (ycc_mode == -1) {
1674 rgb_to_ycc(rgba[0], rgba[1], rgba[2], &ycc[0], &ycc[1], &ycc[2], ycc_mode);
1686 if (do_sample_line) {
1688 const int idx = 2 * (ibuf->
x * savedlines +
x);
1698 void *__restrict chunk_join,
1699 void *__restrict chunk)
1710 const uint *bin_r_c = data_chunk->
bin_r;
1711 const uint *bin_g_c = data_chunk->
bin_g;
1712 const uint *bin_b_c = data_chunk->
bin_b;
1713 const uint *bin_a_c = data_chunk->
bin_a;
1715 const float *
min = data_chunk->
min;
1716 const float *
max = data_chunk->
max;
1718 for (
int b = 256;
b--;) {
1719 bin_lum[
b] += bin_lum_c[
b];
1720 bin_r[
b] += bin_r_c[
b];
1721 bin_g[
b] += bin_g_c[
b];
1722 bin_b[
b] += bin_b_c[
b];
1723 bin_a[
b] += bin_a_c[
b];
1726 for (
int c = 3; c--;) {
1727 join_chunk->
min[c] = std::min(
min[c], join_chunk->
min[c]);
1728 join_chunk->
max[c] = std::max(
max[c], join_chunk->
max[c]);
1738 uint nl, na, nr, ng, nb;
1739 double divl, diva, divr, divg, divb;
1740 const uchar *display_buffer =
nullptr;
1742 void *cache_handle =
nullptr;
1749 if (scopes->
ok == 1) {
1792 for (a = 0; a < 3; a++) {
1793 scopes->
minmax[a][0] = 25500.0f;
1794 scopes->
minmax[a][1] = -25500.0f;
1816 "waveform point channel 1");
1818 "waveform point channel 2");
1820 "waveform point channel 3");
1822 "vectorscope point channel");
1824 "vectorscope color channel");
1831 ibuf, view_settings, display_settings, &cache_handle);
1836 data.scopes = scopes;
1838 data.cm_processor = cm_processor;
1839 data.display_buffer = display_buffer;
1840 data.ycc_mode = ycc_mode;
1854 nl = na = nr = nb = ng = 0;
1855 for (a = 0; a < 256; a++) {
1856 nl = std::max(data_chunk.
bin_lum[a], nl);
1857 nr = std::max(data_chunk.
bin_r[a], nr);
1858 ng = std::max(data_chunk.
bin_g[a], ng);
1859 nb = std::max(data_chunk.
bin_b[a], nb);
1860 na = std::max(data_chunk.
bin_a[a], na);
1862 divl = nl ? 1.0 / double(nl) : 1.0;
1863 diva = na ? 1.0 / double(na) : 1.0;
1864 divr = nr ? 1.0 / double(nr) : 1.0;
1865 divg = ng ? 1.0 / double(ng) : 1.0;
1866 divb = nb ? 1.0 / double(nb) : 1.0;
1868 for (a = 0; a < 256; a++) {
1929 const char *view_transform)
1935 if (!view_transform) {
1944 view_settings->
flag = 0;
1945 view_settings->
gamma = 1.0f;
1971 new_settings->
flag = settings->
flag;
1975 new_settings->
tint = settings->
tint;
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_UTF8(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)
@ CUMA_EXTEND_EXTRAPOLATE
@ SCOPES_WAVEFRM_YCC_JPEG
@ SCOPES_WAVEFRM_RGB_PARADE
#define SCOPES_VEC_U_SCALE
#define SCOPES_VEC_V_SCALE
@ COLORMANAGE_DISPLAY_EMULATION_AUTO
@ CURVE_PRESET_CONSTANT_MEDIAN
BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3])
unsigned char * IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, void **cache_handle)
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])
ColormanageProcessor * IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW, const bool inverse=false)
const char * IMB_colormanagement_display_get_default_view_transform_name(const ColorManagedDisplay *display)
const ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
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()
Read Guarded memory(de)allocation.
blender::ocio::Display ColorManagedDisplay
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
MINLINE unsigned char unit_float_to_uchar_clamp(float 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
TaskParallelReduceFunc func_reduce
size_t userdata_chunk_size