|
Blender V4.3
|
#include "IMB_colormanagement.hh"#include "IMB_colormanagement_intern.hh"#include <cmath>#include <cstring>#include "DNA_color_types.h"#include "DNA_image_types.h"#include "DNA_movieclip_types.h"#include "DNA_scene_types.h"#include "DNA_sequence_types.h"#include "DNA_space_types.h"#include "IMB_filetype.hh"#include "IMB_filter.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_metadata.hh"#include "IMB_moviecache.hh"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math_color.h"#include "BLI_math_color.hh"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_task.h"#include "BLI_task.hh"#include "BLI_threads.h"#include "BKE_appdir.hh"#include "BKE_colortools.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_image_format.hh"#include "BKE_main.hh"#include "GPU_capabilities.hh"#include "RNA_define.hh"#include "SEQ_iterator.hh"#include <ocio_capi.h>Go to the source code of this file.
Classes | |
| struct | ColormanageProcessor |
| struct | global_gpu_state |
| struct | global_color_picking_state |
| struct | ColormanageCacheViewSettings |
| struct | ColormanageCacheDisplaySettings |
| struct | ColormanageCacheKey |
| struct | ColormanageCacheData |
| struct | ColormanageCache |
| struct | DisplayBufferThread |
| struct | DisplayBufferInitData |
| struct | ProcessorTransformThread |
| struct | ProcessorTransformInitData |
| struct | ImbufByteToFloatData |
| struct | PartialThreadData |
Rendering Tables | |
| static const float | blackbody_table_r [7][3] |
| static const float | blackbody_table_g [7][3] |
| static const float | blackbody_table_b [7][4] |
| static float | cie_color_match [81][3] |
| static void | blackbody_temperature_to_rec709 (float rec709[3], float t) |
| void | IMB_colormanagement_blackbody_temperature_to_rgb (float r_dest[4], float value) |
| void | IMB_colormanagement_blackbody_temperature_to_rgb_table (float *r_table, const int width, const float min, const float max) |
| static void | wavelength_to_xyz (float xyz[3], float lambda_nm) |
| void | IMB_colormanagement_wavelength_to_rgb (float r_dest[4], float value) |
| void | IMB_colormanagement_wavelength_to_rgb_table (float *r_table, const int width) |
| #define DISPLAY_BUFFER_CHANNELS 4 |
Definition at line 61 of file colormanagement.cc.
Referenced by display_buffer_init_handle(), and IMB_display_buffer_acquire().
Definition at line 4462 of file colormanagement.cc.
References b, blackbody_table_b, blackbody_table_g, and blackbody_table_r.
Referenced by IMB_colormanagement_blackbody_temperature_to_rgb().
| void colormanage_cache_free | ( | ImBuf * | ibuf | ) |
Definition at line 818 of file colormanagement.cc.
References ImBuf::colormanage_cache, colormanage_cachedata_get(), colormanage_moviecache_get(), ImBuf::display_buffer_flags, IMB_moviecache_free(), MEM_freeN(), and MEM_SAFE_FREE.
Referenced by IMB_freeImBuf().
|
static |
Definition at line 354 of file colormanagement.cc.
References BLI_assert, ImBuf::byte_buffer, CurveMapping::changed_timestamp, colormanage_cache_get_ibuf(), colormanage_cachedata_get(), colormanage_settings_to_key(), ColormanageCacheData::curve_mapping, ColormanageCacheViewSettings::curve_mapping, ColormanageCacheData::curve_mapping_timestamp, ImBufByteBuffer::data, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, ColormanageCacheData::dither, ColormanageCacheViewSettings::dither, ColormanageCacheData::exposure, ColormanageCacheViewSettings::exposure, ColormanageCacheData::flag, ColormanageCacheViewSettings::flag, ColormanageCacheData::gamma, ColormanageCacheViewSettings::gamma, IMB_freeImBuf(), ColormanageCacheData::look, ColormanageCacheViewSettings::look, ColormanageCacheData::temperature, ColormanageCacheViewSettings::temperature, ColormanageCacheData::tint, ColormanageCacheViewSettings::tint, ColormanageCacheViewSettings::view, ImBuf::x, and ImBuf::y.
Referenced by IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 332 of file colormanagement.cc.
References colormanage_moviecache_get(), and IMB_moviecache_get().
Referenced by colormanage_cache_get().
|
static |
Definition at line 451 of file colormanagement.cc.
References IMB_freeImBuf().
Referenced by IMB_display_buffer_release().
|
static |
Definition at line 408 of file colormanagement.cc.
References CurveMapping::changed_timestamp, colormanage_cachedata_set(), colormanage_moviecache_ensure(), colormanage_settings_to_key(), ColormanageCacheData::curve_mapping, ColormanageCacheViewSettings::curve_mapping, ColormanageCacheData::curve_mapping_timestamp, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, ColormanageCacheData::dither, ColormanageCacheViewSettings::dither, ColormanageCacheData::exposure, ColormanageCacheViewSettings::exposure, ColormanageCacheData::flag, ColormanageCacheViewSettings::flag, ColormanageCacheData::gamma, ColormanageCacheViewSettings::gamma, IB_TAKE_OWNERSHIP, IMB_allocImBuf(), IMB_assign_byte_buffer(), IMB_moviecache_put(), ColormanageCacheData::look, ColormanageCacheViewSettings::look, ImBuf::planes, ColormanageCacheData::temperature, ColormanageCacheViewSettings::temperature, ColormanageCacheData::tint, ColormanageCacheViewSettings::tint, ColormanageCacheViewSettings::view, ImBuf::x, and ImBuf::y.
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 242 of file colormanagement.cc.
References ImBuf::colormanage_cache, and ColormanageCache::data.
Referenced by colormanage_cache_free(), and colormanage_cache_get().
|
static |
Definition at line 288 of file colormanagement.cc.
References ImBuf::colormanage_cache, ColormanageCache::data, and data.
Referenced by colormanage_cache_put().
|
static |
Definition at line 1264 of file colormanagement.cc.
References colormanage_colorspace_get_named(), G, ColorManagedColorspaceSettings::name, printf, and STRNCPY.
Referenced by IMB_colormanagement_check_file_config(), and seq_callback().
|
static |
Definition at line 1160 of file colormanagement.cc.
References colormanage_display_get_named(), ColorManagedDisplaySettings::display_device, G, ColorManagedDisplay::name, printf, and STRNCPY.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 1185 of file colormanagement.cc.
References colormanage_compatible_look(), colormanage_display_get_named(), colormanage_look_get_named(), colormanage_view_get_default(), colormanage_view_get_named(), ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, G, ColorManagedViewSettings::gamma, IMB_colormanagement_look_get_default_name(), ColorManagedViewSettings::look, ColorManagedView::name, printf, STRNCPY, and ColorManagedViewSettings::view_transform.
Referenced by IMB_colormanagement_check_file_config().
| ColorSpace * colormanage_colorspace_add | ( | const char * | name, |
| const char * | description, | ||
| bool | is_invertible, | ||
| bool | is_data ) |
Definition at line 3296 of file colormanagement.cc.
References BLI_addtail(), BLI_insertlinkbefore(), BLI_strcasecmp(), colormanage_description_strip(), ColorSpace::description, ListBase::first, global_colorspaces, global_tot_colorspace, ColorSpace::index, ColorSpace::is_data, ColorSpace::is_invertible, ColorSpace::name, ColorSpace::next, and STRNCPY.
Referenced by colormanage_load_config().
| ColorSpace * colormanage_colorspace_get_indexed | ( | int | index | ) |
Definition at line 3368 of file colormanagement.cc.
References BLI_findlink(), and global_colorspaces.
Referenced by IMB_colormanagement_colorspace_get_indexed_name().
| ColorSpace * colormanage_colorspace_get_named | ( | const char * | name | ) |
Definition at line 3344 of file colormanagement.cc.
References global_colorspaces, LISTBASE_FOREACH, and STREQ.
Referenced by colormanage_check_colorspace_settings(), colormanage_colorspace_get_roled(), colormanage_imbuf_make_linear(), colormanage_imbuf_set_default_spaces(), display_transform_get_colorspace(), IMB_colormanagement_assign_byte_colorspace(), IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_check_is_data(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_colorspace_get_named_index(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_space_name_is_data(), IMB_colormanagement_space_name_is_scene_linear(), IMB_colormanagement_space_name_is_srgb(), imb_handle_alpha(), and blender::imbuf::set_colorspace_name().
| ColorSpace * colormanage_colorspace_get_roled | ( | int | role | ) |
Definition at line 3361 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and IMB_colormanagement_role_colorspace_name_get().
Referenced by IMB_saveiff().
|
static |
Definition at line 806 of file colormanagement.cc.
References colormanage_compatible_look(), and has_explicit_look_for_view().
|
static |
Definition at line 784 of file colormanagement.cc.
References ColorManagedLook::is_noop, STREQ, and ColorManagedLook::view.
Referenced by colormanage_check_view_settings(), colormanage_compatible_look(), colormanage_use_look(), IMB_colormanagement_look_items_add(), and IMB_colormanagement_look_validate_for_view().
|
static |
Definition at line 3276 of file colormanagement.cc.
References ELEM.
Referenced by colormanage_colorspace_add().
| ColorManagedDisplay * colormanage_display_add | ( | const char * | name | ) |
Definition at line 3040 of file colormanagement.cc.
References BLI_addtail(), global_displays, ColorManagedDisplay::index, ListBase::last, and STRNCPY.
Referenced by colormanage_load_config().
|
static |
Definition at line 1941 of file colormanagement.cc.
References colormanage_display_buffer_process_ex().
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 1906 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, display_buffer_apply_threaded(), ImBuf::float_buffer, IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), and is_colorspace_same_as_display().
Referenced by colormanage_display_buffer_process(), and colormanagement_imbuf_make_display_space().
| ColorManagedDisplay * colormanage_display_get_default | ( | ) |
Definition at line 3029 of file colormanagement.cc.
References colormanage_display_get_default_name(), and colormanage_display_get_named().
Referenced by IMB_colormanagement_check_file_config(), and IMB_colormanagement_display_get_default_name().
| const char * colormanage_display_get_default_name | ( | ) |
Definition at line 3017 of file colormanagement.cc.
References OCIO_configGetDefaultDisplay(), OCIO_configRelease(), and OCIO_getCurrentConfig().
Referenced by colormanage_display_get_default(), and IMB_colormanagement_display_get_none_name().
| ColorManagedDisplay * colormanage_display_get_indexed | ( | int | index | ) |
Definition at line 3073 of file colormanagement.cc.
References BLI_findlink(), and global_displays.
Referenced by IMB_colormanagement_display_get_indexed_name().
| ColorManagedDisplay * colormanage_display_get_named | ( | const char * | name | ) |
Definition at line 3062 of file colormanagement.cc.
References global_displays, LISTBASE_FOREACH, and STREQ.
Referenced by colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_display_get_default(), colormanage_view_get_named_for_display(), IMB_colormanagement_display_get_named(), IMB_colormanagement_display_get_named_index(), IMB_colormanagement_display_get_none_name(), IMB_colormanagement_init_default_view_settings(), IMB_colormanagement_validate_settings(), IMB_colormanagement_view_get_default_name(), IMB_colormanagement_view_get_raw_or_default_name(), and IMB_colormanagement_view_items_add().
|
static |
Definition at line 315 of file colormanagement.cc.
References ColormanageCacheDisplaySettings::display, ColorManagedDisplaySettings::display_device, and IMB_colormanagement_display_get_named_index().
Referenced by IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 1464 of file colormanagement.cc.
References ColorSpace::cached, ColorSpace::info, ColorSpace::is_scene_linear, ColorSpace::is_srgb, ColorSpace::name, OCIO_colorSpaceIsBuiltin(), OCIO_colorSpaceRelease(), OCIO_configGetColorSpace(), OCIO_configRelease(), and OCIO_getCurrentConfig().
Referenced by IMB_colormanagement_space_is_scene_linear(), and IMB_colormanagement_space_is_srgb().
|
static |
Definition at line 611 of file colormanagement.cc.
References ColorSpace::aliases, BLI_freelistN(), BLI_listbase_clear(), ListBase::first, ColorSpace::from_scene_linear, global_colorspaces, global_displays, global_looks, global_tot_colorspace, global_tot_display, global_tot_looks, global_tot_view, global_views, MEM_freeN(), MEM_SAFE_FREE, ColorManagedDisplay::next, ColorSpace::next, OCIO_cpuProcessorRelease(), and ColorSpace::to_scene_linear.
Referenced by colormanagement_exit(), and colormanagement_init().
|
static |
Definition at line 260 of file colormanagement.cc.
References b.
Referenced by colormanage_moviecache_ensure().
|
static |
Definition at line 251 of file colormanagement.cc.
References ColormanageCacheKey::display, and ColormanageCacheKey::view.
Referenced by colormanage_moviecache_ensure().
| void colormanage_imbuf_make_linear | ( | ImBuf * | ibuf, |
| const char * | from_colorspace ) |
Definition at line 1127 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBuf::channels, colormanage_colorspace_get_named(), ImBuf::colormanage_flag, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, global_role_scene_linear, IMB_alpha_affects_rgb(), IMB_COLORMANAGE_IS_DATA, IMB_colormanagement_transform(), imb_freerectImBuf(), ColorSpace::is_data, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_alpha().
| void colormanage_imbuf_set_default_spaces | ( | ImBuf * | ibuf | ) |
Definition at line 1122 of file colormanagement.cc.
References ImBuf::byte_buffer, colormanage_colorspace_get_named(), ImBufByteBuffer::colorspace, and global_role_default_byte.
Referenced by IMB_initImBuf().
|
static |
Definition at line 497 of file colormanagement.cc.
References ColorSpace::aliases, BLI_addtail(), BLI_genericNodeN(), BLI_strncpy(), colormanage_colorspace_add(), colormanage_display_add(), colormanage_look_add(), colormanage_role_color_space_name_get(), colormanage_view_add(), colormanage_view_get_named(), G, global_role_color_picking, global_role_data, global_role_default_byte, global_role_default_float, global_role_default_sequencer, global_role_scene_linear, global_role_texture_painting, global_tot_display, global_tot_view, imbuf_aces_to_scene_linear, imbuf_luma_coefficients, imbuf_rec709_to_scene_linear, imbuf_scene_linear_to_aces, imbuf_scene_linear_to_rec709, imbuf_scene_linear_to_xyz, imbuf_xyz_to_scene_linear, invert_m3_m3(), MAX_COLORSPACE_NAME, MEM_callocN, mul_m3_m3m3(), ColorSpace::num_aliases, OCIO_ACES_TO_XYZ, OCIO_colorSpaceGetAlias(), OCIO_colorSpaceGetDescription(), OCIO_colorSpaceGetNumAliases(), OCIO_colorSpaceIsData(), OCIO_colorSpaceIsInvertible(), OCIO_colorSpaceRelease(), OCIO_configGetColorSpace(), OCIO_configGetColorSpaceNameByIndex(), OCIO_configGetDefaultLumaCoefs(), OCIO_configGetDisplay(), OCIO_configGetLook(), OCIO_configGetLookNameByIndex(), OCIO_configGetNumColorSpaces(), OCIO_configGetNumDisplays(), OCIO_configGetNumLooks(), OCIO_configGetNumViews(), OCIO_configGetView(), OCIO_configGetXYZtoSceneLinear(), OCIO_lookGetProcessSpace(), OCIO_lookRelease(), OCIO_ROLE_COLOR_PICKING, OCIO_ROLE_DATA, OCIO_ROLE_DEFAULT_BYTE, OCIO_ROLE_DEFAULT_FLOAT, OCIO_ROLE_DEFAULT_SEQUENCER, OCIO_ROLE_SCENE_LINEAR, OCIO_ROLE_TEXTURE_PAINT, OCIO_XYZ_TO_REC709, and printf.
Referenced by colormanagement_init().
| ColorManagedLook * colormanage_look_add | ( | const char * | name, |
| const char * | process_space, | ||
| bool | is_noop ) |
Definition at line 3428 of file colormanagement.cc.
References BLI_addtail(), BLI_strncpy(), global_looks, global_tot_looks, ColorManagedLook::index, ColorManagedLook::is_noop, ColorManagedLook::name, ColorManagedLook::process_space, STRNCPY, ColorManagedLook::ui_name, and ColorManagedLook::view.
Referenced by colormanage_load_config().
| ColorManagedLook * colormanage_look_get_indexed | ( | int | index | ) |
Definition at line 3465 of file colormanagement.cc.
References BLI_findlink(), and global_looks.
Referenced by IMB_colormanagement_look_get_indexed_name().
| ColorManagedLook * colormanage_look_get_named | ( | const char * | name | ) |
Definition at line 3454 of file colormanagement.cc.
References global_looks, LISTBASE_FOREACH, and STREQ.
Referenced by colormanage_check_view_settings(), colormanage_use_look(), IMB_colormanagement_look_get_named_index(), IMB_colormanagement_look_validate_for_view(), and is_colorspace_same_as_display().
|
static |
Definition at line 268 of file colormanagement.cc.
References ImBuf::colormanage_cache, colormanage_hashcmp(), colormanage_hashhash(), IMB_moviecache_create(), and ColormanageCache::moviecache.
Referenced by colormanage_cache_put().
|
static |
Definition at line 233 of file colormanagement.cc.
References ImBuf::colormanage_cache, and ColormanageCache::moviecache.
Referenced by colormanage_cache_free(), and colormanage_cache_get_ibuf().
|
static |
Definition at line 464 of file colormanagement.cc.
References BLI_strncpy(), G, MAX_COLORSPACE_NAME, OCIO_colorSpaceGetName(), OCIO_colorSpaceRelease(), OCIO_configGetColorSpace(), and printf.
Referenced by colormanage_load_config().
|
static |
Definition at line 324 of file colormanagement.cc.
References ColormanageCacheDisplaySettings::display, ColormanageCacheKey::display, ColormanageCacheKey::view, and ColormanageCacheViewSettings::view.
Referenced by colormanage_cache_get(), and colormanage_cache_put().
|
static |
Definition at line 812 of file colormanagement.cc.
References colormanage_compatible_look(), colormanage_look_get_named(), and ColorManagedLook::is_noop.
Referenced by create_display_buffer_processor(), and IMB_colormanagement_setup_glsl_draw_from_space().
| ColorManagedView * colormanage_view_add | ( | const char * | name | ) |
Definition at line 3159 of file colormanagement.cc.
References BLI_addtail(), global_tot_view, global_views, STRNCPY, and view.
Referenced by colormanage_load_config().
| ColorManagedView * colormanage_view_get_default | ( | const ColorManagedDisplay * | display | ) |
Definition at line 3148 of file colormanagement.cc.
References colormanage_view_get_default_name(), and colormanage_view_get_named().
Referenced by colormanage_check_view_settings(), IMB_colormanagement_init_default_view_settings(), IMB_colormanagement_validate_settings(), IMB_colormanagement_view_get_default_name(), and IMB_colormanagement_view_get_raw_or_default_name().
| const char * colormanage_view_get_default_name | ( | const ColorManagedDisplay * | display | ) |
Definition at line 3138 of file colormanagement.cc.
References OCIO_configGetDefaultView(), OCIO_configRelease(), and OCIO_getCurrentConfig().
Referenced by colormanage_view_get_default(), display_from_scene_linear_processor(), display_to_scene_linear_processor(), and IMB_colormanagement_display_get_default_view_transform_name().
| ColorManagedView * colormanage_view_get_indexed | ( | int | index | ) |
Definition at line 3186 of file colormanagement.cc.
References BLI_findlink(), and global_views.
Referenced by IMB_colormanagement_view_get_indexed_name().
| ColorManagedView * colormanage_view_get_named | ( | const char * | name | ) |
Definition at line 3175 of file colormanagement.cc.
References global_views, LISTBASE_FOREACH, STREQ, and view.
Referenced by colormanage_check_view_settings(), colormanage_load_config(), colormanage_view_get_default(), and IMB_colormanagement_view_get_named_index().
| ColorManagedView * colormanage_view_get_named_for_display | ( | const char * | display_name, |
| const char * | name ) |
Definition at line 3192 of file colormanagement.cc.
References colormanage_display_get_named(), LISTBASE_FOREACH, STRCASEEQ, and view.
Referenced by IMB_colormanagement_init_default_view_settings(), and IMB_colormanagement_view_get_raw_or_default_name().
|
static |
Definition at line 297 of file colormanagement.cc.
References ColormanageCacheViewSettings::curve_mapping, ColorManagedViewSettings::curve_mapping, ColormanageCacheViewSettings::dither, ImBuf::dither, ColormanageCacheViewSettings::exposure, ColorManagedViewSettings::exposure, ColormanageCacheViewSettings::flag, ColorManagedViewSettings::flag, ColormanageCacheViewSettings::gamma, ColorManagedViewSettings::gamma, IMB_colormanagement_look_get_named_index(), IMB_colormanagement_view_get_named_index(), ColormanageCacheViewSettings::look, ColorManagedViewSettings::look, ColormanageCacheViewSettings::temperature, ColorManagedViewSettings::temperature, ColormanageCacheViewSettings::tint, ColorManagedViewSettings::tint, ColormanageCacheViewSettings::view, view, and ColorManagedViewSettings::view_transform.
Referenced by IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
| void colormanagement_exit | ( | ) |
Definition at line 736 of file colormanagement.cc.
References BKE_curvemapping_free(), colormanage_free_config(), global_color_picking_state::cpu_processor_from, global_color_picking_state::cpu_processor_to, global_gpu_state::curve_mapping, global_gpu_state::curve_mapping_settings, OCIO_CurveMappingSettings::lut, MEM_freeN(), OCIO_cpuProcessorRelease(), OCIO_exit(), and OCIO_gpuCacheFree().
Referenced by IMB_exit().
|
static |
Definition at line 2634 of file colormanagement.cc.
References ImBuf::byte_buffer, colormanage_display_buffer_process_ex(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, and imb_addrectImBuf().
Referenced by IMB_colormanagement_imbuf_for_write(), and IMB_colormanagement_imbuf_make_display_space().
| void colormanagement_init | ( | ) |
Definition at line 669 of file colormanagement.cc.
References BCM_CONFIG_FILE, BKE_appdir_folder_id(), BLENDER_DATAFILES, BLI_getenv(), BLI_init_srgb_conversion(), BLI_path_join, colormanage_free_config(), colormanage_load_config(), FILE_MAX, G, OCIO_configCreateFallback(), OCIO_configCreateFromEnv(), OCIO_configCreateFromFile(), OCIO_configRelease(), OCIO_init(), OCIO_setCurrentConfig(), and printf.
Referenced by IMB_init().
|
static |
Definition at line 2090 of file colormanagement.cc.
References IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_apply_byte(), IMB_colormanagement_processor_free(), IMB_colormanagement_processor_is_noop(), processor_transform_apply_threaded(), and STREQ.
Referenced by IMB_colormanagement_transform(), IMB_colormanagement_transform_byte(), IMB_colormanagement_transform_byte_threaded(), and IMB_colormanagement_transform_threaded().
|
static |
Definition at line 3552 of file colormanagement.cc.
References EnumPropertyItem::description, EnumPropertyItem::icon, EnumPropertyItem::identifier, EnumPropertyItem::name, RNA_enum_item_add(), and EnumPropertyItem::value.
Referenced by IMB_colormanagement_view_items_add().
|
static |
Definition at line 962 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), create_colorspace_transform_processor(), ColorSpace::from_scene_linear, global_role_scene_linear, ColorSpace::name, OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by IMB_colormanagement_scene_linear_to_colorspace(), and IMB_colormanagement_scene_linear_to_colorspace_v3().
Definition at line 1111 of file colormanagement.cc.
References BLI_strncpy(), and IMB_colormanagement_role_colorspace_name_get().
Referenced by imb_load_dpx_cineon(), imb_load_filepath_thumbnail_openexr(), imb_load_filepath_thumbnail_svg(), imb_load_filepath_thumbnail_webp(), imb_load_jp2_stream(), imb_load_jpeg(), imb_load_openexr(), imb_loadiris(), imb_loadwebp(), IMB_open_anim(), imb_thumbnail_jpeg(), and blender::imbuf::set_colorspace_name().
|
static |
Definition at line 939 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), create_colorspace_transform_processor(), global_role_scene_linear, ColorSpace::name, OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), processor_lock, and ColorSpace::to_scene_linear.
Referenced by IMB_colormanagement_colorspace_to_scene_linear(), IMB_colormanagement_colorspace_to_scene_linear_v3(), IMB_colormanagement_colorspace_to_scene_linear_v4(), and IMB_colormanagement_imbuf_to_float_texture().
|
static |
Definition at line 926 of file colormanagement.cc.
References OCIO_configGetProcessorWithNames(), OCIO_configRelease(), and OCIO_getCurrentConfig().
Referenced by colorspace_from_scene_linear_cpu_processor(), colorspace_to_scene_linear_cpu_processor(), IMB_colormanagement_color_picking_to_scene_linear_v3(), IMB_colormanagement_colorspace_processor_new(), and IMB_colormanagement_scene_linear_to_color_picking_v3().
|
static |
Definition at line 887 of file colormanagement.cc.
References colormanage_use_look(), max_ff(), OCIO_configRelease(), OCIO_createDisplayProcessor(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and powf.
Referenced by IMB_colormanagement_display_processor_new().
|
static |
Definition at line 1095 of file colormanagement.cc.
References BKE_curvemap_evaluateF(), BKE_curvemapping_evaluate_premulRGBF(), and CurveMapping::cm.
Referenced by IMB_colormanagement_processor_apply(), and IMB_colormanagement_processor_apply_pixel().
|
static |
Definition at line 4231 of file colormanagement.cc.
References BKE_curvemapping_init(), BKE_curvemapping_premultiply(), BKE_curvemapping_table_RGBA(), CurveMapping::black, OCIO_CurveMappingSettings::black, CurveMapping::bwmul, OCIO_CurveMappingSettings::bwmul, OCIO_CurveMappingSettings::cache_id, CurveMapping::changed_timestamp, CurveMapping::cm, CM_TABLE, copy_v3_v3(), CUMA_EXTEND_EXTRAPOLATE, CurveMap::ext_in, OCIO_CurveMappingSettings::ext_in_x, OCIO_CurveMappingSettings::ext_in_y, CurveMap::ext_out, OCIO_CurveMappingSettings::ext_out_x, OCIO_CurveMappingSettings::ext_out_y, OCIO_CurveMappingSettings::first_x, OCIO_CurveMappingSettings::first_y, CurveMapping::flag, OCIO_CurveMappingSettings::last_x, OCIO_CurveMappingSettings::last_y, OCIO_CurveMappingSettings::lut, OCIO_CurveMappingSettings::lut_size, CurveMap::mintable, OCIO_CurveMappingSettings::mintable, CurveMap::range, OCIO_CurveMappingSettings::range, CurveMap::table, OCIO_CurveMappingSettings::use_extend_extrapolate, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by update_glsl_curve_mapping().
|
static |
Definition at line 1637 of file colormanagement.cc.
References BLI_assert_msg, channels(), global_role_scene_linear, IMB_colormanagement_transform(), rgb_uchar_to_float(), and rgba_uchar_to_float().
Referenced by do_display_buffer_apply_thread().
|
static |
Definition at line 1838 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, display_buffer_init_handle(), do_display_buffer_apply_thread(), ImBuf::float_buffer, global_role_default_byte, DisplayBufferInitData::ibuf, IMB_processor_apply_threaded(), init_data(), ColorSpace::name, and ImBuf::y.
Referenced by colormanage_display_buffer_process_ex().
|
static |
Definition at line 1587 of file colormanagement.cc.
References channels(), ImBuf::channels, ImBuf::colormanage_flag, DISPLAY_BUFFER_CHANNELS, ImBuf::dither, IMB_alpha_affects_rgb(), IMB_COLORMANAGE_IS_DATA, init_data(), and ImBuf::x.
Referenced by display_buffer_apply_threaded().
|
static |
Definition at line 985 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), colormanage_view_get_default_name(), global_role_scene_linear, OCIO_configRelease(), OCIO_createDisplayProcessor(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by IMB_colormanagement_scene_linear_to_display_v3().
|
static |
Definition at line 1025 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), colormanage_view_get_default_name(), global_role_scene_linear, OCIO_configRelease(), OCIO_createDisplayProcessor(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by IMB_colormanagement_display_to_scene_linear_v3().
|
static |
Definition at line 874 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and get_display_colorspace_name().
Referenced by IMB_colormanagement_display_processor_new(), and IMB_colormanagement_imbuf_for_write().
|
static |
Definition at line 1717 of file colormanagement.cc.
References IB_PROFILE_SRGB, IMB_buffer_byte_from_byte(), IMB_buffer_byte_from_float(), IMB_buffer_float_from_byte(), and IMB_buffer_float_from_float().
Referenced by do_display_buffer_apply_thread().
|
static |
Definition at line 1775 of file colormanagement.cc.
References channels(), display_buffer_apply_get_linear_buffer(), do_display_buffer_apply_no_processor(), IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_colormanagement_processor_apply(), MEM_freeN(), MEM_mallocN, and straight_to_premul_v4().
Referenced by display_buffer_apply_threaded().
|
static |
Definition at line 2016 of file colormanagement.cc.
References ProcessorTransformThread::byte_buffer, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_apply_byte(), and IMB_premultiply_rect_float().
Referenced by processor_transform_apply_threaded().
|
static |
Definition at line 858 of file colormanagement.cc.
References ColorManagedDisplaySettings::display_device, OCIO_configGetDisplayColorSpaceName(), OCIO_configRelease(), OCIO_getCurrentConfig(), and ColorManagedViewSettings::view_transform.
Referenced by display_transform_get_colorspace(), and is_colorspace_same_as_display().
|
static |
Definition at line 769 of file colormanagement.cc.
References global_looks, LISTBASE_FOREACH, and STREQ.
Referenced by colormanage_compatible_look(), and IMB_colormanagement_look_items_add().
Definition at line 1396 of file colormanagement.cc.
References ImBuf::flags, IB_alphamode_channel_packed, IB_alphamode_ignore, IB_alphamode_premul, IMB_colormanagement_assign_byte_colorspace(), IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_get_float_colorspace(), and IMB_colormanagement_get_rect_colorspace().
Referenced by BKE_tracking_stabilize_frame().
| void IMB_colormanagement_assign_byte_colorspace | ( | ImBuf * | ibuf, |
| const char * | name ) |
Definition at line 1427 of file colormanagement.cc.
References ImBuf::byte_buffer, colormanage_colorspace_get_named(), ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by add_ibuf_for_tile(), IMB_colormanagegent_copy_settings(), seq_disk_cache_read_file(), and seq_imbuf_assign_spaces().
| void IMB_colormanagement_assign_float_colorspace | ( | ImBuf * | ibuf, |
| const char * | name ) |
Definition at line 1413 of file colormanagement.cc.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, ImBufFloatBuffer::colorspace, ImBuf::float_buffer, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by assign_render_pass_ibuf_colorspace(), IMB_colormanagegent_copy_settings(), prepare_effect_imbufs(), RE_render_result_rect_to_ibuf(), render_result_new_from_exr(), seq_disk_cache_read_file(), seq_imbuf_assign_spaces(), and SEQ_render_imbuf_from_sequencer_space().
Definition at line 4494 of file colormanagement.cc.
References blackbody_temperature_to_rec709(), clamp_v3(), copy_v3_v3(), FLT_MAX, and IMB_colormanagement_rec709_to_scene_linear().
Referenced by IMB_colormanagement_blackbody_temperature_to_rgb_table(), and blender::nodes::node_shader_blackbody_cc::sh_node_blackbody_build_multi_function().
| void IMB_colormanagement_blackbody_temperature_to_rgb_table | ( | float * | r_table, |
| const int | width, | ||
| const float | min, | ||
| const float | max ) |
Definition at line 4507 of file colormanagement.cc.
References float, IMB_colormanagement_blackbody_temperature_to_rgb(), and min.
Referenced by blender::nodes::node_shader_blackbody_cc::node_shader_gpu_blackbody(), and blender::nodes::node_shader_volume_principled_cc::node_shader_gpu_volume_principled().
| void IMB_colormanagement_check_file_config | ( | Main * | bmain | ) |
Definition at line 1295 of file colormanagement.cc.
References colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_display_get_default(), global_role_default_sequencer, Main::images, LISTBASE_FOREACH, Main::movieclips, ColorManagedColorspaceSettings::name, Main::scenes, seq_callback(), SEQ_for_each_callback(), and STRNCPY.
Referenced by copybuffer_append(), setup_app_data(), WM_lib_reload(), wm_lib_relocate_exec_do(), and wm_link_append_exec().
| void IMB_colormanagement_check_is_data | ( | ImBuf * | ibuf, |
| const char * | name ) |
Definition at line 1384 of file colormanagement.cc.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by add_ibuf_for_tile().
| void IMB_colormanagement_color_picking_to_scene_linear_v3 | ( | float | scene_linear[3], |
| const float | color_picking[3] ) |
Definition at line 2556 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), copy_v3_v3(), global_color_picking_state::cpu_processor_from, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, OCIO_cpuProcessorApplyRGB(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by ui_perceptual_to_scene_linear_space().
| void IMB_colormanagement_colorspace_from_ibuf_ftype | ( | ColorManagedColorspaceSettings * | colorspace_settings, |
| ImBuf * | ibuf ) |
Definition at line 3401 of file colormanagement.cc.
References colormanage_colorspace_get_named(), IMB_colormanagement_role_colorspace_name_get(), IMB_file_type_from_ibuf(), ColorSpace::is_data, ColorManagedColorspaceSettings::name, and STRNCPY.
| const char * IMB_colormanagement_colorspace_get_indexed_name | ( | int | index | ) |
Definition at line 3385 of file colormanagement.cc.
References colormanage_colorspace_get_indexed(), and ColorSpace::name.
| const char * IMB_colormanagement_colorspace_get_name | ( | const ColorSpace * | colorspace | ) |
Definition at line 3396 of file colormanagement.cc.
References ColorSpace::name.
Referenced by image_colorspace_from_imbuf().
| int IMB_colormanagement_colorspace_get_named_index | ( | const char * | name | ) |
Definition at line 3374 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and ColorSpace::index.
Referenced by blender::compositor::ConvertColorSpaceOperation::init_execution().
| void IMB_colormanagement_colorspace_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem ) |
Definition at line 3605 of file colormanagement.cc.
References EnumPropertyItem::description, global_colorspaces, EnumPropertyItem::icon, EnumPropertyItem::identifier, LISTBASE_FOREACH, EnumPropertyItem::name, RNA_enum_item_add(), and EnumPropertyItem::value.
| ColormanageProcessor * IMB_colormanagement_colorspace_processor_new | ( | const char * | from_colorspace, |
| const char * | to_colorspace ) |
Definition at line 4058 of file colormanagement.cc.
References ColormanageProcessor::cpu_processor, create_colorspace_transform_processor(), IMB_colormanagement_space_name_is_data(), ColormanageProcessor::is_data_result, OCIO_processorGetCPUProcessor(), and OCIO_processorRelease().
Referenced by colormanagement_transform_ex(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_single(), IMB_colormanagement_transform_from_byte_threaded(), IMB_colormanagement_transform_v4(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), and blender::compositor::ConvertColorSpaceOperation::init_execution().
| void IMB_colormanagement_colorspace_to_scene_linear | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| ColorSpace * | colorspace, | ||
| bool | predivide ) |
Converts a (width)x(height) block of float pixels from given color space to scene linear space. This is much higher performance than converting pixels one by one.
Definition at line 2311 of file colormanagement.cc.
References colorspace_to_scene_linear_cpu_processor(), OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), and printf.
Referenced by blender::compositor::colorspace_to_scene_linear(), IMB_float_from_rect_ex(), pixels_to_scene_linear_byte(), and pixels_to_scene_linear_float().
| void IMB_colormanagement_colorspace_to_scene_linear_v3 | ( | float | pixel[3], |
| ColorSpace * | colorspace ) |
Convert pixel from specified color space to scene linear space. For performance, use IMB_colormanagement_colorspace_to_scene_linear when converting an array of pixels.
Definition at line 2265 of file colormanagement.cc.
References colorspace_to_scene_linear_cpu_processor(), OCIO_cpuProcessorApplyRGB(), and printf.
Referenced by BKE_brush_sample_tex_3d(), ED_space_clip_color_sample(), ED_space_image_color_sample(), ED_space_node_color_sample(), blender::ed::sculpt_paint::load_tex_task_cb_ex(), multitex_nodes_intern(), and partial_buffer_update_rect().
| void IMB_colormanagement_colorspace_to_scene_linear_v4 | ( | float | pixel[4], |
| bool | predivide, | ||
| ColorSpace * | colorspace ) |
Definition at line 2291 of file colormanagement.cc.
References colorspace_to_scene_linear_cpu_processor(), OCIO_cpuProcessorApplyRGBA(), OCIO_cpuProcessorApplyRGBA_predivide(), and printf.
Referenced by image_sample_pixel_color_ubyte(), IMB_sampleImageAtLocation(), blender::ed::space_node::sample_apply(), and sequencer_sample_apply().
| const char * IMB_colormanagement_display_get_default_name | ( | ) |
Definition at line 3105 of file colormanagement.cc.
References colormanage_display_get_default().
Referenced by BKE_color_managed_display_settings_init(), and UI_block_begin().
| const char * IMB_colormanagement_display_get_default_view_transform_name | ( | ColorManagedDisplay * | display | ) |
Definition at line 3126 of file colormanagement.cc.
References colormanage_view_get_default_name().
Referenced by BKE_color_managed_view_settings_init_render(), and seq_add_set_view_transform().
| const char * IMB_colormanagement_display_get_indexed_name | ( | int | index | ) |
Definition at line 3092 of file colormanagement.cc.
References colormanage_display_get_indexed().
| ColorManagedDisplay * IMB_colormanagement_display_get_named | ( | const char * | name | ) |
Used by performance-critical pixel processing areas, such as color widgets.
Definition at line 3112 of file colormanagement.cc.
References colormanage_display_get_named().
Referenced by BKE_color_managed_view_settings_init_render(), BKE_image_stamp_buf(), brush_painter_imbuf_new(), brush_painter_imbuf_update(), do_text_effect(), eyedropper_color_sample_fl(), blender::ui::greasepencil::eyedropper_grease_pencil_init(), eyedropper_init(), seq_add_set_view_transform(), and ui_block_cm_display_get().
| int IMB_colormanagement_display_get_named_index | ( | const char * | name | ) |
Definition at line 3079 of file colormanagement.cc.
References colormanage_display_get_named().
Referenced by colormanage_display_settings_to_cache().
| const char * IMB_colormanagement_display_get_none_name | ( | ) |
Definition at line 3117 of file colormanagement.cc.
References colormanage_display_get_default_name(), and colormanage_display_get_named().
Referenced by BKE_scene_disable_color_management().
| void IMB_colormanagement_display_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem ) |
Definition at line 3537 of file colormanagement.cc.
References EnumPropertyItem::description, global_displays, EnumPropertyItem::icon, EnumPropertyItem::identifier, LISTBASE_FOREACH, EnumPropertyItem::name, RNA_enum_item_add(), and EnumPropertyItem::value.
| ColormanageProcessor * IMB_colormanagement_display_processor_new | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 4014 of file colormanagement.cc.
References BKE_curvemapping_copy(), BKE_curvemapping_premultiply(), COLORMANAGE_VIEW_USE_CURVES, COLORMANAGE_VIEW_USE_WHITE_BALANCE, ColormanageProcessor::cpu_processor, create_display_buffer_processor(), ColorManagedViewSettings::curve_mapping, ColormanageProcessor::curve_mapping, ColorManagedDisplaySettings::display_device, display_transform_get_colorspace(), ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, global_role_scene_linear, IMB_colormanagement_init_default_view_settings(), ColorSpace::is_data, ColormanageProcessor::is_data_result, ColorManagedViewSettings::look, ColorManagedViewSettings::temperature, ColorManagedViewSettings::tint, and ColorManagedViewSettings::view_transform.
Referenced by BKE_histogram_update_sample_line(), BKE_scopes_update(), colormanage_display_buffer_process_ex(), blender::realtime_compositor::compute_preview_from_result(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_display_buffer_transform_apply(), IMB_display_buffer_transform_apply_float(), imb_partial_display_buffer_update_ex(), and blender::compositor::PreviewOperation::update_memory_buffer_partial().
| void IMB_colormanagement_display_settings_from_ctx | ( | const bContext * | C, |
| ColorManagedViewSettings ** | r_view_settings, | ||
| ColorManagedDisplaySettings ** | r_display_settings ) |
Definition at line 840 of file colormanagement.cc.
References CTX_data_scene(), CTX_wm_space_image(), Image::flag, IMA_VIEW_AS_RENDER, and SpaceImage::image.
Referenced by draw_strip_thumbnails(), ED_draw_imbuf_ctx_clipping(), IMB_colormanagement_setup_glsl_draw_from_space_ctx(), and IMB_display_buffer_acquire_ctx().
| void IMB_colormanagement_display_to_scene_linear_v3 | ( | float | pixel[3], |
| ColorManagedDisplay * | display ) |
Same as IMB_colormanagement_scene_linear_to_display_v3, but converts color in opposite direction.
Definition at line 2595 of file colormanagement.cc.
References display_to_scene_linear_processor(), and OCIO_cpuProcessorApplyRGB().
Referenced by blf_draw_buffer__start(), buf_rectfill_area(), eyedropper_color_sample_fl(), eyedropper_init(), and paint_brush_color_get().
| void IMB_colormanagement_finish_glsl_draw | ( | ) |
Finish GLSL-based display space conversion.
Definition at line 4416 of file colormanagement.cc.
References global_gpu_state::gpu_shader_bound, and OCIO_gpuDisplayShaderUnbind().
Referenced by draw_display_buffer(), ED_draw_imbuf_clipping(), gpu_viewport_draw_colormanaged(), and sequencer_draw_display_buffer().
| const char * IMB_colormanagement_get_float_colorspace | ( | ImBuf * | ibuf | ) |
Definition at line 1441 of file colormanagement.cc.
References COLOR_ROLE_SCENE_LINEAR, ImBufFloatBuffer::colorspace, ImBuf::float_buffer, IMB_colormanagement_role_colorspace_name_get(), and ColorSpace::name.
Referenced by blender::draw::image_engine::FloatBufferCache::cached_float_buffer(), blender::ed::sculpt_paint::paint::image::ImageBufferFloat4::get_colorspace_name(), IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), and blender::ed::object::write_internal_bake_pixels().
| const char * IMB_colormanagement_get_rect_colorspace | ( | ImBuf * | ibuf | ) |
Definition at line 1450 of file colormanagement.cc.
References ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, ImBufByteBuffer::colorspace, IMB_colormanagement_role_colorspace_name_get(), and ColorSpace::name.
Referenced by blender::ed::sculpt_paint::paint::image::ImageBufferByte4::get_colorspace_name(), IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| blender::float3x3 IMB_colormanagement_get_scene_linear_to_xyz | ( | ) |
Definition at line 1518 of file colormanagement.cc.
References imbuf_scene_linear_to_xyz.
Referenced by blender::nodes::node_composite_colorbalance_cc::ColorBalanceShaderNode::compile(), and blender::compositor::ColorBalanceWhitepointOperation::init_execution().
| void IMB_colormanagement_get_whitepoint | ( | const float | temperature, |
| const float | tint, | ||
| float | whitepoint[3] ) |
Functions for converting between color temperature/tint and RGB white points.
Definition at line 1529 of file colormanagement.cc.
References IMB_colormanagement_xyz_to_scene_linear(), and blender::math::whitepoint_from_temp_tint().
| blender::float3x3 IMB_colormanagement_get_xyz_to_scene_linear | ( | ) |
Definition at line 1513 of file colormanagement.cc.
References imbuf_xyz_to_scene_linear.
Referenced by blender::nodes::node_composite_colorbalance_cc::ColorBalanceShaderNode::compile(), get_XYZ_to_RGB_for_gpu(), and blender::compositor::ColorBalanceWhitepointOperation::init_execution().
| ImBuf * IMB_colormanagement_imbuf_for_write | ( | ImBuf * | ibuf, |
| bool | save_as_render, | ||
| bool | allocate_result, | ||
| const ImageFormatData * | image_format ) |
Prepare image buffer to be saved on disk, applying color management if needed color management would be applied if image is saving as render result and if file format is not expecting float buffer to be in linear space (currently JPEG2000 and TIFF are such formats – they're storing image as float but file itself stores applied color space).
Both byte and float buffers would contain applied color space, and result's float_colorspace would be set to display color space. This should be checked in image format write callback and if float_colorspace is not NULL, no color space transformation should be applied on this buffer.
Definition at line 2679 of file colormanagement.cc.
References BKE_image_format_is_byte(), BKE_imtype_requires_linear_float(), ImBuf::byte_buffer, ImBuf::channels, colormanage_colorspace_get_named(), colormanagement_imbuf_make_display_space(), ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImageFormatData::display_settings, display_transform_get_colorspace(), ImBuf::float_buffer, global_role_default_byte, global_role_scene_linear, IB_DISPLAY_BUFFER_INVALID, IB_RECT_INVALID, IMB_alpha_under_color_byte(), IMB_alpha_under_color_float(), IMB_colormanagement_transform(), IMB_colormanagement_transform_byte_threaded(), IMB_float_from_rect(), imb_freerectImBuf(), IMB_rect_from_float(), imbuf_ensure_editable(), ImageFormatData::imtype, ImageFormatData::linear_colorspace_settings, ColorManagedColorspaceSettings::name, ColorSpace::name, ImageFormatData::planes, R_IMF_PLANES_RGBA, STREQ, ImBuf::userflags, ImageFormatData::view_settings, ImBuf::x, and ImBuf::y.
Referenced by BKE_image_render_write(), image_save_single(), and RE_WriteRenderViewsMovie().
| void IMB_colormanagement_imbuf_make_display_space | ( | ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 2648 of file colormanagement.cc.
References colormanagement_imbuf_make_display_space().
Referenced by sequencer_calc_scopes(), and sequencer_make_scope().
| 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 ) |
Definition at line 2364 of file colormanagement.cc.
References BLI_assert, ImBuf::byte_buffer, ImBufByteBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMB_alpha_affects_rgb(), IMB_colormanagement_space_is_data(), IMB_colormanagement_space_is_scene_linear(), IMB_colormanagement_space_is_srgb(), ImBuf::x, and y.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_data().
| 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 ) |
Definition at line 2447 of file colormanagement.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::colorspace, colorspace_to_scene_linear_cpu_processor(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMB_alpha_affects_rgb(), imbuf_byte_to_float_cb(), premul_to_straight_v4_v4(), ImbufByteToFloatData::processor, ImBuf::x, and y.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_data().
| void IMB_colormanagement_init_default_view_settings | ( | ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 1064 of file colormanagement.cc.
References colormanage_display_get_named(), colormanage_view_get_default(), colormanage_view_get_named_for_display(), ColorManagedViewSettings::curve_mapping, ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, ColorManagedViewSettings::look, ColorManagedView::name, STRNCPY, ColorManagedViewSettings::temperature, ColorManagedViewSettings::tint, and ColorManagedViewSettings::view_transform.
Referenced by BKE_color_managed_view_settings_init_default(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_setup_glsl_draw_from_space(), IMB_display_buffer_acquire(), and wm_main_playanim_intern().
| const char * IMB_colormanagement_look_get_default_name | ( | ) |
Definition at line 3495 of file colormanagement.cc.
References ListBase::first, global_looks, and ColorManagedLook::name.
Referenced by colormanage_check_view_settings(), and IMB_colormanagement_look_validate_for_view().
| const char * IMB_colormanagement_look_get_indexed_name | ( | int | index | ) |
Definition at line 3482 of file colormanagement.cc.
References colormanage_look_get_indexed(), and ColorManagedLook::name.
| int IMB_colormanagement_look_get_named_index | ( | const char * | name | ) |
Definition at line 3471 of file colormanagement.cc.
References colormanage_look_get_named(), and ColorManagedLook::index.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_look_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | view_name ) |
Definition at line 3582 of file colormanagement.cc.
References colormanage_compatible_look(), EnumPropertyItem::description, global_looks, has_explicit_look_for_view(), EnumPropertyItem::icon, EnumPropertyItem::identifier, LISTBASE_FOREACH, EnumPropertyItem::name, RNA_enum_item_add(), and EnumPropertyItem::value.
| const char * IMB_colormanagement_look_validate_for_view | ( | const char * | view_name, |
| const char * | look_name ) |
Definition at line 3505 of file colormanagement.cc.
References colormanage_compatible_look(), colormanage_look_get_named(), global_looks, IMB_colormanagement_look_get_default_name(), LISTBASE_FOREACH, STREQ, and ColorManagedLook::ui_name.
| void IMB_colormanagement_pixel_to_display_space_v3 | ( | float | result[3], |
| const float | pixel[3], | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 2619 of file colormanagement.cc.
References copy_v3_v3(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v3(), and IMB_colormanagement_processor_free().
| void IMB_colormanagement_pixel_to_display_space_v4 | ( | float | result[4], |
| const float | pixel[4], | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 2604 of file colormanagement.cc.
References copy_v4_v4(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v4(), and IMB_colormanagement_processor_free().
Referenced by ED_image_draw_info().
| void IMB_colormanagement_processor_apply | ( | ColormanageProcessor * | cm_processor, |
| float * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | predivide ) |
Definition at line 4156 of file colormanagement.cc.
References ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), x, and y.
Referenced by blender::compositor::MemoryBuffer::apply_processor(), colormanagement_transform_ex(), do_display_buffer_apply_thread(), do_processor_transform_thread(), IMB_display_buffer_transform_apply(), and IMB_display_buffer_transform_apply_float().
| void IMB_colormanagement_processor_apply_byte | ( | ColormanageProcessor * | cm_processor, |
| uchar * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels ) |
Definition at line 4199 of file colormanagement.cc.
References BLI_assert, IMB_colormanagement_processor_apply_v4(), rgba_float_to_uchar(), rgba_uchar_to_float(), and x.
Referenced by colormanagement_transform_ex(), and do_processor_transform_thread().
| void IMB_colormanagement_processor_apply_pixel | ( | ColormanageProcessor * | cm_processor, |
| float * | pixel, | ||
| int | channels ) |
Definition at line 4135 of file colormanagement.cc.
References BLI_assert_msg, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), IMB_colormanagement_processor_apply_v3(), and IMB_colormanagement_processor_apply_v4_predivide().
Referenced by blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_single(), and partial_buffer_update_rect().
| void IMB_colormanagement_processor_apply_v3 | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[3] ) |
Definition at line 4124 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGB().
Referenced by BKE_histogram_update_sample_line(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_processor_apply_pixel(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4 | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[4] ) |
Definition at line 4101 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGBA().
Referenced by BKE_histogram_update_sample_line(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_processor_apply_byte(), IMB_colormanagement_transform_v4(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), scopes_update_cb(), and blender::compositor::PreviewOperation::update_memory_buffer_partial().
| void IMB_colormanagement_processor_apply_v4_predivide | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[4] ) |
Definition at line 4112 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGBA_predivide().
Referenced by IMB_colormanagement_processor_apply_pixel().
| void IMB_colormanagement_processor_free | ( | ColormanageProcessor * | cm_processor | ) |
Definition at line 4217 of file colormanagement.cc.
References BKE_curvemapping_free(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, MEM_freeN(), and OCIO_cpuProcessorRelease().
Referenced by BKE_histogram_update_sample_line(), BKE_scopes_update(), colormanage_display_buffer_process_ex(), colormanagement_transform_ex(), blender::compositor::ConvertColorSpaceOperation::deinit_execution(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_single(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_transform_from_byte_threaded(), IMB_colormanagement_transform_v4(), IMB_display_buffer_transform_apply(), IMB_display_buffer_transform_apply_float(), imb_partial_display_buffer_update_ex(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), and blender::compositor::PreviewOperation::update_memory_buffer_partial().
| bool IMB_colormanagement_processor_is_noop | ( | ColormanageProcessor * | cm_processor | ) |
Definition at line 4076 of file colormanagement.cc.
References ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorIsNoOp().
Referenced by colormanagement_transform_ex().
| const char * IMB_colormanagement_role_colorspace_name_get | ( | int | role | ) |
Definition at line 1356 of file colormanagement.cc.
References BLI_assert, COLOR_ROLE_COLOR_PICKING, COLOR_ROLE_DATA, COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, COLOR_ROLE_DEFAULT_SEQUENCER, COLOR_ROLE_SCENE_LINEAR, COLOR_ROLE_TEXTURE_PAINTING, G, global_role_color_picking, global_role_data, global_role_default_byte, global_role_default_float, global_role_default_sequencer, global_role_scene_linear, global_role_texture_painting, and printf.
Referenced by add_ibuf_for_tile(), assign_render_pass_ibuf_colorspace(), BKE_image_add_generated(), BKE_image_format_color_management_copy_from_scene(), BKE_image_format_init_for_write(), BKE_image_format_update_color_space_for_type(), BKE_image_save_options_init(), colormanage_colorspace_get_roled(), colorspace_set_default_role(), image_colorspace_from_imbuf(), image_exr_from_scene_linear_to_output(), image_node_colorspace(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), IMB_rect_from_float(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), blender::nodes::node_composite_convert_color_space_cc::node_composit_init_convert_colorspace(), RE_render_result_rect_to_ibuf(), render_result_exr_file_cache_read(), render_result_new_from_exr(), scene_init_data(), seq_add_set_view_transform(), SEQ_render_imbuf_from_sequencer_space(), SEQ_render_pixel_from_sequencer_space_v4(), wm_main_playanim_intern(), blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| void IMB_colormanagement_scene_linear_to_color_picking_v3 | ( | float | color_picking[3], |
| const float | scene_linear[3] ) |
Conversion between color picking role. Typically we would expect such a requirements:
Definition at line 2526 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), copy_v3_v3(), global_color_picking_state::cpu_processor_to, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, OCIO_cpuProcessorApplyRGB(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by ui_scene_linear_to_perceptual_space().
| void IMB_colormanagement_scene_linear_to_colorspace | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| ColorSpace * | colorspace ) |
Converts a (width)x(height) block of float pixels from scene linear space to given color space. This is much higher performance than converting pixels one by one.
Definition at line 2341 of file colormanagement.cc.
References colorspace_from_scene_linear_cpu_processor(), OCIO_cpuProcessorApply(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), and printf.
Referenced by scene_linear_to_image_chunk_byte(), and scene_linear_to_image_chunk_float().
| void IMB_colormanagement_scene_linear_to_colorspace_v3 | ( | float | pixel[3], |
| ColorSpace * | colorspace ) |
Convert pixel from scene linear space to specified color space. For performance, use IMB_colormanagement_scene_linear_to_colorspace when converting an array of pixels.
Definition at line 2278 of file colormanagement.cc.
References colorspace_from_scene_linear_cpu_processor(), OCIO_cpuProcessorApplyRGB(), and printf.
| void IMB_colormanagement_scene_linear_to_display_v3 | ( | float | pixel[3], |
| ColorManagedDisplay * | display ) |
Convert pixel from scene linear to display space using default view used by performance-critical areas such as color-related widgets where we want to reduce amount of per-widget allocations.
Definition at line 2586 of file colormanagement.cc.
References display_from_scene_linear_processor(), and OCIO_cpuProcessorApplyRGB().
Referenced by brush_painter_imbuf_new(), brush_painter_imbuf_update(), eyedropper_color_set(), blender::ui::greasepencil::eyedropper_grease_pencil_color_set(), ui_block_cm_to_display_space_v3(), ui_draw_but_COLORBAND(), and ui_draw_colorband_handle().
| bool IMB_colormanagement_set_whitepoint | ( | const float | whitepoint[3], |
| float & | temperature, | ||
| float & | tint ) |
Definition at line 1537 of file colormanagement.cc.
References IMB_colormanagement_scene_linear_to_xyz(), and blender::math::whitepoint_to_temp_tint().
| bool IMB_colormanagement_setup_glsl_draw | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings, | ||
| float | dither, | ||
| bool | predivide ) |
Configures GLSL shader for conversion from scene linear to display space.
Definition at line 4388 of file colormanagement.cc.
References IMB_colormanagement_setup_glsl_draw_from_space().
Referenced by ED_draw_imbuf_clipping(), and ocio_transform_ibuf().
Same as setup_glsl_draw, but color management settings are guessing from a given context.
Definition at line 4411 of file colormanagement.cc.
References IMB_colormanagement_setup_glsl_draw_from_space_ctx().
Referenced by sequencer_OCIO_transform_ibuf().
| 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 ) |
Configures GLSL shader for conversion from specified to display color space
Will create appropriate OCIO processor and setup GLSL shader, so further 2D texture usage will use this conversion.
When there's no need to apply transform on 2D textures, use IMB_colormanagement_finish_glsl_draw().
This is low-level function, use ED_draw_imbuf_ctx if you only need to display given image buffer
Definition at line 4321 of file colormanagement.cc.
References colormanage_use_look(), COLORMANAGE_VIEW_USE_HDR, COLORMANAGE_VIEW_USE_WHITE_BALANCE, ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, global_role_scene_linear, GPU_hdr_support(), global_gpu_state::gpu_shader_bound, IMB_colormanagement_init_default_view_settings(), ColorManagedViewSettings::look, max_ff(), ColorSpace::name, OCIO_configRelease(), OCIO_getCurrentConfig(), OCIO_gpuDisplayShaderBind(), powf, ColorManagedViewSettings::temperature, ColorManagedViewSettings::tint, update_glsl_curve_mapping(), and ColorManagedViewSettings::view_transform.
Referenced by ED_draw_imbuf_clipping(), gpu_viewport_draw_colormanaged(), IMB_colormanagement_setup_glsl_draw(), IMB_colormanagement_setup_glsl_draw_from_space_ctx(), and ocio_transform_ibuf().
| bool IMB_colormanagement_setup_glsl_draw_from_space_ctx | ( | const bContext * | C, |
| ColorSpace * | from_colorspace, | ||
| float | dither, | ||
| bool | predivide ) |
Same as setup_glsl_draw_from_space, but color management settings are guessing from a given context.
Definition at line 4397 of file colormanagement.cc.
References IMB_colormanagement_display_settings_from_ctx(), and IMB_colormanagement_setup_glsl_draw_from_space().
Referenced by IMB_colormanagement_setup_glsl_draw_ctx(), and sequencer_OCIO_transform_ibuf().
| bool IMB_colormanagement_space_is_data | ( | ColorSpace * | colorspace | ) |
Definition at line 1459 of file colormanagement.cc.
Referenced by IMB_colormanagement_imbuf_to_byte_texture().
| bool IMB_colormanagement_space_is_scene_linear | ( | ColorSpace * | colorspace | ) |
Definition at line 1483 of file colormanagement.cc.
Referenced by IMB_colormanagement_imbuf_to_byte_texture(), and IMB_colormanagement_space_name_is_scene_linear().
| bool IMB_colormanagement_space_is_srgb | ( | ColorSpace * | colorspace | ) |
Definition at line 1489 of file colormanagement.cc.
References colormanage_ensure_srgb_scene_linear_info(), ColorSpace::info, and ColorSpace::is_srgb.
Referenced by gpu_texture_update_from_ibuf(), IMB_colormanagement_imbuf_to_byte_texture(), IMB_colormanagement_space_name_is_srgb(), imb_gpu_get_data(), imb_gpu_get_format(), and imb_is_grayscale_texture_format_compatible().
| bool IMB_colormanagement_space_name_is_data | ( | const char * | name | ) |
Definition at line 1495 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and ColorSpace::is_data.
Referenced by add_ibuf_for_tile(), BKE_image_format_update_color_space_for_type(), BKE_image_save_options_init(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::call(), blender::io::usd::get_node_tex_image_color_space(), IMB_colormanagement_colorspace_processor_new(), imb_handle_alpha(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::is_identity(), blender::ed::space_node::node_buts_image_user(), blender::nodes::node_shader_tex_environment_cc::node_shader_gpu_tex_environment(), blender::nodes::node_shader_tex_image_cc::node_shader_gpu_tex_image(), and uiTemplateImage().
| bool IMB_colormanagement_space_name_is_scene_linear | ( | const char * | name | ) |
Definition at line 1501 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and IMB_colormanagement_space_is_scene_linear().
Referenced by BKE_image_format_update_color_space_for_type(), blender::draw::image_engine::FloatBufferCache::cached_float_buffer(), and image_exr_from_scene_linear_to_output().
| bool IMB_colormanagement_space_name_is_srgb | ( | const char * | name | ) |
Definition at line 1507 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and IMB_colormanagement_space_is_srgb().
Referenced by blender::io::usd::get_node_tex_image_color_space().
| bool IMB_colormanagement_support_glsl_draw | ( | const ColorManagedViewSettings * | view_settings | ) |
Test if GLSL drawing is supported for combination of graphics card and this configuration.
Definition at line 4316 of file colormanagement.cc.
References OCIO_supportGPUShader().
Referenced by screen_render_invoke().
| void IMB_colormanagement_transform | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide ) |
Convert the whole buffer from specified by name color space to another.
Definition at line 2135 of file colormanagement.cc.
References colormanagement_transform_ex().
Referenced by colormanage_imbuf_make_linear(), display_buffer_apply_get_linear_buffer(), image_exr_from_scene_linear_to_output(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_transform_from_byte(), IMB_rect_from_float(), render_result_new_from_exr(), blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| void IMB_colormanagement_transform_byte | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Similar to IMB_colormanagement_transform_threaded, but operates on byte buffer.
Definition at line 2159 of file colormanagement.cc.
References colormanagement_transform_ex().
| void IMB_colormanagement_transform_byte_threaded | ( | uchar * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Definition at line 2169 of file colormanagement.cc.
References colormanagement_transform_ex().
Referenced by IMB_colormanagement_imbuf_for_write(), and seq_imbuf_to_sequencer_space().
| void IMB_colormanagement_transform_from_byte | ( | float * | float_buffer, |
| unsigned char * | byte_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Similar to IMB_colormanagement_transform_byte_threaded, but gets float buffer from display one.
Definition at line 2180 of file colormanagement.cc.
References IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), and IMB_colormanagement_transform().
| 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 ) |
Definition at line 2200 of file colormanagement.cc.
References blender::IndexRange::first(), float, IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_free(), processor_transform_apply_threaded(), and STREQ.
Referenced by do_glow_effect_byte(), and seq_imbuf_to_sequencer_space().
| void IMB_colormanagement_transform_threaded | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide ) |
Convert the whole buffer from specified by name color space to another will do threaded conversion.
Definition at line 2147 of file colormanagement.cc.
References colormanagement_transform_ex().
Referenced by seq_imbuf_to_sequencer_space(), and SEQ_render_imbuf_from_sequencer_space().
| void IMB_colormanagement_transform_v4 | ( | float | pixel[4], |
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Definition at line 2241 of file colormanagement.cc.
References IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), and STREQ.
Referenced by SEQ_render_pixel_from_sequencer_space_v4().
| void IMB_colormanagement_validate_settings | ( | const ColorManagedDisplaySettings * | display_settings, |
| ColorManagedViewSettings * | view_settings ) |
Definition at line 1335 of file colormanagement.cc.
References colormanage_display_get_named(), colormanage_view_get_default(), ColorManagedDisplaySettings::display_device, LISTBASE_FOREACH, ColorManagedView::name, STREQ, STRNCPY, and ColorManagedViewSettings::view_transform.
Referenced by BKE_color_managed_view_settings_init_render().
| const char * IMB_colormanagement_view_get_default_name | ( | const char * | display_name | ) |
Definition at line 3230 of file colormanagement.cc.
References colormanage_display_get_named(), and colormanage_view_get_default().
| const char * IMB_colormanagement_view_get_indexed_name | ( | int | index | ) |
Definition at line 3219 of file colormanagement.cc.
References colormanage_view_get_indexed().
| int IMB_colormanagement_view_get_named_index | ( | const char * | name | ) |
Definition at line 3208 of file colormanagement.cc.
References colormanage_view_get_named().
Referenced by colormanage_view_settings_to_cache().
| const char * IMB_colormanagement_view_get_raw_or_default_name | ( | const char * | display_name | ) |
Definition at line 3246 of file colormanagement.cc.
References colormanage_display_get_named(), colormanage_view_get_default(), and colormanage_view_get_named_for_display().
Referenced by BKE_scene_disable_color_management().
| void IMB_colormanagement_view_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | display_name ) |
Definition at line 3567 of file colormanagement.cc.
References colormanage_display_get_named(), colormanagement_view_item_add(), and LISTBASE_FOREACH.
Definition at line 4578 of file colormanagement.cc.
References clamp_v3(), copy_v3_v3(), FLT_MAX, IMB_colormanagement_xyz_to_scene_linear(), and wavelength_to_xyz().
Referenced by IMB_colormanagement_wavelength_to_rgb_table().
Definition at line 4591 of file colormanagement.cc.
References float, and IMB_colormanagement_wavelength_to_rgb().
Referenced by blender::nodes::node_shader_wavelength_cc::node_shader_gpu_wavelength().
| uchar * IMB_display_buffer_acquire | ( | ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| void ** | cache_handle ) |
Acquire display buffer for given image buffer using specified view and display settings.
Definition at line 2832 of file colormanagement.cc.
References BLI_rcti_init(), BLI_thread_lock(), BLI_thread_unlock(), ImBuf::byte_buffer, ImBuf::channels, colormanage_cache_get(), colormanage_cache_put(), colormanage_display_buffer_process(), colormanage_display_settings_to_cache(), colormanage_view_settings_to_cache(), ImBufByteBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, DISPLAY_BUFFER_CHANNELS, ImBuf::display_buffer_flags, ImBuf::float_buffer, global_tot_display, IB_DISPLAY_BUFFER_INVALID, IMB_colormanagement_init_default_view_settings(), IMB_partial_display_buffer_update_threaded(), ImBuf::invalid_rect, is_colorspace_same_as_display(), LOCK_COLORMANAGE, MEM_callocN, ImBuf::userflags, ImBuf::x, rcti::xmax, rcti::xmin, ImBuf::y, rcti::ymax, and rcti::ymin.
Referenced by BKE_scopes_update(), draw_plane_marker_image(), draw_strip_thumbnails(), ED_draw_imbuf_clipping(), IMB_display_buffer_acquire_ctx(), and ocio_transform_ibuf().
Same as IMB_display_buffer_acquire but gets view and display settings from context.
Definition at line 2929 of file colormanagement.cc.
References IMB_colormanagement_display_settings_from_ctx(), and IMB_display_buffer_acquire().
Referenced by sequencer_OCIO_transform_ibuf().
| void IMB_display_buffer_release | ( | void * | cache_handle | ) |
Definition at line 3000 of file colormanagement.cc.
References BLI_thread_lock(), BLI_thread_unlock(), colormanage_cache_handle_release(), and LOCK_COLORMANAGE.
Referenced by BKE_scopes_update(), draw_display_buffer(), draw_plane_marker_image(), draw_strip_thumbnails(), ED_draw_imbuf_clipping(), imb_partial_display_buffer_update_ex(), and sequencer_draw_display_buffer().
| 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 ) |
Definition at line 2939 of file colormanagement.cc.
References IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_free(), MEM_freeN(), and MEM_mallocN.
Referenced by render_result_rect_get_pixels().
| 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 ) |
Definition at line 2975 of file colormanagement.cc.
References IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_free(), MEM_freeN(), and MEM_mallocN.
| 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 ) |
Definition at line 3936 of file colormanagement.cc.
References imb_partial_display_buffer_update_ex().
Referenced by image_buffer_rect_update().
| void IMB_partial_display_buffer_update_delayed | ( | ImBuf * | ibuf, |
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax ) |
Definition at line 3996 of file colormanagement.cc.
References BLI_rcti_init(), BLI_rcti_union(), ImBuf::invalid_rect, rcti::xmax, and rcti::xmin.
Referenced by imapaint_image_update().
|
static |
Definition at line 3823 of file colormanagement.cc.
References BLI_thread_lock(), BLI_thread_unlock(), ImBuf::byte_buffer, colormanage_cache_get(), colormanage_display_settings_to_cache(), colormanage_view_settings_to_cache(), ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, data, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, ImBuf::float_buffer, global_tot_display, IB_DISPLAY_BUFFER_INVALID, PartialThreadData::ibuf, IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), IMB_display_buffer_release(), IMB_processor_apply_threaded_scanlines(), is_colorspace_same_as_display(), LOCK_COLORMANAGE, partial_buffer_update_rect(), partial_buffer_update_rect_thread_do(), ImBuf::userflags, ColormanageCacheViewSettings::view, and ImBuf::x.
Referenced by IMB_partial_display_buffer_update(), and IMB_partial_display_buffer_update_threaded().
| 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 ) |
Definition at line 3964 of file colormanagement.cc.
References imb_partial_display_buffer_update_ex().
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 2419 of file colormanagement.cc.
References copy_v4_v4(), mul_v3_fl(), OCIO_cpuProcessorApplyRGB(), ImbufByteToFloatData::offset, rgba_uchar_to_float(), and srgb_to_linearrgb_v3_v3().
Referenced by IMB_colormanagement_imbuf_to_float_texture().
|
static |
Definition at line 2656 of file colormanagement.cc.
References IMB_dupImBuf(), IMB_make_writable_byte_buffer(), IMB_make_writable_float_buffer(), and IMB_metadata_copy().
Referenced by IMB_colormanagement_imbuf_for_write().
|
static |
Definition at line 1882 of file colormanagement.cc.
References colormanage_look_get_named(), COLORMANAGE_VIEW_USE_CURVES, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, get_display_colorspace_name(), ColorManagedViewSettings::look, ColorSpace::name, ColorManagedLook::process_space, and STREQ.
Referenced by colormanage_display_buffer_process_ex(), IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 3641 of file colormanagement.cc.
References BLI_assert_msg, ImBuf::byte_buffer, channels(), ImBuf::channels, ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, copy_v3_v3(), copy_v4_v4(), ImBuf::dither, IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_buffer_float_from_byte(), IMB_COLORMANAGE_IS_DATA, IMB_colormanagement_colorspace_to_scene_linear_v3(), IMB_colormanagement_processor_apply_pixel(), MEM_callocN, MEM_freeN(), premul_to_straight_v4_v4(), rgb_float_to_uchar(), rgba_float_to_uchar(), rgba_uchar_to_float(), straight_to_premul_v4(), unit_float_to_uchar_clamp, x, and y.
Referenced by imb_partial_display_buffer_update_ex(), and partial_buffer_update_rect_thread_do().
|
static |
Definition at line 3803 of file colormanagement.cc.
References partial_buffer_update_rect(), and PartialThreadData::ymin.
Referenced by imb_partial_display_buffer_update_ex().
|
static |
Definition at line 2055 of file colormanagement.cc.
References channels(), ProcessorTransformInitData::cm_processor, do_processor_transform_thread(), IMB_processor_apply_threaded(), init_data(), and processor_transform_init_handle().
Referenced by colormanagement_transform_ex(), and IMB_colormanagement_transform_from_byte_threaded().
|
static |
Definition at line 1979 of file colormanagement.cc.
References channels(), ProcessorTransformInitData::channels, and init_data().
Referenced by processor_transform_apply_threaded().
|
static |
Definition at line 1287 of file colormanagement.cc.
References colormanage_check_colorspace_settings(), Strip::colorspace_settings, and Sequence::strip.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 4264 of file colormanagement.cc.
References BKE_curvemapping_copy(), BKE_curvemapping_free(), CurveMapping::changed_timestamp, COLORMANAGE_VIEW_USE_CURVES, ColorManagedViewSettings::curve_mapping, global_gpu_state::curve_mapping, global_gpu_state::curve_mapping_settings, global_gpu_state::curve_mapping_timestamp, curve_mapping_to_ocio_settings(), ColorManagedViewSettings::flag, OCIO_CurveMappingSettings::lut, MEM_freeN(), global_gpu_state::orig_curve_mapping, and global_gpu_state::use_curve_mapping.
Referenced by IMB_colormanagement_setup_glsl_draw_from_space().
Definition at line 4559 of file colormanagement.cc.
References cie_color_match, float, and int.
Referenced by IMB_colormanagement_wavelength_to_rgb().
|
static |
Definition at line 4453 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
Definition at line 4444 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
Definition at line 4436 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
CIE color matching functions xBar, yBar, and zBar for wavelengths from 380 through 780 nanometers, every 5 nanometers.
For a wavelength lambda in this range:
Definition at line 4530 of file colormanagement.cc.
Referenced by svm_math_wavelength_color_xyz(), and wavelength_to_xyz().
|
static |
|
static |
Definition at line 72 of file colormanagement.cc.
Referenced by colormanage_colorspace_add(), colormanage_colorspace_get_indexed(), colormanage_colorspace_get_named(), colormanage_free_config(), and IMB_colormanagement_colorspace_items_add().
|
static |
Definition at line 73 of file colormanagement.cc.
Referenced by colormanage_display_add(), colormanage_display_get_indexed(), colormanage_display_get_named(), colormanage_free_config(), and IMB_colormanagement_display_items_add().
|
static |
|
static |
Definition at line 75 of file colormanagement.cc.
Referenced by colormanage_free_config(), colormanage_look_add(), colormanage_look_get_indexed(), colormanage_look_get_named(), has_explicit_look_for_view(), IMB_colormanagement_look_get_default_name(), IMB_colormanagement_look_items_add(), and IMB_colormanagement_look_validate_for_view().
|
static |
Definition at line 66 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_color_picking_to_scene_linear_v3(), IMB_colormanagement_role_colorspace_name_get(), and IMB_colormanagement_scene_linear_to_color_picking_v3().
|
static |
Definition at line 64 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 68 of file colormanagement.cc.
Referenced by colormanage_imbuf_set_default_spaces(), colormanage_load_config(), display_buffer_apply_threaded(), IMB_colormanagement_imbuf_for_write(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 69 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 70 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_check_file_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 65 of file colormanagement.cc.
Referenced by colormanage_imbuf_make_linear(), colormanage_load_config(), colorspace_from_scene_linear_cpu_processor(), colorspace_to_scene_linear_cpu_processor(), display_buffer_apply_get_linear_buffer(), display_from_scene_linear_processor(), display_to_scene_linear_processor(), IMB_colormanagement_color_picking_to_scene_linear_v3(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_role_colorspace_name_get(), IMB_colormanagement_scene_linear_to_color_picking_v3(), and IMB_colormanagement_setup_glsl_draw_from_space().
|
static |
Definition at line 67 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 77 of file colormanagement.cc.
Referenced by colormanage_colorspace_add(), and colormanage_free_config().
|
static |
Definition at line 78 of file colormanagement.cc.
Referenced by colormanage_free_config(), colormanage_load_config(), IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 80 of file colormanagement.cc.
Referenced by colormanage_free_config(), and colormanage_look_add().
|
static |
Definition at line 79 of file colormanagement.cc.
Referenced by colormanage_free_config(), colormanage_load_config(), and colormanage_view_add().
|
static |
Definition at line 74 of file colormanagement.cc.
Referenced by colormanage_free_config(), colormanage_view_add(), colormanage_view_get_indexed(), and colormanage_view_get_named().
| float imbuf_aces_to_scene_linear[3][3] = {{0.0f}} |
Definition at line 90 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_aces_to_scene_linear().
| float imbuf_luma_coefficients[3] = {0.0f} |
Definition at line 84 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_get_luminance(), IMB_colormanagement_get_luminance_byte(), and IMB_colormanagement_get_luminance_coefficients().
| float imbuf_rec709_to_scene_linear[3][3] = {{0.0f}} |
Definition at line 88 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_rec709_to_scene_linear(), and IMB_colormanagement_srgb_to_scene_linear_v3().
| float imbuf_scene_linear_to_aces[3][3] = {{0.0f}} |
Definition at line 89 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_scene_linear_to_aces().
| float imbuf_scene_linear_to_rec709[3][3] = {{0.0f}} |
Definition at line 87 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_scene_linear_to_rec709(), and IMB_colormanagement_scene_linear_to_srgb_v3().
| float imbuf_scene_linear_to_xyz[3][3] = {{0.0f}} |
Definition at line 85 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_get_scene_linear_to_xyz(), and IMB_colormanagement_scene_linear_to_xyz().
| float imbuf_xyz_to_scene_linear[3][3] = {{0.0f}} |
Definition at line 86 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_get_xyz_to_scene_linear(), and IMB_colormanagement_xyz_to_scene_linear().
|
static |
Definition at line 97 of file colormanagement.cc.
Referenced by colorspace_from_scene_linear_cpu_processor(), colorspace_to_scene_linear_cpu_processor(), display_from_scene_linear_processor(), display_to_scene_linear_processor(), IMB_colormanagement_color_picking_to_scene_linear_v3(), and IMB_colormanagement_scene_linear_to_color_picking_v3().