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++) {
393 cuma->
curve[0].
y = 0.025f;
395 cuma->
curve[1].
y = 0.135f;
396 cuma->
curve[2].
x = 0.298f;
405 cuma->
curve[5].
y = 0.135f;
407 cuma->
curve[6].
y = 0.025f;
411 cuma->
curve[0].
y = 0.025f;
417 cuma->
curve[2].
y = 0.025f;
428 newpoints[
i].
y = cuma->
curve[last -
i].
y;
432 cuma->
curve = newpoints;
435 const int num_points = cuma->
totpoint * 2 - 1;
437 "curve symmetric points");
439 const int src_last_point = cuma->
totpoint -
i - 1;
440 const int dst_last_point = num_points -
i - 1;
441 new_points[
i] = cuma->
curve[src_last_point];
442 new_points[
i].
x = (1.0f - cuma->
curve[src_last_point].
x) * 0.5f;
443 new_points[dst_last_point] = new_points[
i];
444 new_points[dst_last_point].
x = 0.5f + cuma->
curve[src_last_point].
x * 0.5f;
448 cuma->
curve = new_points;
453 cuma->
table =
nullptr;
461 for (a = 0; a < cuma->
totpoint; a++) {
485#define p2_h1 ((p2)-3)
486#define p2_h2 ((p2) + 3)
488 const float *p1, *p3;
491 float len, len_a, len_b;
492 float dvec_a[2], dvec_b[2];
494 if (bezt->
h1 == 0 && bezt->
h2 == 0) {
500 if (prev ==
nullptr) {
502 pt[0] = 2.0f * p2[0] - p3[0];
503 pt[1] = 2.0f * p2[1] - p3[1];
510 if (
next ==
nullptr) {
512 pt[0] = 2.0f * p2[0] - p1[0];
513 pt[1] = 2.0f * p2[1] - p1[1];
535 tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a;
536 tvec[1] = dvec_b[1] / len_b + dvec_a[1] / len_a;
546 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
547 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
548 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
549 bezt->
vec[0][1] = bezt->
vec[1][1];
552 if (ydiff1 <= 0.0f) {
553 bezt->
vec[0][1] = std::max(prev->vec[1][1], bezt->
vec[0][1]);
556 bezt->
vec[0][1] = std::min(prev->vec[1][1], bezt->
vec[0][1]);
566 const float ydiff1 = prev->vec[1][1] - bezt->
vec[1][1];
567 const float ydiff2 =
next->vec[1][1] - bezt->
vec[1][1];
568 if ((ydiff1 <= 0.0f && ydiff2 <= 0.0f) || (ydiff1 >= 0.0f && ydiff2 >= 0.0f)) {
569 bezt->
vec[2][1] = bezt->
vec[1][1];
572 if (ydiff1 <= 0.0f) {
573 bezt->
vec[2][1] = std::min(
next->vec[1][1], bezt->
vec[2][1]);
576 bezt->
vec[2][1] = std::max(
next->vec[1][1], bezt->
vec[2][1]);
600 const float first[2],
609 if (cuma->
ext_in[0] == 0.0f) {
610 return first[1] + cuma->
ext_in[1] * 10000.0f;
613 return first[1] + cuma->
ext_in[1] * (
x - first[0]) / cuma->
ext_in[0];
621 if (cuma->
ext_out[0] == 0.0f) {
622 return last[1] - cuma->
ext_out[1] * 10000.0f;
636 start[1][0], start[2][0], end[0][0], end[1][0], point,
CM_RESOL - 1,
sizeof(
float[2]));
638 start[1][1], start[2][1], end[0][1], end[1][1], point + 1,
CM_RESOL - 1,
sizeof(
float[2]));
653 if (cuma->
curve ==
nullptr) {
669 for (
int a = 0; a < bezt_totpoint; a++) {
672 bezt[a].
vec[1][0] = cmp[a].
x;
673 bezt[a].
vec[1][1] = cmp[a].
y;
701 BezTriple bezt_pre = bezt[bezt_totpoint - 1];
709 bezt_pre.
h1 = bezt_pre.
h2 = bezt[bezt_totpoint - 1].
h2;
710 bezt_pre.
vec[1][0] = bezt[bezt_totpoint - 1].
vec[1][0] - table_range;
711 bezt_pre.
vec[1][1] = bezt[bezt_totpoint - 1].
vec[1][1];
713 bezt_post.
h1 = bezt_post.
h2 = bezt[0].
h1;
714 bezt_post.
vec[1][0] = bezt[0].
vec[1][0] + table_range;
715 bezt_post.
vec[1][1] = bezt[0].
vec[1][1];
717 bezt_prev = &bezt_pre;
718 bezt_post_ptr = &bezt_post;
722 bezt_post_ptr =
nullptr;
726 for (
int a = 0; a < bezt_totpoint; a++) {
727 bezt_next = (a != bezt_totpoint - 1) ? &bezt[a + 1] : bezt_post_ptr;
729 bezt_prev = &bezt[a];
733 bezt_pre.
vec[0][0] = bezt[bezt_totpoint - 1].
vec[0][0] - table_range;
734 bezt_pre.
vec[0][1] = bezt[bezt_totpoint - 1].
vec[0][1];
735 bezt_pre.
vec[2][0] = bezt[bezt_totpoint - 1].
vec[2][0] - table_range;
736 bezt_pre.
vec[2][1] = bezt[bezt_totpoint - 1].
vec[2][1];
738 bezt_post.
vec[0][0] = bezt[0].
vec[0][0] + table_range;
739 bezt_post.
vec[0][1] = bezt[0].
vec[0][1];
740 bezt_post.
vec[2][0] = bezt[0].
vec[2][0] + table_range;
741 bezt_post.
vec[2][1] = bezt[0].
vec[2][1];
745 if (bezt_totpoint > 2 && !use_wrapping) {
746 float hlen, nlen, vec[3];
750 hlen =
len_v3v3(bezt[0].vec[1], bezt[0].vec[2]);
753 vec[0] = std::max(vec[0], bezt[0].vec[1][0]);
757 if (nlen > FLT_EPSILON) {
763 int a = bezt_totpoint - 1;
766 hlen =
len_v3v3(bezt[a].vec[1], bezt[a].vec[0]);
769 vec[0] = std::min(vec[0], bezt[a].vec[1][0]);
773 if (nlen > FLT_EPSILON) {
786 const int totpoint = use_wrapping ? (bezt_totpoint + 1) *
CM_RESOL :
789 float *point = allpoints;
798 for (
int a = 0; a < bezt_totpoint - 1; a++, point += 2 *
CM_RESOL) {
809 cuma->
ext_in[0] = bezt[0].
vec[0][0] - bezt[0].
vec[1][0];
810 cuma->
ext_in[1] = bezt[0].
vec[0][1] - bezt[0].
vec[1][1];
813 cuma->
ext_in[0] /= ext_in_range;
814 cuma->
ext_in[1] /= ext_in_range;
816 int out_a = bezt_totpoint - 1;
817 cuma->
ext_out[0] = bezt[out_a].
vec[1][0] - bezt[out_a].
vec[2][0];
818 cuma->
ext_out[1] = bezt[out_a].
vec[1][1] - bezt[out_a].
vec[2][1];
821 cuma->
ext_out[0] /= ext_out_range;
822 cuma->
ext_out[1] /= ext_out_range;
828 cuma->
range = 1.0f / range;
831 float *firstpoint = allpoints;
832 float *lastpoint = allpoints + 2 * (totpoint - 1);
837 for (
int a = 0; a <=
CM_TABLE; a++) {
838 float cur_x = cuma->
mintable + range * float(a);
842 while (cur_x >= point[0] && point != lastpoint) {
846 if ((point == firstpoint || (point == lastpoint && cur_x >= point[0])) && !use_wrapping) {
858 float fac1 = point[0] - point[-2];
859 float fac2 = point[0] - cur_x;
860 if (fac1 > FLT_EPSILON) {
866 cmp[a].
y = fac1 * point[-1] + (1.0f - fac1) * point[1];
882 for (a = 0; a < 3; a++) {
899 for (a = 0; a < 3; a++) {
900 if (cumap->
cm[a].
table ==
nullptr) {
909 if (cumap->
cm[3].
table ==
nullptr) {
914 for (a = 0; a < 3; a++) {
940 float dx = 0.0f, dy = 0.0f;
947 for (a = 0; a < cuma->
totpoint; a++) {
952 else if (cmp[a].
x > clipr->
xmax) {
958 else if (cmp[a].
y > clipr->
ymax) {
963 for (a = 0; a < cuma->
totpoint; a++) {
981 std::stable_sort(cuma->
curve,
986 if (rem_doubles && cuma->
totpoint > 2) {
987 for (a = 0; a < cuma->
totpoint - 1; a++) {
988 dx = cmp[a].
x - cmp[a + 1].
x;
989 dy = cmp[a].
y - cmp[a + 1].
y;
990 if (
sqrtf(dx * dx + dy * dy) < thresh) {
1015 int a, cur = cumap->
cur;
1017 for (a = 0; a <
CM_TOT; a++) {
1051 return (1.0f - fi) * cuma->
table[
i].
y + (fi)*cuma->
table[
i + 1].
y;
1061 if (val < cumap->clipr.ymin) {
1081 const float vecin[3])
1125 const CurveMap *curve_map = curve_mapping->
cm + 3;
1138 const float scaling_ratio = (new_max - new_min) / (maximum - minimum);
1139 const float new_median = new_min + (median - minimum) * scaling_ratio;
1143 input.y == minimum ? new_min : new_median,
1144 input.z == minimum ? new_min : new_median);
1146 input.y == maximum ? new_max : median_or_min.y,
1147 input.z == maximum ? new_max : median_or_min.z);
1152 const float vecin[3],
1153 const float black[3],
1154 const float bwmul[3])
1156 const float r = (vecin[0] - black[0]) * bwmul[0];
1157 const float g = (vecin[1] - black[1]) * bwmul[1];
1158 const float b = (vecin[2] - black[2]) * bwmul[2];
1159 const float balanced_color[3] = {r, g,
b};
1161 switch (cumap->
tone) {
1179 const float vecin[3])
1185 uchar vecout_byte[3],
1186 const uchar vecin_byte[3])
1188 float vecin[3], vecout[3];
1190 vecin[0] = float(vecin_byte[0]) / 255.0f;
1191 vecin[1] = float(vecin_byte[1]) / 255.0f;
1192 vecin[2] = float(vecin_byte[2]) / 255.0f;
1203 if (cumap->
black[0] != 0.0f) {
1206 if (cumap->
black[1] != 0.0f) {
1209 if (cumap->
black[2] != 0.0f) {
1212 if (cumap->
white[0] != 1.0f) {
1215 if (cumap->
white[1] != 1.0f) {
1218 if (cumap->
white[2] != 1.0f) {
1222 for (
int a = 0; a <
CM_TOT; a++) {
1228 if (cumap->
cm[a].
curve[0].
x != 0.0f) {
1231 if (cumap->
cm[a].
curve[0].
y != 0.0f) {
1234 if (cumap->
cm[a].
curve[1].
x != 1.0f) {
1237 if (cumap->
cm[a].
curve[1].
y != 1.0f) {
1256 const CurveMap *curve_map = &curve_mapping->
cm[
i];
1262 float start_slopes[
CM_TOT],
1263 float end_slopes[
CM_TOT])
1265 float range_dividers[
CM_TOT];
1268 const CurveMap *curve_map = &curve_mapping->
cm[
i];
1271 start_slopes[
i] = 0.0f;
1272 end_slopes[
i] = 0.0f;
1276 if (curve_map->
ext_in[0] != 0.0f) {
1277 start_slopes[
i] = curve_map->
ext_in[1] / (curve_map->
ext_in[0] * range_dividers[
i]);
1280 start_slopes[
i] = 1e8f;
1283 if (curve_map->
ext_out[0] != 0.0f) {
1284 end_slopes[
i] = curve_map->
ext_out[1] / (curve_map->
ext_out[0] * range_dividers[
i]);
1287 end_slopes[
i] = 1e8f;
1297 const CurveMap *curve_map = &curve_mapping->
cm[index];
1310 if (curve_map->
curve[0].
x != 0 || curve_map->
curve[0].
y != 0) {
1313 if (curve_map->
curve[1].
x != 0 || curve_map->
curve[1].
y != 0) {
1323 if (cumap ==
nullptr) {
1327 for (a = 0; a <
CM_TOT; a++) {
1328 if (cumap->
cm[a].
table ==
nullptr) {
1341 for (a = 0; a < *
size; a++) {
1343 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1355 for (a = 0; a < *
size; a++) {
1357 (*array)[a * 4 + 0] = cumap->
cm[0].
table[a].
y;
1360 (*array)[a * 4 + 1] = cumap->
cm[1].
table[a].
y;
1363 (*array)[a * 4 + 2] = cumap->
cm[2].
table[a].
y;
1366 (*array)[a * 4 + 3] = cumap->
cm[3].
table[a].
y;
1379 for (
int a = 0; a <
CM_TOT; a++) {
1389 for (
int a = 0; a <
CM_TOT; a++) {
1398#define INV_255 (1.0f / 255.0f)
1402 int bin = int((f * 255.0f) + 0.5f);
1411 Scopes *scopes,
const int idx,
const float fx,
const float rgb[3],
const float ycc[3])
1420 int color_idx = (idx / 2) * 3;
1462 int x1 = roundf(hist->
co[0][0] * ibuf->
x);
1463 int x2 = roundf(hist->
co[1][0] * ibuf->
x);
1464 int y1 = roundf(hist->
co[0][1] * ibuf->
y);
1465 int y2 = roundf(hist->
co[1][1] * ibuf->
y);
1482 for (
i = 0;
i < 256;
i++) {
1483 x = int(0.5f + x1 +
float(
i) * (x2 - x1) / 255.0f);
1484 y = int(0.5f + y1 +
float(
i) * (y2 - y1) / 255.0f);
1526 hist->
data_r[
i] = float(cp[0]) / 255.0f;
1527 hist->
data_g[
i] = float(cp[1]) / 255.0f;
1528 hist->
data_b[
i] = float(cp[2]) / 255.0f;
1529 hist->
data_a[
i] = float(cp[3]) / 255.0f;
1566 const uchar *display_buffer =
data->display_buffer;
1567 const int ycc_mode =
data->ycc_mode;
1575 float *
min = data_chunk->
min;
1576 float *
max = data_chunk->
max;
1578 const float *rf =
nullptr;
1579 const uchar *rc =
nullptr;
1580 const int rows_per_sample_line = ibuf->
y / scopes->
sample_lines;
1581 const int savedlines =
y / rows_per_sample_line;
1582 const bool do_sample_line = (savedlines < scopes->
sample_lines) &&
1583 (
y % rows_per_sample_line) == 0;
1590 rc = display_buffer + size_t(
y) * ibuf->
x * ibuf->
channels;
1593 for (
int x = 0;
x < ibuf->
x;
x++) {
1594 float rgba[4], ycc[3], luma;
1620 for (
int c = 4; c--;) {
1629 if (ycc_mode == -1) {
1633 rgb_to_ycc(rgba[0], rgba[1], rgba[2], &ycc[0], &ycc[1], &ycc[2], ycc_mode);
1645 if (do_sample_line) {
1646 const float fx = float(
x) / float(ibuf->
x);
1647 const int idx = 2 * (ibuf->
x * savedlines +
x);
1657 void *__restrict chunk_join,
1658 void *__restrict chunk)
1669 const uint *bin_r_c = data_chunk->
bin_r;
1670 const uint *bin_g_c = data_chunk->
bin_g;
1671 const uint *bin_b_c = data_chunk->
bin_b;
1672 const uint *bin_a_c = data_chunk->
bin_a;
1674 const float *
min = data_chunk->
min;
1675 const float *
max = data_chunk->
max;
1677 for (
int b = 256;
b--;) {
1678 bin_lum[
b] += bin_lum_c[
b];
1679 bin_r[
b] += bin_r_c[
b];
1680 bin_g[
b] += bin_g_c[
b];
1681 bin_b[
b] += bin_b_c[
b];
1682 bin_a[
b] += bin_a_c[
b];
1685 for (
int c = 3; c--;) {
1686 join_chunk->
min[c] = std::min(
min[c], join_chunk->
min[c]);
1687 join_chunk->
max[c] = std::max(
max[c], join_chunk->
max[c]);
1697 uint nl, na, nr, ng, nb;
1698 double divl, diva, divr, divg, divb;
1699 const uchar *display_buffer =
nullptr;
1701 void *cache_handle =
nullptr;
1708 if (scopes->
ok == 1) {
1751 for (a = 0; a < 3; a++) {
1752 scopes->
minmax[a][0] = 25500.0f;
1753 scopes->
minmax[a][1] = -25500.0f;
1775 "waveform point channel 1");
1777 "waveform point channel 2");
1779 "waveform point channel 3");
1781 "vectorscope point channel");
1783 "vectorscope color channel");
1790 ibuf, view_settings, display_settings, &cache_handle);
1795 data.scopes = scopes;
1797 data.cm_processor = cm_processor;
1798 data.display_buffer = display_buffer;
1799 data.ycc_mode = ycc_mode;
1813 nl = na = nr = nb = ng = 0;
1814 for (a = 0; a < 256; a++) {
1815 nl = std::max(data_chunk.
bin_lum[a], nl);
1816 nr = std::max(data_chunk.
bin_r[a], nr);
1817 ng = std::max(data_chunk.
bin_g[a], ng);
1818 nb = std::max(data_chunk.
bin_b[a], nb);
1819 na = std::max(data_chunk.
bin_a[a], na);
1821 divl = nl ? 1.0 / double(nl) : 1.0;
1822 diva = na ? 1.0 / double(na) : 1.0;
1823 divr = nr ? 1.0 / double(nr) : 1.0;
1824 divg = ng ? 1.0 / double(ng) : 1.0;
1825 divb = nb ? 1.0 / double(nb) : 1.0;
1827 for (a = 0; a < 256; a++) {
1887 const char *view_transform)
1893 if (!view_transform) {
1902 view_settings->
flag = 0;
1903 view_settings->
gamma = 1.0f;
1935 new_settings->
flag = settings->
flag;
1939 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)
blender::ocio::Display ColorManagedDisplay
#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)
char * STRNCPY(char(&dst)[N], const char *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
@ 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)
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])
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.
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
#define SCOPES_VEC_U_SCALE
#define SCOPES_VEC_V_SCALE
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