61#define DISPLAY_BUFFER_CHANNELS 4
265 return ((a->view !=
b->view) || (a->display !=
b->display));
304 cache_view_settings->
look = look;
307 cache_view_settings->
gamma = view_settings->
gamma;
310 cache_view_settings->
tint = view_settings->
tint;
311 cache_view_settings->
flag = view_settings->
flag;
321 cache_display_settings->
display = display;
345 *cache_handle =
nullptr;
349 *cache_handle = cache_ibuf;
361 int view_flag = 1 << (view_settings->
view - 1);
363 int curve_mapping_timestamp = curve_mapping ? curve_mapping->
changed_timestamp : 0;
387 if (cache_data->
look != view_settings->
look ||
391 cache_data->
tint != view_settings->
tint || cache_data->
flag != view_settings->
flag ||
395 *cache_handle =
nullptr;
411 uchar *display_buffer,
417 int view_flag = 1 << (view_settings->
view - 1);
420 int curve_mapping_timestamp = curve_mapping ? curve_mapping->
changed_timestamp : 0;
433 cache_data = MEM_cnew<ColormanageCacheData>(
"color manage cache imbuf data");
434 cache_data->
look = view_settings->
look;
439 cache_data->
tint = view_settings->
tint;
440 cache_data->
flag = view_settings->
flag;
446 *cache_handle = cache_ibuf;
453 ImBuf *cache_ibuf =
static_cast<ImBuf *
>(cache_handle);
465 char *colorspace_name,
467 const char *backup_role)
469 OCIO_ConstColorSpaceRcPtr *ociocs;
473 if (ociocs ==
nullptr && backup_role) {
477 if (ociocs ==
nullptr) {
482 if (ociocs ==
nullptr) {
484 printf(
"Color management: Error, could not find role \"%s\"\n", role);
518 for (
int index = 0; index < tot_colorspace; index++) {
532 for (
int i = 0; i < colorspace->
num_aliases; i++) {
546 for (
int index = 0; index < tot_display; index++) {
553 for (
int viewindex = 0; viewindex < tot_display_view; viewindex++, viewindex2++) {
572 printf(
"Color management: Error, could not find any displays\n");
578 printf(
"Color management: Error, could not find any views\n");
586 for (
int index = 0; index < tot_looks; index++) {
633 colorspace = colorspace_next;
644 if (display->to_scene_linear) {
647 if (display->from_scene_linear) {
655 display = display_next;
671 OCIO_ConstConfigRcPtr *config =
nullptr;
678 if (ocio_env && ocio_env[0] !=
'\0') {
680 if (config !=
nullptr) {
682 printf(
"Color management: Using %s as a configuration file\n", ocio_env);
690 printf(
"Color management: Failed to load config from environment\n");
699 if (config ==
nullptr) {
702 if (configdir.has_value()) {
708 if (config !=
nullptr) {
715 printf(
"Color management: Failed to load bundled config\n");
725 if (config ==
nullptr) {
727 printf(
"Color management: Using fallback mode for management\n");
776 if (
STREQ(look->view, view_name)) {
785 const char *view_name,
786 const bool has_explicit_look)
795 if (view_name &&
STREQ(look->
view, view_name)) {
799 if (has_explicit_look) {
803 return look->
view[0] ==
'\0';
848 *r_view_settings = &scene->view_settings;
849 *r_display_settings = &scene->display_settings;
851 if (sima && sima->
image) {
853 *r_view_settings =
nullptr;
865 const char *colorspace_name;
871 return colorspace_name;
880 if (colorspace_name) {
888 const char *view_transform,
890 const float exposure,
892 const float temperature,
894 const bool use_white_balance,
895 const char *from_colorspace)
899 const float scale = (exposure == 0.0f) ? 1.0f :
powf(2.0f, exposure);
900 const float exponent = (gamma == 1.0f) ? 1.0f : 1.0f /
max_ff(FLT_EPSILON, gamma);
906 (use_look) ? look :
"",
916 if (processor ==
nullptr) {
923 return cpu_processor;
927 const char *to_colorspace)
930 OCIO_ConstProcessorRcPtr *processor;
949 if (processor !=
nullptr) {
972 if (processor !=
nullptr) {
988 if (display->from_scene_linear ==
nullptr) {
991 if (display->from_scene_linear ==
nullptr) {
994 OCIO_ConstProcessorRcPtr *processor =
nullptr;
996 if (view_name && config) {
1012 if (processor !=
nullptr) {
1027 if (display->to_scene_linear ==
nullptr) {
1030 if (display->to_scene_linear ==
nullptr) {
1033 OCIO_ConstProcessorRcPtr *processor =
nullptr;
1035 if (view_name && config) {
1051 if (processor !=
nullptr) {
1072 if (default_view ==
nullptr) {
1074 if (display !=
nullptr) {
1078 if (default_view !=
nullptr) {
1087 view_settings->
flag = 0;
1088 view_settings->
gamma = 1.0f;
1091 view_settings->
tint = 10.0f;
1099 if (channels == 1) {
1102 else if (channels == 2) {
1113 if (colorspace && colorspace[0] ==
'\0') {
1114 const char *role_colorspace;
1131 if (colorspace && colorspace->
is_data) {
1173 "Color management: display \"%s\" used by %s not found, setting to default "
1177 default_display->
name);
1216 printf(
"Color management: %s view \"%s\" not found, setting default \"%s\".\n",
1219 default_view->
name);
1227 if (view_settings->
look[0] ==
'\0') {
1232 if (look ==
nullptr) {
1234 printf(
"Color management: %s look \"%s\" not found, setting default \"%s\".\n",
1236 view_settings->
look,
1245 "Color management: %s look \"%s\" is not compatible with view \"%s\", setting default "
1248 view_settings->
look,
1258 if (view_settings->
exposure == 0.0f && view_settings->
gamma == 0.0f) {
1260 view_settings->
gamma = 1.0f;
1267 if (colorspace_settings->
name[0] ==
'\0') {
1275 printf(
"Color management: %s colorspace \"%s\" not found, will use default instead.\n",
1277 colorspace_settings->
name);
1298 if (!default_display) {
1310 sequencer_colorspace_settings = &scene->sequencer_colorspace_settings;
1314 if (sequencer_colorspace_settings->
name[0] ==
'\0') {
1319 if (scene->ed !=
nullptr) {
1351 if (!found && default_view) {
1375 printf(
"Unknown role was passed to %s\n", __func__);
1388 if (colorspace && colorspace->
is_data) {
1419 if (colorspace && colorspace->
is_data) {
1433 if (colorspace && colorspace->
is_data) {
1461 return (colorspace && colorspace->
is_data);
1466 if (colorspace && !colorspace->
info.
cached) {
1471 bool is_scene_linear, is_srgb;
1498 return (colorspace && colorspace->
is_data);
1531 float whitepoint[3])
1597 float dither = ibuf->
dither;
1600 size_t offset = size_t(channels) * start_line * ibuf->
x;
1605 handle->cm_processor =
init_data->cm_processor;
1608 handle->buffer =
init_data->buffer + offset;
1612 handle->byte_buffer =
init_data->byte_buffer + offset;
1616 handle->display_buffer =
init_data->display_buffer + offset;
1620 handle->display_buffer_byte =
init_data->display_buffer_byte + display_buffer_byte_offset;
1623 handle->width = ibuf->
x;
1625 handle->start_line = start_line;
1626 handle->tot_line = tot_line;
1629 handle->dither = dither;
1630 handle->is_data = is_data;
1633 handle->byte_colorspace =
init_data->byte_colorspace;
1634 handle->float_colorspace =
init_data->float_colorspace;
1639 float *linear_buffer,
1640 bool *is_straight_alpha)
1642 int channels = handle->channels;
1643 int width = handle->width;
1645 size_t buffer_size = size_t(channels) * width * height;
1647 bool is_data = handle->is_data;
1648 bool is_data_display = handle->cm_processor->is_data_result;
1649 bool predivide = handle->predivide;
1651 if (!handle->buffer) {
1652 uchar *byte_buffer = handle->byte_buffer;
1654 const char *from_colorspace = handle->byte_colorspace;
1659 const size_t i_last = size_t(width) * height;
1663 for (i = 0, fp = linear_buffer, cp = byte_buffer; i != i_last;
1666 if (channels == 3) {
1669 else if (channels == 4) {
1673 BLI_assert_msg(0,
"Buffers of 3 or 4 channels are only supported here");
1677 if (!is_data && !is_data_display) {
1680 linear_buffer, width, height, channels, from_colorspace, to_colorspace,
false);
1683 *is_straight_alpha =
true;
1685 else if (handle->float_colorspace) {
1692 const char *from_colorspace = handle->float_colorspace;
1695 memcpy(linear_buffer, handle->buffer, buffer_size *
sizeof(
float));
1697 if (!is_data && !is_data_display) {
1699 linear_buffer, width, height, channels, from_colorspace, to_colorspace, predivide);
1702 *is_straight_alpha =
false;
1711 memcpy(linear_buffer, handle->buffer, buffer_size *
sizeof(
float));
1713 *is_straight_alpha =
false;
1719 const int width = handle->width;
1720 const int height = handle->tot_line;
1721 if (handle->display_buffer_byte && handle->display_buffer_byte != handle->byte_buffer) {
1722 if (handle->byte_buffer) {
1724 handle->byte_buffer,
1733 else if (handle->buffer) {
1748 if (handle->display_buffer) {
1749 if (handle->byte_buffer) {
1751 handle->byte_buffer,
1760 else if (handle->buffer) {
1779 if (cm_processor ==
nullptr) {
1784 float *display_buffer = handle->display_buffer;
1785 uchar *display_buffer_byte = handle->display_buffer_byte;
1786 int channels = handle->channels;
1787 int width = handle->width;
1788 int height = handle->tot_line;
1789 float *linear_buffer =
static_cast<float *
>(
MEM_mallocN(
1790 size_t(channels) * width * height *
sizeof(
float),
"color conversion linear buffer"));
1792 bool is_straight_alpha;
1795 bool predivide = handle->predivide && (is_straight_alpha ==
false);
1798 if (!handle->is_data) {
1800 cm_processor, linear_buffer, width, height, channels, predivide);
1804 if (display_buffer_byte) {
1819 if (display_buffer) {
1820 memcpy(display_buffer, linear_buffer,
size_t(width) * height * channels *
sizeof(
float));
1822 if (is_straight_alpha && channels == 4) {
1823 const size_t i_last = size_t(width) * height;
1827 for (i = 0, fp = display_buffer; i != i_last; i++, fp +=
channels) {
1839 const float *buffer,
1841 float *display_buffer,
1842 uchar *display_buffer_byte,
1851 init_data.display_buffer = display_buffer;
1852 init_data.display_buffer_byte = display_buffer_byte;
1887 view_settings->
exposure != 0.0f || view_settings->
gamma != 1.0f)
1897 const char *from_colorspace = colorspace->
name;
1899 if (to_colorspace &&
STREQ(from_colorspace, to_colorspace)) {
1908 float *display_buffer,
1909 uchar *display_buffer_byte,
1915 bool skip_transform =
false;
1925 if (skip_transform ==
false) {
1933 display_buffer_byte,
1942 uchar *display_buffer,
1947 ibuf,
nullptr, display_buffer, view_settings, display_settings);
1989 const bool predivide =
init_data->predivide;
1990 const bool float_from_byte =
init_data->float_from_byte;
1992 const size_t offset = size_t(channels) * start_line * width;
1996 handle->cm_processor =
init_data->cm_processor;
1998 if (
init_data->byte_buffer !=
nullptr) {
2000 handle->byte_buffer =
init_data->byte_buffer + offset;
2002 if (
init_data->float_buffer !=
nullptr) {
2003 handle->float_buffer =
init_data->float_buffer + offset;
2006 handle->width = width;
2008 handle->start_line = start_line;
2009 handle->tot_line = tot_line;
2012 handle->predivide = predivide;
2013 handle->float_from_byte = float_from_byte;
2020 float *float_buffer = handle->float_buffer;
2021 const int channels = handle->channels;
2022 const int width = handle->width;
2023 const int height = handle->tot_line;
2024 const bool predivide = handle->predivide;
2025 const bool float_from_byte = handle->float_from_byte;
2027 if (float_from_byte) {
2038 handle->cm_processor, float_buffer, width, height, channels, predivide);
2042 if (byte_buffer !=
nullptr) {
2044 handle->cm_processor, byte_buffer, width, height, channels);
2046 if (float_buffer !=
nullptr) {
2048 handle->cm_processor, float_buffer, width, height, channels, predivide);
2056 float *float_buffer,
2061 const bool predivide,
2062 const bool float_from_byte)
2073 init_data.float_from_byte = float_from_byte;
2091 float *float_buffer,
2095 const char *from_colorspace,
2096 const char *to_colorspace,
2100 if (from_colorspace[0] ==
'\0') {
2104 if (
STREQ(from_colorspace, to_colorspace)) {
2112 from_colorspace, to_colorspace);
2120 byte_buffer, float_buffer, width, height, channels, cm_processor, predivide,
false);
2123 if (byte_buffer !=
nullptr) {
2126 if (float_buffer !=
nullptr) {
2128 cm_processor, float_buffer, width, height, channels, predivide);
2139 const char *from_colorspace,
2140 const char *to_colorspace,
2144 nullptr, buffer, width, height, channels, from_colorspace, to_colorspace, predivide,
false);
2151 const char *from_colorspace,
2152 const char *to_colorspace,
2156 nullptr, buffer, width, height, channels, from_colorspace, to_colorspace, predivide,
true);
2163 const char *from_colorspace,
2164 const char *to_colorspace)
2167 buffer,
nullptr, width, height, channels, from_colorspace, to_colorspace,
false,
false);
2173 const char *from_colorspace,
2174 const char *to_colorspace)
2177 buffer,
nullptr, width, height, channels, from_colorspace, to_colorspace,
false,
true);
2185 const char *from_colorspace,
2186 const char *to_colorspace)
2198 float_buffer, width, height, channels, from_colorspace, to_colorspace,
true);
2205 const char *from_colorspace,
2206 const char *to_colorspace)
2210 if (from_colorspace ==
nullptr || from_colorspace[0] ==
'\0') {
2213 if (
STREQ(from_colorspace, to_colorspace) && channels == 4) {
2217 float *dst_ptr = float_buffer + pix_range.
first() * channels;
2218 uchar *src_ptr = byte_buffer + pix_range.
first() * channels;
2219 for ([[maybe_unused]]
const int i : pix_range) {
2221 float cr =
float(src_ptr[0]) * (1.0f / 255.0f);
2222 float cg =
float(src_ptr[1]) * (1.0f / 255.0f);
2223 float cb =
float(src_ptr[2]) * (1.0f / 255.0f);
2224 float ca =
float(src_ptr[3]) * (1.0f / 255.0f);
2225 dst_ptr[0] = cr * ca;
2226 dst_ptr[1] = cg * ca;
2227 dst_ptr[2] = cb * ca;
2237 byte_buffer, float_buffer, width, height, channels, cm_processor,
false,
true);
2242 const char *from_colorspace,
2243 const char *to_colorspace)
2247 if (from_colorspace[0] ==
'\0') {
2251 if (
STREQ(from_colorspace, to_colorspace)) {
2267 if (colorspace ==
nullptr) {
2268 printf(
"%s: perform conversion from unknown color space\n", __func__);
2272 if (processor ==
nullptr) {
2280 if (colorspace ==
nullptr) {
2281 printf(
"%s: perform conversion from unknown color space\n", __func__);
2285 if (processor ==
nullptr) {
2295 if (colorspace ==
nullptr) {
2296 printf(
"%s: perform conversion from unknown color space\n", __func__);
2300 if (processor ==
nullptr) {
2312 float *buffer,
int width,
int height,
int channels,
ColorSpace *colorspace,
bool predivide)
2314 if (colorspace ==
nullptr) {
2315 printf(
"%s: perform conversion from unknown color space\n", __func__);
2319 if (processor ==
nullptr) {
2327 size_t(channels) *
sizeof(
float),
2328 size_t(channels) *
sizeof(
float) *
2342 float *buffer,
int width,
int height,
int channels,
ColorSpace *colorspace)
2344 if (colorspace ==
nullptr) {
2345 printf(
"%s: perform conversion from unknown color space\n", __func__);
2349 if (processor ==
nullptr) {
2357 size_t(channels) *
sizeof(
float),
2358 size_t(channels) *
sizeof(
float) *
2370 const bool store_premultiplied)
2383 for (
int y = 0; y < height; y++) {
2384 const size_t in_offset = (offset_y +
y) * ibuf->
x + offset_x;
2385 const size_t out_offset = y * width;
2386 const uchar *in = in_buffer + in_offset * 4;
2387 uchar *out = out_buffer + out_offset * 4;
2389 if (use_premultiply) {
2391 for (
int x = 0; x < width; x++, in += 4, out += 4) {
2392 out[0] = (in[0] * in[3]) >> 8;
2393 out[1] = (in[1] * in[3]) >> 8;
2394 out[2] = (in[2] * in[3]) >> 8;
2400 for (
int x = 0; x < width; x++, in += 4, out += 4) {
2425 const size_t in_offset = data->
offset + y * data->stride;
2426 const size_t out_offset = y * data->width;
2427 const uchar *in = data->in_buffer + in_offset * 4;
2428 float *out = data->out_buffer + out_offset * 4;
2431 for (
int x = 0; x < data->width; x++, in += 4, out += 4) {
2434 if (data->processor) {
2440 if (data->use_premultiply) {
2453 const bool store_premultiplied)
2460 const int in_channels = ibuf->
channels;
2463 for (
int y = 0; y < height; y++) {
2464 const size_t in_offset = (offset_y +
y) * ibuf->
x + offset_x;
2465 const size_t out_offset = y * width;
2466 const float *in = in_buffer + in_offset * in_channels;
2467 float *out = out_buffer + out_offset * 4;
2469 if (in_channels == 1) {
2471 for (
int x = 0; x < width; x++, in += 1, out += 4) {
2478 else if (in_channels == 3) {
2480 for (
int x = 0; x < width; x++, in += 3, out += 4) {
2487 else if (in_channels == 4) {
2489 if (use_unpremultiply) {
2490 for (
int x = 0; x < width; x++, in += 4, out += 4) {
2495 memcpy(out, in,
sizeof(
float[4]) * width);
2513 data.offset = offset_y * ibuf->
x + offset_x;
2514 data.stride = ibuf->
x;
2515 data.in_buffer = in_buffer;
2516 data.out_buffer = out_buffer;
2517 data.use_premultiply = use_premultiply;
2521 settings.use_threading = (height > 128);
2527 const float scene_linear[3])
2537 if (processor !=
nullptr) {
2557 const float color_picking[3])
2567 if (processor !=
nullptr) {
2590 if (processor !=
nullptr) {
2599 if (processor !=
nullptr) {
2606 const float pixel[4],
2621 const float pixel[3],
2658 if (colormanaged_ibuf != ibuf) {
2660 return colormanaged_ibuf;
2663 if (allocate_result) {
2667 return colormanaged_ibuf;
2680 bool save_as_render,
2681 bool allocate_result,
2684 ImBuf *colormanaged_ibuf = ibuf;
2714 float color[3] = {0, 0, 0};
2720 colormanaged_ibuf->
float_buffer.
data, colormanaged_ibuf->
x, colormanaged_ibuf->
y, color);
2725 colormanaged_ibuf->
byte_buffer.
data, colormanaged_ibuf->
x, colormanaged_ibuf->
y, color);
2729 if (save_as_render && !linear_float_output) {
2767 if (to_colorspace[0] ==
'\0' ||
STREQ(from_colorspace, to_colorspace)) {
2785 colormanaged_ibuf->
x,
2786 colormanaged_ibuf->
y,
2809 colormanaged_ibuf->
x,
2810 colormanaged_ibuf->
y,
2823 return colormanaged_ibuf;
2835 void **cache_handle)
2837 uchar *display_buffer;
2844 *cache_handle =
nullptr;
2846 if (!ibuf->
x || !ibuf->
y) {
2850 if (view_settings) {
2851 applied_view_settings = view_settings;
2857 applied_view_settings = &default_view_settings;
2880 applied_view_settings,
2904 ibuf->
userflags &= ~IB_DISPLAY_BUFFER_INVALID;
2908 ibuf, &cache_view_settings, &cache_display_settings, cache_handle);
2910 if (display_buffer) {
2912 return display_buffer;
2916 display_buffer =
static_cast<uchar *
>(
MEM_callocN(buffer_size,
"imbuf display buffer"));
2919 ibuf, display_buffer, applied_view_settings, display_settings);
2922 ibuf, &cache_view_settings, &cache_display_settings, display_buffer, cache_handle);
2926 return display_buffer;
2940 float *linear_buffer,
2952 buffer =
static_cast<float *
>(
MEM_mallocN(
size_t(channels) * width * height *
sizeof(
float),
2953 "display transform temp buffer"));
2954 memcpy(buffer, linear_buffer,
size_t(channels) * width * height *
sizeof(
float));
2976 float *linear_buffer,
2988 buffer =
static_cast<float *
>(
MEM_mallocN(
size_t(channels) * width * height *
sizeof(
float),
2989 "display transform temp buffer"));
2990 memcpy(buffer, linear_buffer,
size_t(channels) * width * height *
sizeof(
float));
2996 memcpy(float_display_buffer, buffer,
size_t(channels) * width * height *
sizeof(
float));
3020 const char *display_name;
3026 return display_name;
3033 if (display_name[0] ==
'\0') {
3048 index = last_display->
index;
3051 display = MEM_cnew<ColorManagedDisplay>(
"ColorManagedDisplay");
3053 display->index = index + 1;
3065 if (
STREQ(display->name, name)) {
3086 return display->index;
3099 return display->name;
3109 return display->name;
3152 if (!name || name[0] ==
'\0') {
3164 view = MEM_cnew<ColorManagedView>(
"ColorManagedView");
3165 view->index = index + 1;
3178 if (
STREQ(view->name, name)) {
3196 if (display ==
nullptr) {
3280 for (i =
int(strlen(description)) - 1; i >= 0; i--) {
3281 if (
ELEM(description[i],
'\r',
'\n')) {
3282 description[i] =
'\0';
3289 for (i = 0, n = strlen(description); i < n; i++) {
3290 if (
ELEM(description[i],
'\r',
'\n')) {
3291 description[i] =
' ';
3297 const char *description,
3304 colorspace = MEM_cnew<ColorSpace>(
"ColorSpace");
3315 colorspace->
is_data = is_data;
3318 prev_space = prev_space->
next)
3324 prev_space->
index = counter++;
3334 colorspace->
index = counter++;
3335 for (; prev_space; prev_space = prev_space->
next) {
3336 prev_space->
index = counter++;
3347 if (
STREQ(colorspace->name, name)) {
3351 for (
int i = 0; i < colorspace->num_aliases; i++) {
3352 if (
STREQ(colorspace->aliases[i], name)) {
3379 return colorspace->
index;
3390 return colorspace->
name;
3398 return colorspace->
name;
3407 if (colorspace && colorspace->
is_data) {
3413 if (type !=
nullptr) {
3414 if (type->save !=
nullptr) {
3416 type->default_save_role);
3417 STRNCPY(colorspace_settings->
name, role_colorspace);
3433 look = MEM_cnew<ColorManagedLook>(
"ColorManagedLook");
3434 look->
index = index + 1;
3441 const char *separator_offset = strstr(look->
name,
" - ");
3442 if (separator_offset) {
3457 if (
STREQ(look->name, name)) {
3498 if (!default_look) {
3502 return default_look->
name;
3506 const char *look_name)
3524 return other_look->name;
3542 item.
value = display->index;
3543 item.
name = display->name;
3558 item.
value = view->index;
3559 item.
name = view->name;
3569 const char *display_name)
3584 const char *view_name)
3595 item.
value = look->index;
3596 item.
name = look->ui_name;
3610 if (!colorspace->is_invertible) {
3614 item.
value = colorspace->index;
3615 item.
name = colorspace->name;
3642 uchar *display_buffer,
3643 const float *linear_buffer,
3644 const uchar *byte_buffer,
3647 int linear_offset_x,
3648 int linear_offset_y,
3657 float dither = ibuf->
dither;
3659 float *display_buffer_float =
nullptr;
3660 const int width = xmax - xmin;
3661 const int height = ymax - ymin;
3664 if (dither != 0.0f) {
3672 if (!cm_processor) {
3676 display_buffer_float =
static_cast<float *
>(
MEM_callocN(
3677 size_t(channels) * width * height *
sizeof(
float),
"display buffer for dither"));
3681 for (y = ymin; y < ymax; y++) {
3682 for (x = xmin; x < xmax; x++) {
3683 size_t display_index = (size_t(y) * display_stride +
x) * 4;
3684 size_t linear_index = (size_t(y - linear_offset_y) * linear_stride +
3685 (x - linear_offset_x)) *
3689 if (linear_buffer) {
3690 if (channels == 4) {
3691 copy_v4_v4(pixel, (
float *)linear_buffer + linear_index);
3693 else if (channels == 3) {
3694 copy_v3_v3(pixel, (
float *)linear_buffer + linear_index);
3697 else if (channels == 1) {
3698 pixel[0] = linear_buffer[linear_index];
3701 BLI_assert_msg(0,
"Unsupported number of channels in partial buffer update");
3704 else if (byte_buffer) {
3714 if (display_buffer_float) {
3715 size_t index = (size_t(y - ymin) * width + (x - xmin)) *
channels;
3717 if (channels == 4) {
3718 copy_v4_v4(display_buffer_float + index, pixel);
3720 else if (channels == 3) {
3721 copy_v3_v3(display_buffer_float + index, pixel);
3724 display_buffer_float[index] = pixel[0];
3728 if (channels == 4) {
3729 float pixel_straight[4];
3733 else if (channels == 3) {
3735 display_buffer[display_index + 3] = 255;
3738 display_buffer[display_index] = display_buffer[display_index + 1] =
3739 display_buffer[display_index + 2] = display_buffer[display_index + 3] =
3747 if (display_buffer_float) {
3762 for (i = ymin; i < ymax; i++) {
3763 size_t byte_offset = (size_t(linear_stride) * i + xmin) * 4;
3764 size_t display_offset = (size_t(display_stride) * i + xmin) * 4;
3767 display_buffer + display_offset, byte_buffer + byte_offset,
sizeof(
char[4]) * width);
3772 if (display_buffer_float) {
3773 size_t display_index = (size_t(ymin) * display_stride + xmin) * channels;
3776 display_buffer_float,
3806 int ymin = data->
ymin + scanline;
3807 const int num_scanlines = 1;
3809 data->display_buffer,
3810 data->linear_buffer,
3812 data->display_stride,
3813 data->linear_stride,
3814 data->linear_offset_x,
3815 data->linear_offset_y,
3820 ymin + num_scanlines);
3825 const float *linear_buffer,
3826 const uchar *byte_buffer,
3840 void *cache_handle =
nullptr;
3841 uchar *display_buffer =
nullptr;
3842 int buffer_width = ibuf->
x;
3845 int view_flag, display_index;
3850 view_flag = 1 << (cache_view_settings.
view - 1);
3851 display_index = cache_display_settings.
display - 1;
3857 ibuf, &cache_view_settings, &cache_display_settings, &cache_handle);
3864 buffer_width = ibuf->
x;
3873 if (display_buffer) {
3875 bool skip_transform =
false;
3882 if (linear_buffer ==
nullptr && byte_buffer !=
nullptr) {
3886 if (byte_buffer ==
nullptr && linear_buffer !=
nullptr) {
3891 if (!skip_transform) {
3898 data.display_buffer = display_buffer;
3899 data.linear_buffer = linear_buffer;
3901 data.display_stride = buffer_width;
3902 data.linear_stride = stride;
3903 data.linear_offset_x = offset_x;
3904 data.linear_offset_y = offset_y;
3905 data.cm_processor = cm_processor;
3937 const float *linear_buffer,
3938 const uchar *byte_buffer,
3966 const float *linear_buffer,
3967 const uchar *byte_buffer,
3978 int width = xmax - xmin;
3979 int height = ymax - ymin;
3980 bool do_threads = (size_t(width) * height >= 64 * 64);
4023 cm_processor = MEM_cnew<ColormanageProcessor>(
"colormanagement processor");
4025 if (view_settings) {
4026 applied_view_settings = view_settings;
4030 applied_view_settings = &default_view_settings;
4034 if (display_space) {
4040 applied_view_settings->
look,
4044 applied_view_settings->
gamma,
4046 applied_view_settings->
tint,
4055 return cm_processor;
4059 const char *to_colorspace)
4063 cm_processor = MEM_cnew<ColormanageProcessor>(
"colormanagement processor");
4068 if (processor !=
nullptr) {
4073 return cm_processor;
4139 if (channels == 4) {
4142 else if (channels == 3) {
4145 else if (channels == 1) {
4152 false,
"Incorrect number of channels passed to IMB_colormanagement_processor_apply_pixel");
4167 for (y = 0; y < height; y++) {
4168 for (x = 0; x < width; x++) {
4169 float *pixel = buffer + channels * (size_t(y) * width +
x);
4177 OCIO_PackedImageDesc *img;
4185 size_t(channels) *
sizeof(
float),
4186 size_t(channels) *
sizeof(
float) * width);
4207 for (
int y = 0; y < height; y++) {
4208 for (
int x = 0; x < width; x++) {
4209 size_t offset = channels * (size_t(y) * width +
x);
4239 curve_mapping, &curve_mapping_settings->
lut, &curve_mapping_settings->
lut_size);
4244 for (i = 0; i < 4; i++) {
4246 curve_mapping_settings->
range[i] = cuma->
range;
4269 if (!use_curve_mapping) {
4279 return curve_mapping_settings;
4288 if (use_curve_mapping) {
4296 curve_mapping_settings->
lut =
nullptr;
4300 if (use_curve_mapping) {
4313 return curve_mapping_settings;
4327 bool do_overlay_merge)
4332 if (view_settings) {
4333 applied_view_settings = view_settings;
4339 applied_view_settings = &default_view_settings;
4344 applied_view_settings);
4352 const char *look = (use_look) ? applied_view_settings->
look :
"";
4353 const float exposure = applied_view_settings->
exposure;
4354 const float gamma = applied_view_settings->
gamma;
4355 const float scale = (exposure == 0.0f) ? 1.0f :
powf(2.0f, exposure);
4356 const float exponent = (gamma == 1.0f) ? 1.0f : 1.0f /
max_ff(FLT_EPSILON, gamma);
4357 const float temperature = applied_view_settings->
temperature;
4358 const float tint = applied_view_settings->
tint;
4359 const bool use_white_balance = (applied_view_settings->
flag &
4372 curve_mapping_settings,
4394 view_settings, display_settings,
nullptr, dither, predivide,
false);
4408 view_settings, display_settings, from_colorspace, dither, predivide,
false);
4437 {2.48845471e+03f, -1.11330907e-03f, 3.22621544e+00f},
4438 {3.34143193e+03f, -4.86551192e-04f, 1.76486769e+00f},
4439 {4.09461742e+03f, -1.27446582e-04f, 7.25731635e-01f},
4440 {4.67028036e+03f, 2.91258199e-05f, 1.26703442e-01f},
4441 {4.59509185e+03f, 2.87495649e-05f, 1.50345020e-01f},
4442 {3.78717450e+03f, 9.35907826e-06f, 3.99075871e-01f}};
4445 {-4.88999748e+02f, 6.04330754e-04f, -7.55807526e-02f},
4446 {-7.55994277e+02f, 3.16730098e-04f, 4.78306139e-01f},
4447 {-1.02363977e+03f, 1.20223470e-04f, 9.36662319e-01f},
4448 {-1.26571316e+03f, 4.87340896e-06f, 1.27054498e+00f},
4449 {-1.42529332e+03f, -4.01150431e-05f, 1.43972784e+00f},
4450 {-1.17554822e+03f, -2.16378048e-05f, 1.30408023e+00f},
4451 {-5.00799571e+02f, -4.59832026e-06f, 1.09098763e+00f}};
4454 {5.96945309e-11f, -4.85742887e-08f, -9.70622247e-05f, -4.07936148e-03f},
4455 {2.40430366e-11f, 5.55021075e-08f, -1.98503712e-04f, 2.89312858e-02f},
4456 {-1.40949732e-11f, 1.89878968e-07f, -3.56632824e-04f, 9.10767778e-02f},
4457 {-3.61460868e-11f, 2.84822009e-07f, -4.93211319e-04f, 1.56723440e-01f},
4458 {-1.97075738e-11f, 1.75359352e-07f, -2.50542825e-04f, -2.22783266e-02f},
4459 {-1.61997957e-13f, -1.64216008e-08f, 3.86216271e-04f, -7.38077418e-01f},
4460 {6.72650283e-13f, -2.73078809e-08f, 4.24098264e-04f, -7.52335691e-01f}};
4464 if (t >= 12000.0f) {
4465 rec709[0] = 0.8262954810464208f;
4466 rec709[1] = 0.9945080501520986f;
4467 rec709[2] = 1.566307710274283f;
4469 else if (t < 800.0f) {
4470 rec709[0] = 5.413294490189271f;
4471 rec709[1] = -0.20319390035873933f;
4472 rec709[2] = -0.0822535242887164f;
4475 int i = (t >= 6365.0f) ? 6 :
4476 (t >= 3315.0f) ? 5 :
4477 (t >= 1902.0f) ? 4 :
4478 (t >= 1449.0f) ? 3 :
4479 (t >= 1167.0f) ? 2 :
4487 const float t_inv = 1.0f / t;
4488 rec709[0] = r[0] * t_inv + r[1] * t + r[2];
4489 rec709[1] = g[0] * t_inv + g[1] * t + g[2];
4490 rec709[2] = ((
b[0] * t +
b[1]) * t +
b[2]) * t +
b[3];
4512 for (
int i = 0; i < width; i++) {
4513 float temperature =
min + (max -
min) /
float(width) *
float(i);
4531 {0.0014f, 0.0000f, 0.0065f}, {0.0022f, 0.0001f, 0.0105f}, {0.0042f, 0.0001f, 0.0201f},
4532 {0.0076f, 0.0002f, 0.0362f}, {0.0143f, 0.0004f, 0.0679f}, {0.0232f, 0.0006f, 0.1102f},
4533 {0.0435f, 0.0012f, 0.2074f}, {0.0776f, 0.0022f, 0.3713f}, {0.1344f, 0.0040f, 0.6456f},
4534 {0.2148f, 0.0073f, 1.0391f}, {0.2839f, 0.0116f, 1.3856f}, {0.3285f, 0.0168f, 1.6230f},
4535 {0.3483f, 0.0230f, 1.7471f}, {0.3481f, 0.0298f, 1.7826f}, {0.3362f, 0.0380f, 1.7721f},
4536 {0.3187f, 0.0480f, 1.7441f}, {0.2908f, 0.0600f, 1.6692f}, {0.2511f, 0.0739f, 1.5281f},
4537 {0.1954f, 0.0910f, 1.2876f}, {0.1421f, 0.1126f, 1.0419f}, {0.0956f, 0.1390f, 0.8130f},
4538 {0.0580f, 0.1693f, 0.6162f}, {0.0320f, 0.2080f, 0.4652f}, {0.0147f, 0.2586f, 0.3533f},
4539 {0.0049f, 0.3230f, 0.2720f}, {0.0024f, 0.4073f, 0.2123f}, {0.0093f, 0.5030f, 0.1582f},
4540 {0.0291f, 0.6082f, 0.1117f}, {0.0633f, 0.7100f, 0.0782f}, {0.1096f, 0.7932f, 0.0573f},
4541 {0.1655f, 0.8620f, 0.0422f}, {0.2257f, 0.9149f, 0.0298f}, {0.2904f, 0.9540f, 0.0203f},
4542 {0.3597f, 0.9803f, 0.0134f}, {0.4334f, 0.9950f, 0.0087f}, {0.5121f, 1.0000f, 0.0057f},
4543 {0.5945f, 0.9950f, 0.0039f}, {0.6784f, 0.9786f, 0.0027f}, {0.7621f, 0.9520f, 0.0021f},
4544 {0.8425f, 0.9154f, 0.0018f}, {0.9163f, 0.8700f, 0.0017f}, {0.9786f, 0.8163f, 0.0014f},
4545 {1.0263f, 0.7570f, 0.0011f}, {1.0567f, 0.6949f, 0.0010f}, {1.0622f, 0.6310f, 0.0008f},
4546 {1.0456f, 0.5668f, 0.0006f}, {1.0026f, 0.5030f, 0.0003f}, {0.9384f, 0.4412f, 0.0002f},
4547 {0.8544f, 0.3810f, 0.0002f}, {0.7514f, 0.3210f, 0.0001f}, {0.6424f, 0.2650f, 0.0000f},
4548 {0.5419f, 0.2170f, 0.0000f}, {0.4479f, 0.1750f, 0.0000f}, {0.3608f, 0.1382f, 0.0000f},
4549 {0.2835f, 0.1070f, 0.0000f}, {0.2187f, 0.0816f, 0.0000f}, {0.1649f, 0.0610f, 0.0000f},
4550 {0.1212f, 0.0446f, 0.0000f}, {0.0874f, 0.0320f, 0.0000f}, {0.0636f, 0.0232f, 0.0000f},
4551 {0.0468f, 0.0170f, 0.0000f}, {0.0329f, 0.0119f, 0.0000f}, {0.0227f, 0.0082f, 0.0000f},
4552 {0.0158f, 0.0057f, 0.0000f}, {0.0114f, 0.0041f, 0.0000f}, {0.0081f, 0.0029f, 0.0000f},
4553 {0.0058f, 0.0021f, 0.0000f}, {0.0041f, 0.0015f, 0.0000f}, {0.0029f, 0.0010f, 0.0000f},
4554 {0.0020f, 0.0007f, 0.0000f}, {0.0014f, 0.0005f, 0.0000f}, {0.0010f, 0.0004f, 0.0000f},
4555 {0.0007f, 0.0002f, 0.0000f}, {0.0005f, 0.0002f, 0.0000f}, {0.0003f, 0.0001f, 0.0000f},
4556 {0.0002f, 0.0001f, 0.0000f}, {0.0002f, 0.0001f, 0.0000f}, {0.0001f, 0.0000f, 0.0000f},
4557 {0.0001f, 0.0000f, 0.0000f}, {0.0001f, 0.0000f, 0.0000f}, {0.0000f, 0.0000f, 0.0000f}};
4561 float ii = (lambda_nm - 380.0f) * (1.0f / 5.0f);
4564 if (i < 0 || i >= 80) {
4572 xyz[0] = c[0] + ii * (c[3] - c[0]);
4573 xyz[1] = c[1] + ii * (c[4] - c[1]);
4574 xyz[2] = c[2] + ii * (c[5] - c[2]);
4593 for (
int i = 0; i < width; i++) {
4594 float wavelength = 380 + 400 /
float(width) *
float(i);
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
SpaceImage * CTX_wm_space_image(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
struct LinkData * BLI_genericNodeN(void *data)
MINLINE float max_ff(float a, float b)
MINLINE void straight_to_premul_v4(float color[4])
void BLI_init_srgb_conversion(void)
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
MINLINE void premul_to_straight_v4_v4(float straight[4], const float premul[4])
void srgb_to_linearrgb_v3_v3(float linear[3], const float srgb[3])
void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void clamp_v3(float vec[3], float min, float max)
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define BLI_path_join(...)
const char * BLI_getenv(const char *env) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void BLI_rcti_union(struct rcti *rct_a, const struct rcti *rct_b)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
#define STRNCPY(dst, src)
int char char int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
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)
void BLI_thread_unlock(int type)
void BLI_thread_lock(int type)
#define BLI_MUTEX_INITIALIZER
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
@ CUMA_EXTEND_EXTRAPOLATE
@ COLORMANAGE_VIEW_USE_WHITE_BALANCE
@ COLORMANAGE_VIEW_USE_CURVES
@ COLORMANAGE_VIEW_USE_HDR
BLI_INLINE void IMB_colormanagement_xyz_to_scene_linear(float scene_linear[3], const float xyz[3])
BLI_INLINE void IMB_colormanagement_rec709_to_scene_linear(float scene_linear[3], const float rec709[3])
BLI_INLINE void IMB_colormanagement_scene_linear_to_xyz(float xyz[3], const float scene_linear[3])
@ COLOR_ROLE_DEFAULT_FLOAT
@ COLOR_ROLE_DEFAULT_BYTE
@ COLOR_ROLE_SCENE_LINEAR
@ COLOR_ROLE_COLOR_PICKING
@ COLOR_ROLE_DEFAULT_SEQUENCER
@ COLOR_ROLE_TEXTURE_PAINTING
#define MAX_COLORSPACE_NAME
struct OCIO_ConstCPUProcessorRc * OCIO_ConstCPUProcessorRcPtr
Function declarations for filter.cc.
void imb_freerectImBuf(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
void IMB_make_writable_byte_buffer(ImBuf *ibuf)
void IMB_rect_from_float(ImBuf *ibuf)
void IMB_processor_apply_threaded(int buffer_lines, int handle_size, void *init_customdata, void(init_handle)(void *handle, int start_line, int tot_line, void *customdata), void *(do_thread)(void *))
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
void IMB_buffer_byte_from_byte(unsigned char *rect_to, const unsigned char *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_byte(float *rect_to, const unsigned char *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_float(float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_make_writable_float_buffer(ImBuf *ibuf)
void IMB_processor_apply_threaded_scanlines(int total_scanlines, ScanlineThreadFunc do_thread, void *custom_data)
void IMB_buffer_byte_from_float(unsigned char *rect_to, const float *rect_from, int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
bool imb_addrectImBuf(ImBuf *ibuf, bool initialize_pixels=true)
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3])
void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership)
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3])
void IMB_float_from_rect(ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
@ IMB_COLORMANAGE_IS_DATA
@ IB_alphamode_channel_packed
@ IB_DISPLAY_BUFFER_INVALID
void IMB_moviecache_free(MovieCache *cache)
ImBuf * IMB_moviecache_get(MovieCache *cache, void *userkey, bool *r_is_cached_empty)
void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf)
MovieCache * IMB_moviecache_create(const char *name, int keysize, GHashHashFP hashfp, GHashCmpFP cmpfp)
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
constexpr int64_t first() const
static void partial_buffer_update_rect(ImBuf *ibuf, uchar *display_buffer, const float *linear_buffer, const uchar *byte_buffer, int display_stride, int linear_stride, int linear_offset_x, int linear_offset_y, ColormanageProcessor *cm_processor, const int xmin, const int ymin, const int xmax, const int ymax)
static char global_role_data[MAX_COLORSPACE_NAME]
ColorManagedView * colormanage_view_add(const char *name)
static void * do_display_buffer_apply_thread(void *handle_v)
static ListBase global_colorspaces
static void display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle, int height, float *linear_buffer, bool *is_straight_alpha)
void IMB_colormanagement_pixel_to_display_space_v3(float result[3], const float pixel[3], const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static const float blackbody_table_r[7][3]
void IMB_colormanagement_assign_byte_colorspace(ImBuf *ibuf, const char *name)
void IMB_colormanagement_display_to_scene_linear_v3(float pixel[3], ColorManagedDisplay *display)
float imbuf_scene_linear_to_aces[3][3]
static void blackbody_temperature_to_rec709(float rec709[3], float t)
static uint colormanage_hashhash(const void *key_v)
static void display_buffer_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
bool IMB_colormanagement_space_is_data(ColorSpace *colorspace)
void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *totitem)
float imbuf_luma_coefficients[3]
static void curve_mapping_to_ocio_settings(CurveMapping *curve_mapping, OCIO_CurveMappingSettings *curve_mapping_settings)
ColorManagedLook * colormanage_look_add(const char *name, const char *process_space, bool is_noop)
bool IMB_colormanagement_set_whitepoint(const float whitepoint[3], float &temperature, float &tint)
const char * IMB_colormanagement_colorspace_get_indexed_name(int index)
const char * colormanage_view_get_default_name(const ColorManagedDisplay *display)
void colormanage_cache_free(ImBuf *ibuf)
static float cie_color_match[81][3]
ColormanageProcessor * IMB_colormanagement_colorspace_processor_new(const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_assign_float_colorspace(ImBuf *ibuf, const char *name)
void IMB_colormanagement_wavelength_to_rgb(float r_dest[4], float value)
ColorManagedView * colormanage_view_get_indexed(int index)
static void colormanage_check_colorspace_settings(ColorManagedColorspaceSettings *colorspace_settings, const char *what)
const char * IMB_colormanagement_display_get_none_name()
bool IMB_colormanagement_space_is_srgb(ColorSpace *colorspace)
uchar * IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, void **cache_handle)
void IMB_colormanagement_pixel_to_display_space_v4(float result[4], const float pixel[4], const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
void IMB_colormanagement_transform_byte(uchar *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
static void colormanage_cachedata_set(ImBuf *ibuf, ColormanageCacheData *data)
static OCIO_ConstCPUProcessorRcPtr * create_display_buffer_processor(const char *look, const char *view_transform, const char *display, const float exposure, const float gamma, const float temperature, const float tint, const bool use_white_balance, const char *from_colorspace)
static void colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, bool make_byte)
blender::float3x3 IMB_colormanagement_get_scene_linear_to_xyz()
bool IMB_colormanagement_space_is_scene_linear(ColorSpace *colorspace)
float imbuf_rec709_to_scene_linear[3][3]
static OCIO_ConstCPUProcessorRcPtr * colorspace_from_scene_linear_cpu_processor(ColorSpace *colorspace)
void IMB_colormanagement_processor_apply_byte(ColormanageProcessor *cm_processor, uchar *buffer, int width, int height, int channels)
void IMB_colormanagement_color_picking_to_scene_linear_v3(float scene_linear[3], const float color_picking[3])
uchar * IMB_display_buffer_acquire_ctx(const bContext *C, ImBuf *ibuf, void **cache_handle)
void IMB_colormanagement_view_items_add(EnumPropertyItem **items, int *totitem, const char *display_name)
const char * IMB_colormanagement_view_get_raw_or_default_name(const char *display_name)
static ImBuf * colormanage_cache_get_ibuf(ImBuf *ibuf, ColormanageCacheKey *key, void **cache_handle)
static char global_role_default_sequencer[MAX_COLORSPACE_NAME]
void colormanagement_exit()
const char * IMB_colormanagement_look_get_default_name()
void IMB_colormanagement_check_is_data(ImBuf *ibuf, const char *name)
void colormanagement_init()
static void processor_transform_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
bool IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float dither, bool predivide)
float imbuf_scene_linear_to_rec709[3][3]
const char * IMB_colormanagement_look_get_indexed_name(int index)
bool IMB_colormanagement_space_name_is_srgb(const char *name)
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], ColorSpace *colorspace)
bool IMB_colormanagement_space_name_is_scene_linear(const char *name)
void IMB_colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
const char * IMB_colormanagement_look_validate_for_view(const char *view_name, const char *look_name)
static OCIO_ConstCPUProcessorRcPtr * colorspace_to_scene_linear_cpu_processor(ColorSpace *colorspace)
static pthread_mutex_t processor_lock
const char * IMB_colormanagement_display_get_default_view_transform_name(ColorManagedDisplay *display)
ColorManagedLook * colormanage_look_get_named(const char *name)
void IMB_display_buffer_transform_apply(uchar *display_buffer, float *linear_buffer, int width, int height, int channels, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, bool predivide)
int IMB_colormanagement_view_get_named_index(const char *name)
static void colormanage_check_display_settings(ColorManagedDisplaySettings *display_settings, const char *what, const ColorManagedDisplay *default_display)
void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
bool IMB_colormanagement_processor_is_noop(ColormanageProcessor *cm_processor)
static void colormanage_display_buffer_process_ex(ImBuf *ibuf, float *display_buffer, uchar *display_buffer_byte, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static MovieCache * colormanage_moviecache_get(const ImBuf *ibuf)
void IMB_colormanagement_check_file_config(Main *bmain)
const char * colormanage_display_get_default_name()
static ColormanageCacheData * colormanage_cachedata_get(const ImBuf *ibuf)
static bool has_explicit_look_for_view(const char *view_name)
ImBuf * IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, bool save_as_render, bool allocate_result, const ImageFormatData *image_format)
ColormanageProcessor * IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
bool IMB_colormanagement_space_name_is_data(const char *name)
void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, const int offset_x, const int offset_y, const int width, const int height, const ImBuf *ibuf, const bool store_premultiplied)
float imbuf_scene_linear_to_xyz[3][3]
static bool colormanage_hashcmp(const void *av, const void *bv)
static OCIO_CurveMappingSettings * update_glsl_curve_mapping(const ColorManagedViewSettings *view_settings)
void IMB_colormanagement_init_default_view_settings(ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static bool is_colorspace_same_as_display(const ColorSpace *colorspace, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static bool colormanage_use_look(const char *look, const char *view_name)
void IMB_colormanagement_transform_threaded(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
void IMB_colormanagement_validate_settings(const ColorManagedDisplaySettings *display_settings, ColorManagedViewSettings *view_settings)
void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, const int width)
static void colormanage_ensure_srgb_scene_linear_info(ColorSpace *colorspace)
ColorManagedView * colormanage_view_get_named_for_display(const char *display_name, const char *name)
ColorManagedDisplay * colormanage_display_get_indexed(int index)
void IMB_colormanagement_colorspace_from_ibuf_ftype(ColorManagedColorspaceSettings *colorspace_settings, ImBuf *ibuf)
void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor, float pixel[3])
static const float blackbody_table_g[7][3]
void IMB_colormanagegent_copy_settings(ImBuf *ibuf_src, ImBuf *ibuf_dst)
static void processor_transform_apply_threaded(uchar *byte_buffer, float *float_buffer, const int width, const int height, const int channels, ColormanageProcessor *cm_processor, const bool predivide, const bool float_from_byte)
ColorManagedDisplay * colormanage_display_get_default()
void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide)
const char * IMB_colormanagement_colorspace_get_name(const ColorSpace *colorspace)
static void colormanage_display_buffer_process(ImBuf *ibuf, uchar *display_buffer, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static int global_tot_view
ColorSpace * colormanage_colorspace_add(const char *name, const char *description, bool is_invertible, bool is_data)
bool IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, float dither, bool predivide)
ColorManagedDisplay * colormanage_display_get_named(const char *name)
void IMB_display_buffer_release(void *cache_handle)
ColorSpace * colormanage_colorspace_get_indexed(int index)
void IMB_colormanagement_get_whitepoint(const float temperature, const float tint, float whitepoint[3])
static OCIO_ConstCPUProcessorRcPtr * display_from_scene_linear_processor(ColorManagedDisplay *display)
const char * IMB_colormanagement_role_colorspace_name_get(int role)
void IMB_colormanagement_display_settings_from_ctx(const bContext *C, ColorManagedViewSettings **r_view_settings, ColorManagedDisplaySettings **r_display_settings)
blender::float3x3 IMB_colormanagement_get_xyz_to_scene_linear()
const char * IMB_colormanagement_display_get_indexed_name(int index)
void IMB_partial_display_buffer_update_threaded(ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax)
void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], ColorSpace *colorspace)
const char * IMB_colormanagement_view_get_default_name(const char *display_name)
static void colormanage_cache_handle_release(void *cache_handle)
static ListBase global_looks
float imbuf_xyz_to_scene_linear[3][3]
static void do_display_buffer_apply_no_processor(DisplayBufferThread *handle)
static ListBase global_views
ColorManagedDisplay * colormanage_display_add(const char *name)
static const char * get_display_colorspace_name(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
ColorManagedView * colormanage_view_get_default(const ColorManagedDisplay *display)
#define DISPLAY_BUFFER_CHANNELS
void IMB_colormanagement_finish_glsl_draw()
float imbuf_aces_to_scene_linear[3][3]
void IMB_colormanagement_imbuf_to_byte_texture(uchar *out_buffer, const int offset_x, const int offset_y, const int width, const int height, const ImBuf *ibuf, const bool store_premultiplied)
void colormanage_imbuf_set_default_spaces(ImBuf *ibuf)
static const float blackbody_table_b[7][4]
static void imbuf_byte_to_float_cb(void *__restrict userdata, const int y, const TaskParallelTLS *__restrict)
ColorManagedLook * colormanage_look_get_indexed(int index)
ColorManagedView * colormanage_view_get_named(const char *name)
void IMB_colormanagement_scene_linear_to_colorspace(float *buffer, int width, int height, int channels, ColorSpace *colorspace)
static void * do_processor_transform_thread(void *handle_v)
static void colormanage_description_strip(char *description)
int IMB_colormanagement_look_get_named_index(const char *name)
void IMB_colormanagement_transform_from_byte(float *float_buffer, uchar *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
static ImBuf * imbuf_ensure_editable(ImBuf *ibuf, ImBuf *colormanaged_ibuf, bool allocate_result)
static void colormanage_display_settings_to_cache(ColormanageCacheDisplaySettings *cache_display_settings, const ColorManagedDisplaySettings *display_settings)
static void display_buffer_apply_threaded(ImBuf *ibuf, const float *buffer, uchar *byte_buffer, float *display_buffer, uchar *display_buffer_byte, ColormanageProcessor *cm_processor)
void colorspace_set_default_role(char *colorspace, int size, int role)
static ListBase global_displays
static void colormanagement_transform_ex(uchar *byte_buffer, float *float_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide, bool do_threaded)
static bool colormanage_load_config(OCIO_ConstConfigRcPtr *config)
static int global_tot_display
static OCIO_ConstCPUProcessorRcPtr * display_to_scene_linear_processor(ColorManagedDisplay *display)
static void imb_partial_display_buffer_update_ex(ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax, bool do_threads)
static void partial_buffer_update_rect_thread_do(void *data_v, int scanline)
static void colormanage_cache_put(ImBuf *ibuf, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings, uchar *display_buffer, void **cache_handle)
const char * IMB_colormanagement_view_get_indexed_name(int index)
void IMB_colormanagement_display_items_add(EnumPropertyItem **items, int *totitem)
void IMB_colormanagement_blackbody_temperature_to_rgb_table(float *r_table, const int width, const float min, const float max)
void IMB_colormanagement_scene_linear_to_color_picking_v3(float color_picking[3], const float scene_linear[3])
static int global_tot_colorspace
static char global_role_scene_linear[MAX_COLORSPACE_NAME]
bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge)
static void colormanagement_view_item_add(EnumPropertyItem **items, int *totitem, ColorManagedView *view)
void IMB_colormanagement_blackbody_temperature_to_rgb(float r_dest[4], float value)
int IMB_colormanagement_colorspace_get_named_index(const char *name)
void IMB_display_buffer_transform_apply_float(float *float_display_buffer, float *linear_buffer, int width, int height, int channels, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, bool predivide)
static char global_role_texture_painting[MAX_COLORSPACE_NAME]
static ColorSpace * display_transform_get_colorspace(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
static void colormanage_settings_to_key(ColormanageCacheKey *key, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings)
static void curve_mapping_apply_pixel(const CurveMapping *curve_mapping, float *pixel, int channels)
bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const bContext *C, ColorSpace *from_colorspace, float dither, bool predivide)
void colormanage_imbuf_make_linear(ImBuf *ibuf, const char *from_colorspace)
void IMB_colormanagement_processor_apply_v4_predivide(ColormanageProcessor *cm_processor, float pixel[4])
static bool seq_callback(Sequence *seq, void *)
void IMB_colormanagement_transform_byte_threaded(uchar *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_look_items_add(EnumPropertyItem **items, int *totitem, const char *view_name)
static int global_tot_looks
static bool colormanage_role_color_space_name_get(OCIO_ConstConfigRcPtr *config, char *colorspace_name, const char *role, const char *backup_role)
static OCIO_ConstProcessorRcPtr * create_colorspace_transform_processor(const char *from_colorspace, const char *to_colorspace)
static char global_role_default_byte[MAX_COLORSPACE_NAME]
static char global_role_default_float[MAX_COLORSPACE_NAME]
ColorSpace * colormanage_colorspace_get_named(const char *name)
void IMB_colormanagement_processor_free(ColormanageProcessor *cm_processor)
const char * IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf)
void IMB_partial_display_buffer_update_delayed(ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax)
static void colormanage_free_config()
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], bool predivide, ColorSpace *colorspace)
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], ColorManagedDisplay *display)
static void colormanage_view_settings_to_cache(ImBuf *ibuf, ColormanageCacheViewSettings *cache_view_settings, const ColorManagedViewSettings *view_settings)
void IMB_colormanagement_transform(float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide)
void IMB_colormanagement_processor_apply_v4(ColormanageProcessor *cm_processor, float pixel[4])
int IMB_colormanagement_display_get_named_index(const char *name)
static char global_role_color_picking[MAX_COLORSPACE_NAME]
static uchar * colormanage_cache_get(ImBuf *ibuf, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings, void **cache_handle)
const char * IMB_colormanagement_get_float_colorspace(ImBuf *ibuf)
static void colormanage_check_view_settings(ColorManagedDisplaySettings *display_settings, ColorManagedViewSettings *view_settings, const char *what)
static void wavelength_to_xyz(float xyz[3], float lambda_nm)
const char * IMB_colormanagement_display_get_default_name()
static MovieCache * colormanage_moviecache_ensure(ImBuf *ibuf)
static bool colormanage_compatible_look(const ColorManagedLook *look, const char *view_name, const bool has_explicit_look)
bool IMB_colormanagement_support_glsl_draw(const ColorManagedViewSettings *)
void IMB_colormanagement_processor_apply_pixel(ColormanageProcessor *cm_processor, float *pixel, int channels)
void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, uchar *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace)
void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, ColorSpace *colorspace, bool predivide)
ColorSpace * colormanage_colorspace_get_roled(int role)
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
const ImFileType * IMB_file_type_from_ibuf(const ImBuf *ibuf)
void IMB_premultiply_rect_float(float *rect_float, int channels, int w, int h)
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
void IMB_freeImBuf(ImBuf *)
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
#define unit_float_to_uchar_clamp(val)
float3 whitepoint_from_temp_tint(float temperature, float tint)
bool whitepoint_to_temp_tint(const float3 &white, float &temperature, float &tint)
MatBase< float, 3, 3 > float3x3
const char * OCIO_configGetDefaultView(OCIO_ConstConfigRcPtr *config, const char *display)
void OCIO_cpuProcessorApplyRGB(OCIO_ConstCPUProcessorRcPtr *cpu_processor, float *pixel)
void OCIO_cpuProcessorApplyRGBA(OCIO_ConstCPUProcessorRcPtr *cpu_processor, float *pixel)
OCIO_ConstConfigRcPtr * OCIO_getCurrentConfig()
const char * OCIO_colorSpaceGetName(OCIO_ConstColorSpaceRcPtr *cs)
void OCIO_configGetXYZtoSceneLinear(OCIO_ConstConfigRcPtr *config, float xyz_to_scene_linear[3][3])
const char * OCIO_configGetColorSpaceNameByIndex(OCIO_ConstConfigRcPtr *config, int index)
OCIO_PackedImageDesc * OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels, long chanStrideBytes, long xStrideBytes, long yStrideBytes)
OCIO_ConstConfigRcPtr * OCIO_configCreateFromEnv()
bool OCIO_gpuDisplayShaderBind(OCIO_ConstConfigRcPtr *config, const char *input, const char *view, const char *display, const char *look, OCIO_CurveMappingSettings *curve_mapping_settings, const float scale, const float exponent, const float dither, const float temperature, const float tint, const bool use_predivide, const bool use_overlay, const bool use_hdr, const bool use_white_balance)
void OCIO_lookRelease(OCIO_ConstLookRcPtr *look)
const char * OCIO_configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, const char *display, const char *view)
void OCIO_cpuProcessorApply(OCIO_ConstCPUProcessorRcPtr *cpu_processor, OCIO_PackedImageDesc *img)
void OCIO_gpuDisplayShaderUnbind()
void OCIO_colorSpaceIsBuiltin(OCIO_ConstConfigRcPtr *config, OCIO_ConstColorSpaceRcPtr *cs, bool *is_scene_linear, bool *is_srgb)
OCIO_ConstConfigRcPtr * OCIO_configCreateFromFile(const char *filename)
void OCIO_colorSpaceRelease(OCIO_ConstColorSpaceRcPtr *cs)
OCIO_ConstColorSpaceRcPtr * OCIO_configGetColorSpace(OCIO_ConstConfigRcPtr *config, const char *name)
const char * OCIO_configGetDefaultDisplay(OCIO_ConstConfigRcPtr *config)
OCIO_ConstLookRcPtr * OCIO_configGetLook(OCIO_ConstConfigRcPtr *config, const char *name)
int OCIO_colorSpaceGetNumAliases(OCIO_ConstColorSpaceRcPtr *cs)
const char * OCIO_lookGetProcessSpace(OCIO_ConstLookRcPtr *look)
OCIO_ConstConfigRcPtr * OCIO_configCreateFallback()
OCIO_ConstProcessorRcPtr * OCIO_createDisplayProcessor(OCIO_ConstConfigRcPtr *config, const char *input, const char *view, const char *display, const char *look, const float scale, const float exponent, const float temperature, const float tint, const bool use_white_balance, const bool inverse)
OCIO_ConstCPUProcessorRcPtr * OCIO_processorGetCPUProcessor(OCIO_ConstProcessorRcPtr *processor)
void OCIO_cpuProcessorApply_predivide(OCIO_ConstCPUProcessorRcPtr *cpu_processor, OCIO_PackedImageDesc *img)
OCIO_ConstProcessorRcPtr * OCIO_configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName)
const char * OCIO_configGetDisplay(OCIO_ConstConfigRcPtr *config, int index)
void OCIO_setCurrentConfig(const OCIO_ConstConfigRcPtr *config)
int OCIO_configGetNumColorSpaces(OCIO_ConstConfigRcPtr *config)
void OCIO_configRelease(OCIO_ConstConfigRcPtr *config)
int OCIO_configGetNumViews(OCIO_ConstConfigRcPtr *config, const char *display)
void OCIO_cpuProcessorRelease(OCIO_ConstCPUProcessorRcPtr *cpu_processor)
const char * OCIO_colorSpaceGetAlias(OCIO_ConstColorSpaceRcPtr *cs, const int index)
void OCIO_cpuProcessorApplyRGBA_predivide(OCIO_ConstCPUProcessorRcPtr *processor, float *pixel)
int OCIO_colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs)
const char * OCIO_configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index)
bool OCIO_supportGPUShader()
void OCIO_PackedImageDescRelease(OCIO_PackedImageDesc *id)
const char * OCIO_configGetView(OCIO_ConstConfigRcPtr *config, const char *display, int index)
bool OCIO_cpuProcessorIsNoOp(OCIO_ConstCPUProcessorRcPtr *cpu_processor)
int OCIO_configGetNumLooks(OCIO_ConstConfigRcPtr *config)
void OCIO_processorRelease(OCIO_ConstProcessorRcPtr *processor)
int OCIO_configGetNumDisplays(OCIO_ConstConfigRcPtr *config)
int OCIO_colorSpaceIsData(OCIO_ConstColorSpaceRcPtr *cs)
const char * OCIO_colorSpaceGetDescription(OCIO_ConstColorSpaceRcPtr *cs)
void OCIO_configGetDefaultLumaCoefs(OCIO_ConstConfigRcPtr *config, float *rgb)
#define OCIO_ROLE_COLOR_PICKING
#define OCIO_ROLE_TEXTURE_PAINT
static const float OCIO_XYZ_TO_REC709[3][3]
#define OCIO_ROLE_DEFAULT_FLOAT
#define OCIO_ROLE_DEFAULT_SEQUENCER
#define OCIO_ROLE_DEFAULT_BYTE
static const float OCIO_ACES_TO_XYZ[3][3]
#define OCIO_ROLE_SCENE_LINEAR
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
char name[MAX_COLORSPACE_NAME]
ColorManagedDisplay * next
char ui_name[MAX_COLORSPACE_NAME]
char view[MAX_COLORSPACE_NAME]
char process_space[MAX_COLORSPACE_NAME]
char name[MAX_COLORSPACE_NAME]
struct CurveMapping * curve_mapping
char name[MAX_COLORSPACE_NAME]
struct ColorSpace::@676 info
OCIO_ConstCPUProcessorRcPtr * from_scene_linear
char(* aliases)[MAX_COLORSPACE_NAME]
char name[MAX_COLORSPACE_NAME]
char description[MAX_COLORSPACE_DESCRIPTION]
OCIO_ConstCPUProcessorRcPtr * to_scene_linear
int curve_mapping_timestamp
CurveMapping * curve_mapping
CurveMapping * curve_mapping
ColormanageCacheData * data
CurveMapping * curve_mapping
OCIO_ConstCPUProcessorRcPtr * cpu_processor
ColormanageProcessor * cm_processor
const char * float_colorspace
const char * byte_colorspace
uchar * display_buffer_byte
const char * byte_colorspace
uchar * display_buffer_byte
ColormanageProcessor * cm_processor
const char * float_colorspace
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
unsigned int * display_buffer_flags
ColormanageCache * colormanage_cache
OCIO_ConstCPUProcessorRcPtr * processor
int use_extend_extrapolate
ColormanageProcessor * cm_processor
const uchar * byte_buffer
const float * linear_buffer
ColorManagedColorspaceSettings colorspace_settings
OCIO_ConstCPUProcessorRcPtr * cpu_processor_to
OCIO_ConstCPUProcessorRcPtr * cpu_processor_from
CurveMapping * orig_curve_mapping
int curve_mapping_timestamp
OCIO_CurveMappingSettings curve_mapping_settings
CurveMapping * curve_mapping