|
Blender
V2.93
|
#include "IMB_colormanagement.h"#include "IMB_colormanagement_intern.h"#include <math.h>#include <string.h>#include "DNA_color_types.h"#include "DNA_image_types.h"#include "DNA_movieclip_types.h"#include "DNA_scene_types.h"#include "DNA_space_types.h"#include "IMB_filetype.h"#include "IMB_filter.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "IMB_metadata.h"#include "IMB_moviecache.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_math_color.h"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_threads.h"#include "BKE_appdir.h"#include "BKE_colortools.h"#include "BKE_context.h"#include "BKE_image.h"#include "BKE_main.h"#include "RNA_define.h"#include "SEQ_iterator.h"#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 | ProcessorTransformInit |
| struct | PartialThreadData |
Threaded Display Buffer Transform Routines | |
| typedef struct DisplayBufferThread | DisplayBufferThread |
| typedef struct DisplayBufferInitData | DisplayBufferInitData |
| static void | display_buffer_init_handle (void *handle_v, int start_line, int tot_line, void *init_data_v) |
| static void | display_buffer_apply_get_linear_buffer (DisplayBufferThread *handle, int height, float *linear_buffer, bool *is_straight_alpha) |
| static void * | do_display_buffer_apply_thread (void *handle_v) |
| static void | display_buffer_apply_threaded (ImBuf *ibuf, const float *buffer, unsigned char *byte_buffer, float *display_buffer, unsigned char *display_buffer_byte, ColormanageProcessor *cm_processor) |
| static bool | is_ibuf_rect_in_display_space (ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
| static void | colormanage_display_buffer_process_ex (ImBuf *ibuf, float *display_buffer, unsigned char *display_buffer_byte, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
| static void | colormanage_display_buffer_process (ImBuf *ibuf, unsigned char *display_buffer, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
Threaded Processor Transform Routines | |
| typedef struct ProcessorTransformThread | ProcessorTransformThread |
| typedef struct ProcessorTransformInit | ProcessorTransformInitData |
| static void | processor_transform_init_handle (void *handle_v, int start_line, int tot_line, void *init_data_v) |
| static void * | do_processor_transform_thread (void *handle_v) |
| static void | processor_transform_apply_threaded (unsigned char *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) |
Partial Display Buffer Update | |
| typedef struct PartialThreadData | PartialThreadData |
| static void | partial_buffer_update_rect (ImBuf *ibuf, unsigned char *display_buffer, const float *linear_buffer, const unsigned char *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 void | partial_buffer_update_rect_thread_do (void *data_v, int start_scanline, int num_scanlines) |
| static void | imb_partial_display_buffer_update_ex (ImBuf *ibuf, const float *linear_buffer, const unsigned char *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) |
| void | IMB_partial_display_buffer_update (ImBuf *ibuf, const float *linear_buffer, const unsigned char *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_partial_display_buffer_update_threaded (struct ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer, int stride, int offset_x, int offset_y, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax) |
| void | IMB_partial_display_buffer_update_delayed (ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax) |
| #define DISPLAY_BUFFER_CHANNELS 4 |
Definition at line 68 of file colormanagement.c.
| typedef struct ColormanageCache ColormanageCache |
| typedef struct ColormanageCacheData ColormanageCacheData |
| typedef struct ColormanageCacheDisplaySettings ColormanageCacheDisplaySettings |
| typedef struct ColormanageCacheKey ColormanageCacheKey |
| typedef struct ColormanageCacheViewSettings ColormanageCacheViewSettings |
All color management cache stuff is stored in two properties of image buffers:
display_buffer_flags
This is a bit field which used to mark calculated transformations for particular image buffer. Index inside of this array means index of a color managed display. Element with given index matches view transformations applied for a given display. So if bit B of array element B is set to 1, this means display buffer with display index of A and view transform of B was ever calculated for this imbuf.
In contrast with indices in global lists of displays and views this indices are 0-based, not 1-based. This is needed to save some bytes of memory.
colormanage_cache
This is a pointer to a structure which holds all data which is needed for color management cache to work.
It contains two parts:
Data field is used to store additional information about cached buffers which affects on whether cached buffer could be used. This data can't go to cache key because changes in this data shouldn't lead extra buffers adding to cache, it shall invalidate cached images.
Currently such a data contains only exposure and gamma, but would likely extended further.
data field is not null only for elements of cache, not used for original image buffers.
Color management cache is using generic MovieCache implementation to make it easier to deal with memory limitation.
Currently color management is using the same memory limitation pool as sequencer and clip editor are using which means color managed buffers would be removed from the cache as soon as new frames are loading for the movie clip and there's no space in cache.
Every image buffer has got own movie cache instance, which means keys for color managed buffers could be really simple and look up in this cache would be fast and independent from overall amount of color managed images.
| typedef struct ColormanageProcessor ColormanageProcessor |
| typedef struct DisplayBufferInitData DisplayBufferInitData |
| typedef struct DisplayBufferThread DisplayBufferThread |
| typedef struct PartialThreadData PartialThreadData |
| typedef struct ProcessorTransformInit ProcessorTransformInitData |
| typedef struct ProcessorTransformThread ProcessorTransformThread |
| void colormanage_cache_free | ( | ImBuf * | ibuf | ) |
Definition at line 760 of file colormanagement.c.
References ImBuf::colormanage_cache, colormanage_cachedata_get(), colormanage_moviecache_get(), ImBuf::display_buffer_flags, IMB_moviecache_free(), MEM_freeN, and NULL.
Referenced by IMB_freeImBuf().
|
static |
Definition at line 352 of file colormanagement.c.
References BLI_assert, CurveMapping::changed_timestamp, colormanage_cache_get_ibuf(), colormanage_cachedata_get(), colormanage_settings_to_key(), ColormanageCacheViewSettings::curve_mapping, ColormanageCacheData::curve_mapping, ColormanageCacheData::curve_mapping_timestamp, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, ColormanageCacheViewSettings::dither, ColormanageCacheData::dither, ColormanageCacheViewSettings::exposure, ColormanageCacheData::exposure, ColormanageCacheViewSettings::flag, ColormanageCacheData::flag, ColormanageCacheViewSettings::gamma, ColormanageCacheData::gamma, IMB_freeImBuf(), ColormanageCacheViewSettings::look, ColormanageCacheData::look, NULL, ImBuf::rect, ColormanageCacheViewSettings::view, ImBuf::x, and ImBuf::y.
Referenced by IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 330 of file colormanagement.c.
References colormanage_moviecache_get(), IMB_moviecache_get(), and NULL.
Referenced by colormanage_cache_get().
|
static |
Definition at line 449 of file colormanagement.c.
References IMB_freeImBuf().
Referenced by IMB_display_buffer_release().
|
static |
Definition at line 405 of file colormanagement.c.
References CurveMapping::changed_timestamp, colormanage_cachedata_set(), colormanage_moviecache_ensure(), colormanage_settings_to_key(), ColormanageCacheViewSettings::curve_mapping, ColormanageCacheData::curve_mapping, ColormanageCacheData::curve_mapping_timestamp, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, ColormanageCacheViewSettings::dither, ColormanageCacheData::dither, ColormanageCacheViewSettings::exposure, ColormanageCacheData::exposure, ColormanageCacheViewSettings::flag, ColormanageCacheData::flag, ImBuf::flags, ColormanageCacheViewSettings::gamma, ColormanageCacheData::gamma, IB_rect, IMB_allocImBuf(), IMB_moviecache_put(), ColormanageCacheViewSettings::look, ColormanageCacheData::look, ImBuf::mall, MEM_callocN, ImBuf::planes, ImBuf::rect, ColormanageCacheViewSettings::view, ImBuf::x, and ImBuf::y.
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 242 of file colormanagement.c.
References ImBuf::colormanage_cache, ColormanageCache::data, and NULL.
Referenced by colormanage_cache_free(), and colormanage_cache_get().
|
static |
Definition at line 288 of file colormanagement.c.
References ImBuf::colormanage_cache, data, ColormanageCache::data, and MEM_callocN.
Referenced by colormanage_cache_put().
|
static |
Definition at line 1171 of file colormanagement.c.
References BLI_strncpy(), colormanage_colorspace_get_named(), and ColorManagedColorspaceSettings::name.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 1079 of file colormanagement.c.
References BLI_strncpy(), colormanage_display_get_named(), ColorManagedDisplaySettings::display_device, and ColorManagedDisplay::name.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 1105 of file colormanagement.c.
References BLI_strncpy(), colormanage_display_get_named(), colormanage_look_get_named(), colormanage_view_get_default(), colormanage_view_get_named(), ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ListBase::first, ColorManagedViewSettings::gamma, global_looks, if(), ColorManagedViewSettings::look, ColorManagedView::name, ColorManagedLook::name, NULL, view, 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 3067 of file colormanagement.c.
References BLI_addtail(), BLI_insertlinkbefore(), BLI_strcasecmp(), BLI_strncpy(), colormanage_description_strip(), ColorSpace::description, ListBase::first, global_colorspaces, global_tot_colorspace, ColorSpace::index, ColorSpace::is_data, ColorSpace::is_invertible, MEM_callocN, ColorSpace::name, and ColorSpace::next.
Referenced by colormanage_load_config().
| ColorSpace* colormanage_colorspace_get_indexed | ( | int | index | ) |
Definition at line 3133 of file colormanagement.c.
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 3113 of file colormanagement.c.
References ListBase::first, global_colorspaces, ColorSpace::name, ColorSpace::next, NULL, 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_float_colorspace(), IMB_colormanagement_assign_rect_colorspace(), IMB_colormanagement_check_is_data(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_colorspace_get_named_index(), IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_space_name_is_data(), imb_handle_alpha(), and imb_load_photoshop().
| ColorSpace* colormanage_colorspace_get_roled | ( | int | role | ) |
Definition at line 3126 of file colormanagement.c.
References colormanage_colorspace_get_named(), and IMB_colormanagement_role_colorspace_name_get().
Referenced by IMB_prepare_write_ImBuf().
|
static |
Definition at line 744 of file colormanagement.c.
References ColorManagedLook::is_noop, STREQ, and ColorManagedLook::view.
Referenced by colormanage_use_look(), and IMB_colormanagement_look_items_add().
|
static |
Definition at line 3047 of file colormanagement.c.
References ELEM.
Referenced by colormanage_colorspace_add().
| ColorManagedDisplay* colormanage_display_add | ( | const char * | name | ) |
Definition at line 2828 of file colormanagement.c.
References BLI_addtail(), BLI_strncpy(), global_displays, ColorManagedDisplay::index, ListBase::last, MEM_callocN, and ColorManagedDisplay::name.
Referenced by colormanage_load_config().
|
static |
Definition at line 1780 of file colormanagement.c.
References colormanage_display_buffer_process_ex(), and NULL.
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 1745 of file colormanagement.c.
References display_buffer_apply_threaded(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), is_ibuf_rect_in_display_space(), NULL, ImBuf::rect, ImBuf::rect_colorspace, and ImBuf::rect_float.
Referenced by colormanage_display_buffer_process(), and colormanagement_imbuf_make_display_space().
| ColorManagedDisplay* colormanage_display_get_default | ( | void | ) |
Definition at line 2817 of file colormanagement.c.
References colormanage_display_get_default_name(), colormanage_display_get_named(), and NULL.
Referenced by IMB_colormanagement_check_file_config(), and IMB_colormanagement_display_get_default_name().
| const char* colormanage_display_get_default_name | ( | void | ) |
Definition at line 2805 of file colormanagement.c.
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 2863 of file colormanagement.c.
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 2850 of file colormanagement.c.
References ListBase::first, global_displays, ColorManagedDisplay::name, ColorManagedDisplay::next, NULL, 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(), and IMB_colormanagement_view_items_add().
|
static |
Definition at line 313 of file colormanagement.c.
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 1375 of file colormanagement.c.
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 586 of file colormanagement.c.
References BLI_freelistN(), BLI_listbase_clear(), ListBase::first, ColorSpace::from_scene_linear, ColorManagedDisplay::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, ColorSpace::next, ColorManagedDisplay::next, OCIO_cpuProcessorRelease(), OCIO_exit(), ColorSpace::to_scene_linear, ColorManagedDisplay::to_scene_linear, and ColorManagedDisplay::views.
Referenced by colormanagement_exit(), and colormanagement_init().
|
static |
Definition at line 260 of file colormanagement.c.
References Freestyle::a, ColormanageCacheKey::display, and ColormanageCacheKey::view.
Referenced by colormanage_moviecache_ensure().
|
static |
Definition at line 251 of file colormanagement.c.
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 1046 of file colormanagement.c.
References ImBuf::channels, colormanage_colorspace_get_named(), ImBuf::colormanage_flag, global_role_scene_linear, IMB_alpha_affects_rgb(), IMB_COLORMANAGE_IS_DATA, IMB_colormanagement_transform(), imb_freerectImBuf(), ColorSpace::is_data, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_alpha().
| void colormanage_imbuf_set_default_spaces | ( | ImBuf * | ibuf | ) |
Definition at line 1041 of file colormanagement.c.
References colormanage_colorspace_get_named(), global_role_default_byte, and ImBuf::rect_colorspace.
Referenced by IMB_initImBuf().
|
static |
Definition at line 487 of file colormanagement.c.
References BLI_addtail(), BLI_genericNodeN(), colormanage_colorspace_add(), colormanage_display_add(), colormanage_look_add(), colormanage_role_color_space_name_get(), colormanage_view_add(), colormanage_view_get_named(), copy_m3_m3(), 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, imbuf_linear_srgb_to_xyz, imbuf_luma_coefficients, imbuf_rgb_to_xyz, imbuf_xyz_to_linear_srgb, imbuf_xyz_to_rgb, invert_m3_m3(), MovieCache::name, NULL, OCIO_colorSpaceGetDescription(), 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_configGetXYZtoRGB(), 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_LINEAR_SRGB, view, and ColorManagedDisplay::views.
Referenced by colormanagement_init().
| ColorManagedLook* colormanage_look_add | ( | const char * | name, |
| const char * | process_space, | ||
| bool | is_noop | ||
| ) |
Definition at line 3192 of file colormanagement.c.
References BLI_addtail(), BLI_strncpy(), global_looks, global_tot_looks, ColorManagedLook::index, ColorManagedLook::is_noop, MEM_callocN, ColorManagedLook::name, ColorManagedLook::process_space, ColorManagedLook::ui_name, and ColorManagedLook::view.
Referenced by colormanage_load_config().
| ColorManagedLook* colormanage_look_get_indexed | ( | int | index | ) |
Definition at line 3231 of file colormanagement.c.
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 3218 of file colormanagement.c.
References ListBase::first, global_looks, ColorManagedLook::name, ColorManagedLook::next, NULL, and STREQ.
Referenced by colormanage_check_view_settings(), colormanage_use_look(), IMB_colormanagement_look_get_named_index(), and is_ibuf_rect_in_display_space().
|
static |
Definition at line 268 of file colormanagement.c.
References ImBuf::colormanage_cache, colormanage_hashcmp(), colormanage_hashhash(), IMB_moviecache_create(), MEM_callocN, and ColormanageCache::moviecache.
Referenced by colormanage_cache_put().
|
static |
Definition at line 233 of file colormanagement.c.
References ImBuf::colormanage_cache, ColormanageCache::moviecache, and NULL.
Referenced by colormanage_cache_free(), and colormanage_cache_get_ibuf().
|
static |
Definition at line 462 of file colormanagement.c.
References BLI_strncpy(), MAX_COLORSPACE_NAME, MovieCache::name, OCIO_colorSpaceGetName(), OCIO_colorSpaceRelease(), and OCIO_configGetColorSpace().
Referenced by colormanage_load_config().
|
static |
Definition at line 322 of file colormanagement.c.
References ColormanageCacheDisplaySettings::display, ColormanageCacheKey::display, ColormanageCacheViewSettings::view, and ColormanageCacheKey::view.
Referenced by colormanage_cache_get(), and colormanage_cache_put().
|
static |
Definition at line 754 of file colormanagement.c.
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 2952 of file colormanagement.c.
References BLI_addtail(), BLI_strncpy(), global_tot_view, global_views, MEM_callocN, and view.
Referenced by colormanage_load_config().
| ColorManagedView* colormanage_view_get_default | ( | const ColorManagedDisplay * | display | ) |
Definition at line 2941 of file colormanagement.c.
References colormanage_view_get_default_name(), colormanage_view_get_named(), and NULL.
Referenced by colormanage_check_view_settings(), IMB_colormanagement_init_default_view_settings(), IMB_colormanagement_validate_settings(), and IMB_colormanagement_view_get_default_name().
| const char* colormanage_view_get_default_name | ( | const ColorManagedDisplay * | display | ) |
Definition at line 2929 of file colormanagement.c.
References ColorManagedDisplay::name, 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 2981 of file colormanagement.c.
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 2968 of file colormanagement.c.
References ListBase::first, global_views, NULL, 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 2987 of file colormanagement.c.
References colormanage_display_get_named(), LISTBASE_FOREACH, NULL, STRCASEEQ, view, and ColorManagedDisplay::views.
Referenced by IMB_colormanagement_init_default_view_settings().
|
static |
Definition at line 297 of file colormanagement.c.
References ColormanageCacheViewSettings::curve_mapping, ColorManagedViewSettings::curve_mapping, ImBuf::dither, ColormanageCacheViewSettings::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, view, ColormanageCacheViewSettings::view, and ColorManagedViewSettings::view_transform.
Referenced by IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
| void colormanagement_exit | ( | void | ) |
Definition at line 712 of file colormanagement.c.
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(), and OCIO_gpuCacheFree().
Referenced by IMB_exit().
|
static |
Definition at line 2449 of file colormanagement.c.
References colormanage_display_buffer_process_ex(), imb_addrectImBuf(), ImBuf::rect, and ImBuf::rect_float.
Referenced by IMB_colormanagement_imbuf_for_write(), and IMB_colormanagement_imbuf_make_display_space().
| void colormanagement_init | ( | void | ) |
Definition at line 645 of file colormanagement.c.
References BCM_CONFIG_FILE, BKE_appdir_folder_id(), BLENDER_DATAFILES, BLI_getenv(), BLI_init_srgb_conversion(), BLI_join_dirfile(), colormanage_free_config(), colormanage_load_config(), FILE_MAX, global_tot_display, global_tot_view, NULL, OCIO_configCreateFallback(), OCIO_configCreateFromEnv(), OCIO_configCreateFromFile(), OCIO_configRelease(), OCIO_init(), and OCIO_setCurrentConfig().
Referenced by IMB_init().
|
static |
Definition at line 1929 of file colormanagement.c.
References height, IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_apply_byte(), IMB_colormanagement_processor_free(), NULL, processor_transform_apply_threaded(), STREQ, and width.
Referenced by IMB_colormanagement_transform(), IMB_colormanagement_transform_byte(), IMB_colormanagement_transform_byte_threaded(), and IMB_colormanagement_transform_threaded().
|
static |
Definition at line 3286 of file colormanagement.c.
References EnumPropertyItem::description, EnumPropertyItem::icon, EnumPropertyItem::identifier, EnumPropertyItem::name, RNA_enum_item_add(), EnumPropertyItem::value, and view.
Referenced by IMB_colormanagement_view_items_add().
|
static |
Definition at line 898 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), create_colorspace_transform_processor(), ColorSpace::from_scene_linear, global_role_scene_linear, ColorSpace::name, NULL, OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by IMB_colormanagement_scene_linear_to_colorspace_v3().
| void colorspace_set_default_role | ( | char * | colorspace, |
| int | size, | ||
| int | role | ||
| ) |
Definition at line 1030 of file colormanagement.c.
References BLI_strncpy(), IMB_colormanagement_role_colorspace_name_get(), and size().
Referenced by imb_bmp_decode(), imb_load_dds(), imb_load_dpx_cineon(), imb_load_jp2_stream(), imb_load_jpeg(), imb_load_openexr(), imb_load_photoshop(), imb_loadhdr(), imb_loadiris(), imb_loadpng(), imb_loadtarga(), imb_loadtiff(), and IMB_open_anim().
|
static |
Definition at line 875 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), create_colorspace_transform_processor(), global_role_scene_linear, ColorSpace::name, NULL, 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_byte_texture().
|
static |
Definition at line 862 of file colormanagement.c.
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 835 of file colormanagement.c.
References colormanage_use_look(), max_ff(), NULL, OCIO_configRelease(), OCIO_createDisplayProcessor(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and powf.
Referenced by IMB_colormanagement_display_processor_new().
|
static |
Definition at line 1016 of file colormanagement.c.
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 3942 of file colormanagement.c.
References BKE_curvemapping_init(), BKE_curvemapping_premultiply(), BKE_curvemapping_table_RGBA(), OCIO_CurveMappingSettings::black, CurveMapping::black, OCIO_CurveMappingSettings::bwmul, CurveMapping::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, OCIO_CurveMappingSettings::mintable, CurveMap::mintable, OCIO_CurveMappingSettings::range, CurveMap::range, CurveMap::table, OCIO_CurveMappingSettings::use_extend_extrapolate, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by update_glsl_curve_mapping().
|
static |
Definition at line 1510 of file colormanagement.c.
References BLI_assert, DisplayBufferThread::buffer, DisplayBufferThread::byte_buffer, DisplayBufferThread::byte_colorspace, DisplayBufferThread::channels, DisplayBufferThread::cm_processor, DisplayBufferThread::float_colorspace, global_role_scene_linear, height, IMB_colormanagement_transform(), DisplayBufferThread::is_data, ColormanageProcessor::is_data_result, DisplayBufferThread::predivide, rgb_uchar_to_float(), rgba_uchar_to_float(), width, and DisplayBufferThread::width.
Referenced by do_display_buffer_apply_thread().
|
static |
Definition at line 1682 of file colormanagement.c.
References buffer, display_buffer_init_handle(), do_display_buffer_apply_thread(), ImBuf::float_colorspace, global_role_default_byte, IMB_processor_apply_threaded(), init_data(), ColorSpace::name, NULL, ImBuf::rect_colorspace, and ImBuf::y.
Referenced by colormanage_display_buffer_process_ex().
|
static |
Definition at line 1460 of file colormanagement.c.
References DisplayBufferThread::buffer, DisplayBufferThread::byte_buffer, DisplayBufferThread::byte_colorspace, ImBuf::channels, DisplayBufferThread::channels, DisplayBufferThread::cm_processor, ImBuf::colormanage_flag, DisplayBufferThread::display_buffer, DisplayBufferThread::display_buffer_byte, DISPLAY_BUFFER_CHANNELS, ImBuf::dither, DisplayBufferThread::dither, DisplayBufferThread::float_colorspace, IMB_alpha_affects_rgb(), IMB_COLORMANAGE_IS_DATA, init_data(), DisplayBufferThread::is_data, DisplayBufferThread::predivide, DisplayBufferThread::start_line, DisplayBufferThread::tot_line, DisplayBufferThread::width, and ImBuf::x.
Referenced by display_buffer_apply_threaded().
|
static |
Definition at line 921 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), colormanage_view_get_default_name(), ColorManagedDisplay::from_scene_linear, global_role_scene_linear, ColorManagedDisplay::name, NULL, OCIO_configGetDisplayColorSpaceName(), OCIO_configGetProcessorWithNames(), OCIO_configRelease(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by IMB_colormanagement_scene_linear_to_display_v3().
|
static |
Definition at line 954 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), colormanage_view_get_default_name(), global_role_scene_linear, ColorManagedDisplay::name, NULL, OCIO_configGetDisplayColorSpaceName(), OCIO_configGetProcessorWithNames(), OCIO_configRelease(), OCIO_getCurrentConfig(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), processor_lock, and ColorManagedDisplay::to_scene_linear.
Referenced by IMB_colormanagement_display_to_scene_linear_v3().
|
static |
Definition at line 821 of file colormanagement.c.
References colormanage_colorspace_get_named(), IMB_colormanagement_get_display_colorspace_name(), and NULL.
Referenced by IMB_colormanagement_display_processor_new(), and IMB_colormanagement_imbuf_for_write().
|
static |
Definition at line 1589 of file colormanagement.c.
References DisplayBufferThread::byte_buffer, DisplayBufferThread::channels, DisplayBufferThread::cm_processor, DisplayBufferThread::display_buffer, display_buffer_apply_get_linear_buffer(), DisplayBufferThread::display_buffer_byte, DisplayBufferThread::dither, height, IB_PROFILE_SRGB, IMB_buffer_byte_from_byte(), IMB_buffer_byte_from_float(), IMB_buffer_float_from_byte(), IMB_colormanagement_processor_apply(), DisplayBufferThread::is_data, MEM_freeN, MEM_mallocN, NULL, DisplayBufferThread::predivide, straight_to_premul_v4(), DisplayBufferThread::tot_line, width, and DisplayBufferThread::width.
Referenced by display_buffer_apply_threaded().
|
static |
Definition at line 1855 of file colormanagement.c.
References ProcessorTransformThread::byte_buffer, ProcessorTransformThread::channels, ProcessorTransformThread::cm_processor, ProcessorTransformThread::float_buffer, ProcessorTransformThread::float_from_byte, height, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_apply_byte(), IMB_premultiply_rect_float(), NULL, ProcessorTransformThread::predivide, ProcessorTransformThread::tot_line, width, and ProcessorTransformThread::width.
Referenced by processor_transform_apply_threaded().
Definition at line 1307 of file colormanagement.c.
References ImBuf::flags, IB_alphamode_channel_packed, IB_alphamode_ignore, IB_alphamode_premul, IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_assign_rect_colorspace(), IMB_colormanagement_get_float_colorspace(), and IMB_colormanagement_get_rect_colorspace().
Referenced by BKE_tracking_stabilize_frame().
| void IMB_colormanagement_assign_float_colorspace | ( | ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1324 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, ImBuf::float_colorspace, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by IMB_colormanagegent_copy_settings(), prepare_effect_imbufs(), seq_disk_cache_read_file(), seq_imbuf_assign_spaces(), and SEQ_render_imbuf_from_sequencer_space().
| void IMB_colormanagement_assign_rect_colorspace | ( | ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1338 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, IMB_COLORMANAGE_IS_DATA, ColorSpace::is_data, and ImBuf::rect_colorspace.
Referenced by add_ibuf_size(), image_get_render_result(), IMB_colormanagegent_copy_settings(), seq_disk_cache_read_file(), and seq_imbuf_assign_spaces().
| void IMB_colormanagement_buffer_make_display_space | ( | float * | buffer, |
| unsigned char * | display_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| float | dither, | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings | ||
| ) |
Definition at line 2598 of file colormanagement.c.
References buffer, float(), height, IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), MEM_freeN, MEM_mallocN, NULL, processor_transform_apply_threaded(), and width.
| void IMB_colormanagement_check_file_config | ( | Main * | bmain | ) |
Definition at line 1192 of file colormanagement.c.
References BLI_strncpy(), colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_display_get_default(), Image::colorspace_settings, MovieClip::colorspace_settings, Strip::colorspace_settings, Scene::display_settings, Scene::ed, ListBase::first, global_role_default_sequencer, Image::id, MovieClip::id, Scene::id, Main::images, MAX_COLORSPACE_NAME, Main::movieclips, ColorManagedColorspaceSettings::name, ID::next, scene, Main::scenes, SEQ_ALL_BEGIN, SEQ_ALL_END, Scene::sequencer_colorspace_settings, Sequence::strip, and Scene::view_settings.
Referenced by BKE_copybuffer_paste(), BKE_copybuffer_read(), lib_relocate_do(), setup_app_data(), and wm_link_append_exec().
| void IMB_colormanagement_check_is_data | ( | ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1295 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by add_ibuf_size().
| void IMB_colormanagement_color_picking_to_scene_linear_v3 | ( | float | pixel[3] | ) |
Definition at line 2353 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), global_color_picking_state::cpu_processor_from, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, NULL, 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 3165 of file colormanagement.c.
References BLI_strncpy(), colormanage_colorspace_get_named(), IMB_colormanagement_role_colorspace_name_get(), IMB_file_type_from_ibuf(), ColorSpace::is_data, ColorManagedColorspaceSettings::name, NULL, and type.
Referenced by image_save_post().
| const char* IMB_colormanagement_colorspace_get_indexed_name | ( | int | index | ) |
Definition at line 3152 of file colormanagement.c.
References colormanage_colorspace_get_indexed(), and ColorSpace::name.
| int IMB_colormanagement_colorspace_get_named_index | ( | const char * | name | ) |
Definition at line 3139 of file colormanagement.c.
References colormanage_colorspace_get_named(), and ColorSpace::index.
| void IMB_colormanagement_colorspace_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem | ||
| ) |
Definition at line 3342 of file colormanagement.c.
References ColorSpace::description, EnumPropertyItem::description, ListBase::first, global_colorspaces, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorSpace::index, ColorSpace::is_invertible, ColorSpace::name, EnumPropertyItem::name, ColorSpace::next, RNA_enum_item_add(), and EnumPropertyItem::value.
| ColormanageProcessor* IMB_colormanagement_colorspace_processor_new | ( | const char * | from_colorspace, |
| const char * | to_colorspace | ||
| ) |
Definition at line 3791 of file colormanagement.c.
References colormanage_colorspace_get_named(), ColormanageProcessor::cpu_processor, create_colorspace_transform_processor(), ColorSpace::is_data, ColormanageProcessor::is_data_result, MEM_callocN, NULL, OCIO_processorGetCPUProcessor(), and OCIO_processorRelease().
Referenced by colormanagement_transform_ex(), IMB_colormanagement_transform_from_byte_threaded(), and IMB_colormanagement_transform_v4().
| void IMB_colormanagement_colorspace_to_scene_linear | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| struct ColorSpace * | colorspace, | ||
| bool | predivide | ||
| ) |
Definition at line 2163 of file colormanagement.c.
References buffer, colorspace_to_scene_linear_cpu_processor(), height, NULL, OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), and width.
Referenced by IMB_float_from_rect().
| void IMB_colormanagement_colorspace_to_scene_linear_v3 | ( | float | pixel[3], |
| ColorSpace * | colorspace | ||
| ) |
Definition at line 2104 of file colormanagement.c.
References colorspace_to_scene_linear_cpu_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by BKE_brush_sample_tex_3d(), ED_space_clip_color_sample(), ED_space_image_color_sample(), ED_space_node_color_sample(), multitex_nodes_intern(), paint_get_tex_pixel_col(), partial_buffer_update_rect(), tonemapmodifier_apply(), tonemapmodifier_apply_threaded_photoreceptor(), and tonemapmodifier_apply_threaded_simple().
| void IMB_colormanagement_colorspace_to_scene_linear_v4 | ( | float | pixel[4], |
| bool | predivide, | ||
| ColorSpace * | colorspace | ||
| ) |
Definition at line 2139 of file colormanagement.c.
References colorspace_to_scene_linear_cpu_processor(), NULL, OCIO_cpuProcessorApplyRGBA(), and OCIO_cpuProcessorApplyRGBA_predivide().
Referenced by image_sample_pixel_color_ubyte(), IMB_sampleImageAtLocation(), sample_apply(), blender::compositor::sampleImageAtLocation(), and sequencer_sample_apply().
| const char* IMB_colormanagement_display_get_default_name | ( | void | ) |
Definition at line 2895 of file colormanagement.c.
References colormanage_display_get_default(), and ColorManagedDisplay::name.
Referenced by BKE_color_managed_display_settings_init(), and UI_block_begin().
| const char* IMB_colormanagement_display_get_default_view_transform_name | ( | struct ColorManagedDisplay * | display | ) |
Definition at line 2917 of file colormanagement.c.
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 2882 of file colormanagement.c.
References colormanage_display_get_indexed(), ColorManagedDisplay::name, and NULL.
| ColorManagedDisplay* IMB_colormanagement_display_get_named | ( | const char * | name | ) |
Definition at line 2903 of file colormanagement.c.
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(), eyedropper_gpencil_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 2869 of file colormanagement.c.
References colormanage_display_get_named(), and ColorManagedDisplay::index.
Referenced by colormanage_display_settings_to_cache().
| const char* IMB_colormanagement_display_get_none_name | ( | void | ) |
Definition at line 2908 of file colormanagement.c.
References colormanage_display_get_default_name(), colormanage_display_get_named(), and NULL.
Referenced by BKE_scene_disable_color_management().
| void IMB_colormanagement_display_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem | ||
| ) |
Definition at line 3269 of file colormanagement.c.
References EnumPropertyItem::description, ListBase::first, global_displays, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorManagedDisplay::index, ColorManagedDisplay::name, EnumPropertyItem::name, ColorManagedDisplay::next, RNA_enum_item_add(), and EnumPropertyItem::value.
| ColormanageProcessor* IMB_colormanagement_display_processor_new | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings | ||
| ) |
Definition at line 3751 of file colormanagement.c.
References BKE_curvemapping_copy(), BKE_curvemapping_premultiply(), COLORMANAGE_VIEW_USE_CURVES, ColormanageProcessor::cpu_processor, create_display_buffer_processor(), ColormanageProcessor::curve_mapping, ColorManagedViewSettings::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, MEM_callocN, and ColorManagedViewSettings::view_transform.
Referenced by colormanage_display_buffer_process_ex(), IMB_colormanagement_buffer_make_display_space(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_display_buffer_transform_apply(), and imb_partial_display_buffer_update_ex().
| void IMB_colormanagement_display_settings_from_ctx | ( | const bContext * | C, |
| ColorManagedViewSettings ** | r_view_settings, | ||
| ColorManagedDisplaySettings ** | r_display_settings | ||
| ) |
Definition at line 786 of file colormanagement.c.
References C, CTX_data_scene(), CTX_wm_space_image(), Scene::display_settings, Image::flag, IMA_VIEW_AS_RENDER, SpaceImage::image, NULL, scene, and Scene::view_settings.
Referenced by 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 | ||
| ) |
Definition at line 2410 of file colormanagement.c.
References display_to_scene_linear_processor(), NULL, 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 | ( | void | ) |
Definition at line 4136 of file colormanagement.c.
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_display_colorspace_name | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings | ||
| ) |
Definition at line 804 of file colormanagement.c.
References ColorManagedDisplaySettings::display_device, OCIO_configGetDisplayColorSpaceName(), OCIO_configRelease(), OCIO_getCurrentConfig(), view, and ColorManagedViewSettings::view_transform.
Referenced by display_transform_get_colorspace(), and is_ibuf_rect_in_display_space().
| const char* IMB_colormanagement_get_float_colorspace | ( | ImBuf * | ibuf | ) |
Definition at line 1352 of file colormanagement.c.
References COLOR_ROLE_SCENE_LINEAR, ImBuf::float_colorspace, IMB_colormanagement_role_colorspace_name_get(), and ColorSpace::name.
Referenced by IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), and write_internal_bake_pixels().
| const char* IMB_colormanagement_get_rect_colorspace | ( | ImBuf * | ibuf | ) |
Definition at line 1361 of file colormanagement.c.
References COLOR_ROLE_DEFAULT_BYTE, IMB_colormanagement_role_colorspace_name_get(), ColorSpace::name, and ImBuf::rect_colorspace.
Referenced by IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), write_external_bake_pixels(), and write_internal_bake_pixels().
| ImBuf* IMB_colormanagement_imbuf_for_write | ( | ImBuf * | ibuf, |
| bool | save_as_render, | ||
| bool | allocate_result, | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| ImageFormatData * | image_format_data | ||
| ) |
Definition at line 2482 of file colormanagement.c.
References BKE_image_imtype_to_ftype(), BKE_imtype_is_movie(), BKE_imtype_requires_linear_float(), ImBuf::channels, colormanagement_imbuf_make_display_space(), display_transform_get_colorspace(), ImBuf::float_colorspace, ImBuf::foptions, ImBuf::ftype, IB_DISPLAY_BUFFER_INVALID, IB_rect, IB_RECT_INVALID, IB_rectfloat, IM_FTYPE_FLOAT, IMB_alpha_under_color_byte(), IMB_alpha_under_color_float(), IMB_dupImBuf(), IMB_file_type_from_ibuf(), IMB_metadata_copy(), IMB_rect_from_float(), ImageFormatData::imtype, ImBuf::mall, MEM_dupallocN, NULL, ImageFormatData::planes, R_IMF_PLANES_RGBA, ImBuf::rect, ImBuf::rect_float, type, ImBuf::userflags, ImBuf::x, and ImBuf::y.
| void IMB_colormanagement_imbuf_make_display_space | ( | ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings | ||
| ) |
Definition at line 2463 of file colormanagement.c.
References colormanagement_imbuf_make_display_space().
| void IMB_colormanagement_imbuf_to_byte_texture | ( | unsigned char * | out_buffer, |
| const int | offset_x, | ||
| const int | offset_y, | ||
| const int | width, | ||
| const int | height, | ||
| const struct ImBuf * | ibuf, | ||
| const bool | compress_as_srgb, | ||
| const bool | store_premultiplied | ||
| ) |
Definition at line 2202 of file colormanagement.c.
References BLI_assert, colorspace_to_scene_linear_cpu_processor(), height, if(), IMB_alpha_affects_rgb(), IMB_colormanagement_space_is_srgb(), linearrgb_to_srgb_v3_v3(), mul_v3_fl(), NULL, OCIO_cpuProcessorApplyRGB(), ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, rgba_float_to_uchar(), rgba_uchar_to_float(), width, x, 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 struct ImBuf * | ibuf, | ||
| const bool | store_premultiplied | ||
| ) |
Definition at line 2266 of file colormanagement.c.
References ImBuf::channels, height, if(), IMB_alpha_affects_rgb(), premul_to_straight_v4_v4(), ImBuf::rect_float, width, x, 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 986 of file colormanagement.c.
References BLI_strncpy(), 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, NULL, and ColorManagedViewSettings::view_transform.
Referenced by IMB_colormanagement_display_processor_new(), IMB_colormanagement_setup_glsl_draw_from_space(), and IMB_display_buffer_acquire().
| const char* IMB_colormanagement_look_get_indexed_name | ( | int | index | ) |
Definition at line 3250 of file colormanagement.c.
References colormanage_look_get_indexed(), ColorManagedLook::name, and NULL.
| int IMB_colormanagement_look_get_named_index | ( | const char * | name | ) |
Definition at line 3237 of file colormanagement.c.
References colormanage_look_get_named(), and ColorManagedLook::index.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_look_items_add | ( | struct EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | view_name | ||
| ) |
Definition at line 3319 of file colormanagement.c.
References colormanage_compatible_look(), EnumPropertyItem::description, ListBase::first, global_looks, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorManagedLook::index, ColorManagedLook::name, EnumPropertyItem::name, ColorManagedLook::next, RNA_enum_item_add(), ColorManagedLook::ui_name, and EnumPropertyItem::value.
| 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 2434 of file colormanagement.c.
References copy_v3_v3(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v3(), IMB_colormanagement_processor_free(), and result.
| 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 2419 of file colormanagement.c.
References copy_v4_v4(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), and result.
| void IMB_colormanagement_processor_apply | ( | ColormanageProcessor * | cm_processor, |
| float * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | predivide | ||
| ) |
Definition at line 3867 of file colormanagement.c.
References buffer, ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), height, OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), width, x, and y.
Referenced by colormanagement_transform_ex(), do_display_buffer_apply_thread(), do_processor_transform_thread(), and IMB_display_buffer_transform_apply().
| void IMB_colormanagement_processor_apply_byte | ( | ColormanageProcessor * | cm_processor, |
| unsigned char * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels | ||
| ) |
Definition at line 3910 of file colormanagement.c.
References BLI_assert, buffer, height, IMB_colormanagement_processor_apply_v4(), rgba_float_to_uchar(), rgba_uchar_to_float(), width, x, and y.
Referenced by colormanagement_transform_ex(), and do_processor_transform_thread().
| void IMB_colormanagement_processor_apply_pixel | ( | struct ColormanageProcessor * | cm_processor, |
| float * | pixel, | ||
| int | channels | ||
| ) |
Definition at line 3846 of file colormanagement.c.
References BLI_assert, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), IMB_colormanagement_processor_apply_v3(), and IMB_colormanagement_processor_apply_v4_predivide().
Referenced by partial_buffer_update_rect().
| void IMB_colormanagement_processor_apply_v3 | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[3] | ||
| ) |
Definition at line 3835 of file colormanagement.c.
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 3812 of file colormanagement.c.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGBA().
Referenced by BKE_histogram_update_sample_line(), blender::compositor::PreviewOperation::executeRegion(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_processor_apply_byte(), IMB_colormanagement_transform_v4(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4_predivide | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[4] | ||
| ) |
Definition at line 3823 of file colormanagement.c.
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 3928 of file colormanagement.c.
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::PreviewOperation::executeRegion(), IMB_colormanagement_buffer_make_display_space(), 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(), and imb_partial_display_buffer_update_ex().
| const char* IMB_colormanagement_role_colorspace_name_get | ( | int | role | ) |
Definition at line 1269 of file colormanagement.c.
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, 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 NULL.
Referenced by add_ibuf_size(), BKE_image_add_generated(), colormanage_colorspace_get_roled(), colorspace_set_default_role(), image_get_render_result(), image_node_colorspace(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), IMB_rect_from_float(), 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(), write_external_bake_pixels(), and write_internal_bake_pixels().
| void IMB_colormanagement_scene_linear_to_color_picking_v3 | ( | float | pixel[3] | ) |
Definition at line 2326 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), global_color_picking_state::cpu_processor_to, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, NULL, OCIO_cpuProcessorApplyRGB(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by ui_scene_linear_to_perceptual_space().
| void IMB_colormanagement_scene_linear_to_colorspace_v3 | ( | float | pixel[3], |
| ColorSpace * | colorspace | ||
| ) |
Definition at line 2122 of file colormanagement.c.
References colorspace_from_scene_linear_cpu_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by tonemapmodifier_apply_threaded_photoreceptor(), and tonemapmodifier_apply_threaded_simple().
| void IMB_colormanagement_scene_linear_to_display_v3 | ( | float | pixel[3], |
| ColorManagedDisplay * | display | ||
| ) |
Definition at line 2400 of file colormanagement.c.
References display_from_scene_linear_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by brush_painter_imbuf_new(), brush_painter_imbuf_update(), eyedropper_color_set(), eyedropper_gpencil_color_set(), ui_block_cm_to_display_space_v3(), ui_draw_but_COLORBAND(), and ui_draw_colorband_handle().
| void IMB_colormanagement_scene_linear_to_srgb_v3 | ( | float | pixel[3] | ) |
Definition at line 2382 of file colormanagement.c.
References imbuf_rgb_to_xyz, imbuf_xyz_to_linear_srgb, linearrgb_to_srgb_v3_v3(), and mul_m3_v3().
Referenced by drop_color_invoke(), paint_brush_color_get(), sculpt_sample_color_invoke(), ui_block_colorpicker(), ui_do_but_COLOR(), and ui_update_color_picker_buts_rgb().
| bool IMB_colormanagement_setup_glsl_draw | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings, | ||
| float | dither, | ||
| bool | predivide | ||
| ) |
Definition at line 4102 of file colormanagement.c.
References IMB_colormanagement_setup_glsl_draw_from_space(), and NULL.
Definition at line 4130 of file colormanagement.c.
References C, IMB_colormanagement_setup_glsl_draw_from_space_ctx(), and NULL.
| bool IMB_colormanagement_setup_glsl_draw_from_space | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings, | ||
| struct 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 4044 of file colormanagement.c.
References colormanage_use_look(), ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ColorManagedViewSettings::gamma, global_role_scene_linear, 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, update_glsl_curve_mapping(), view, and ColorManagedViewSettings::view_transform.
Referenced by IMB_colormanagement_setup_glsl_draw(), and IMB_colormanagement_setup_glsl_draw_from_space_ctx().
| bool IMB_colormanagement_setup_glsl_draw_from_space_ctx | ( | const bContext * | C, |
| struct 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 4115 of file colormanagement.c.
References C, IMB_colormanagement_display_settings_from_ctx(), and IMB_colormanagement_setup_glsl_draw_from_space().
Referenced by IMB_colormanagement_setup_glsl_draw_ctx().
| bool IMB_colormanagement_space_is_data | ( | ColorSpace * | colorspace | ) |
Definition at line 1370 of file colormanagement.c.
| bool IMB_colormanagement_space_is_scene_linear | ( | ColorSpace * | colorspace | ) |
Definition at line 1394 of file colormanagement.c.
| bool IMB_colormanagement_space_is_srgb | ( | ColorSpace * | colorspace | ) |
Definition at line 1400 of file colormanagement.c.
References colormanage_ensure_srgb_scene_linear_info(), ColorSpace::info, and ColorSpace::is_srgb.
Referenced by IMB_colormanagement_imbuf_to_byte_texture().
| bool IMB_colormanagement_space_name_is_data | ( | const char * | name | ) |
Definition at line 1406 of file colormanagement.c.
References colormanage_colorspace_get_named(), and ColorSpace::is_data.
Referenced by add_ibuf_size(), imb_handle_alpha(), node_shader_gpu_tex_environment(), node_shader_gpu_tex_image(), and uiTemplateImage().
| void IMB_colormanagement_srgb_to_scene_linear_v3 | ( | float | pixel[3] | ) |
Definition at line 2389 of file colormanagement.c.
References imbuf_linear_srgb_to_xyz, imbuf_xyz_to_rgb, mul_m3_v3(), and srgb_to_linearrgb_v3_v3().
Referenced by do_paint_brush_task_cb_ex(), drop_color_invoke(), sculpt_color_filter_modal(), sculpt_expand_cache_initial_config_set(), ui_colorpicker_hex_rna_cb(), and ui_do_but_COLOR().
| bool IMB_colormanagement_support_glsl_draw | ( | const ColorManagedViewSettings * | UNUSEDview_settings | ) |
Definition at line 4026 of file colormanagement.c.
References OCIO_supportGPUShader().
| void IMB_colormanagement_transform | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide | ||
| ) |
Definition at line 1972 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
Referenced by colormanage_imbuf_make_linear(), display_buffer_apply_get_linear_buffer(), IMB_colormanagement_transform_from_byte(), IMB_rect_from_float(), render_result_new_from_exr(), write_external_bake_pixels(), and 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 | ||
| ) |
Definition at line 2000 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
| void IMB_colormanagement_transform_byte_threaded | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2010 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
Referenced by 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 | ||
| ) |
Definition at line 2022 of file colormanagement.c.
References height, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_transform(), and width.
| void IMB_colormanagement_transform_from_byte_threaded | ( | float * | float_buffer, |
| unsigned char * | byte_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2042 of file colormanagement.c.
References height, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_free(), IMB_premultiply_rect_float(), NULL, processor_transform_apply_threaded(), STREQ, and width.
Referenced by 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 | ||
| ) |
Definition at line 1987 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
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 2077 of file colormanagement.c.
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 1244 of file colormanagement.c.
References BLI_strncpy(), colormanage_display_get_named(), colormanage_view_get_default(), LinkData::data, ColorManagedDisplaySettings::display_device, ListBase::first, ColorManagedView::name, LinkData::next, NULL, STREQ, view, ColorManagedViewSettings::view_transform, and ColorManagedDisplay::views.
| const char* IMB_colormanagement_view_get_default_name | ( | const char * | display_name | ) |
Definition at line 3025 of file colormanagement.c.
References colormanage_display_get_named(), colormanage_view_get_default(), NULL, and view.
Referenced by BKE_scene_disable_color_management().
| const char* IMB_colormanagement_view_get_indexed_name | ( | int | index | ) |
Definition at line 3014 of file colormanagement.c.
References colormanage_view_get_indexed(), NULL, and view.
| int IMB_colormanagement_view_get_named_index | ( | const char * | name | ) |
Definition at line 3003 of file colormanagement.c.
References colormanage_view_get_named(), and view.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_view_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | display_name | ||
| ) |
Definition at line 3301 of file colormanagement.c.
References colormanage_display_get_named(), colormanagement_view_item_add(), LinkData::data, ListBase::first, LinkData::next, view, and ColorManagedDisplay::views.
| const float* IMB_colormangement_get_xyz_to_rgb | ( | void | ) |
Definition at line 1412 of file colormanagement.c.
References imbuf_xyz_to_rgb.
Referenced by get_XYZ_to_RGB_for_gpu().
| unsigned char* IMB_display_buffer_acquire | ( | ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| void ** | cache_handle | ||
| ) |
Definition at line 2644 of file colormanagement.c.
References BLI_rcti_init(), BLI_thread_lock(), BLI_thread_unlock(), ImBuf::channels, colormanage_cache_get(), colormanage_cache_put(), colormanage_display_buffer_process(), colormanage_display_settings_to_cache(), colormanage_view_settings_to_cache(), DISPLAY_BUFFER_CHANNELS, ImBuf::display_buffer_flags, global_tot_display, IB_DISPLAY_BUFFER_INVALID, IMB_colormanagement_init_default_view_settings(), IMB_partial_display_buffer_update_threaded(), ImBuf::invalid_rect, is_ibuf_rect_in_display_space(), LOCK_COLORMANAGE, MEM_callocN, NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, ImBuf::userflags, ImBuf::x, rcti::xmax, rcti::xmin, ImBuf::y, rcti::ymax, and rcti::ymin.
Referenced by IMB_display_buffer_acquire_ctx().
| unsigned char* IMB_display_buffer_acquire_ctx | ( | const bContext * | C, |
| ImBuf * | ibuf, | ||
| void ** | cache_handle | ||
| ) |
Definition at line 2742 of file colormanagement.c.
References C, IMB_colormanagement_display_settings_from_ctx(), and IMB_display_buffer_acquire().
| void IMB_display_buffer_release | ( | void * | cache_handle | ) |
Definition at line 2788 of file colormanagement.c.
References BLI_thread_lock(), BLI_thread_unlock(), colormanage_cache_handle_release(), and LOCK_COLORMANAGE.
Referenced by BKE_scopes_update(), draw_display_buffer(), draw_image_buffer(), draw_plane_marker_image(), ED_draw_imbuf_clipping(), imb_partial_display_buffer_update_ex(), and sequencer_draw_display_buffer().
| void IMB_display_buffer_transform_apply | ( | unsigned char * | display_buffer, |
| float * | linear_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| bool | predivide | ||
| ) |
Definition at line 2752 of file colormanagement.c.
References buffer, height, IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_free(), MEM_freeN, MEM_mallocN, and width.
| void IMB_partial_display_buffer_update | ( | ImBuf * | ibuf, |
| const float * | linear_buffer, | ||
| const unsigned char * | 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 3673 of file colormanagement.c.
References imb_partial_display_buffer_update_ex(), and stride.
| void IMB_partial_display_buffer_update_delayed | ( | ImBuf * | ibuf, |
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax | ||
| ) |
Definition at line 3733 of file colormanagement.c.
References BLI_rcti_init(), BLI_rcti_union(), ImBuf::invalid_rect, rcti::xmax, and rcti::xmin.
Referenced by imapaint_image_update().
|
static |
Definition at line 3563 of file colormanagement.c.
References BLI_thread_lock(), BLI_thread_unlock(), colormanage_cache_get(), colormanage_display_settings_to_cache(), colormanage_view_settings_to_cache(), data, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, global_tot_display, IB_DISPLAY_BUFFER_INVALID, IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), IMB_display_buffer_release(), IMB_processor_apply_threaded_scanlines(), is_ibuf_rect_in_display_space(), LOCK_COLORMANAGE, NULL, partial_buffer_update_rect(), partial_buffer_update_rect_thread_do(), stride, 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 | ( | struct ImBuf * | ibuf, |
| const float * | linear_buffer, | ||
| const unsigned char * | byte_buffer, | ||
| int | stride, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax | ||
| ) |
Definition at line 3701 of file colormanagement.c.
References height, imb_partial_display_buffer_update_ex(), stride, and width.
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 1723 of file colormanagement.c.
References colormanage_look_get_named(), COLORMANAGE_VIEW_USE_CURVES, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, IMB_colormanagement_get_display_colorspace_name(), ColorManagedViewSettings::look, ColorSpace::name, NULL, ColorManagedLook::process_space, ImBuf::rect_colorspace, and STREQ.
Referenced by colormanage_display_buffer_process_ex(), IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 3380 of file colormanagement.c.
References BLI_assert, ImBuf::channels, ImBuf::colormanage_flag, copy_v3_v3(), copy_v4_v4(), ImBuf::dither, height, 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, NULL, premul_to_straight_v4_v4(), ImBuf::rect_colorspace, rgb_float_to_uchar(), rgba_float_to_uchar(), rgba_uchar_to_float(), straight_to_premul_v4(), unit_float_to_uchar_clamp(), width, x, and y.
Referenced by imb_partial_display_buffer_update_ex(), and partial_buffer_update_rect_thread_do().
|
static |
Definition at line 3542 of file colormanagement.c.
References data, and partial_buffer_update_rect().
Referenced by imb_partial_display_buffer_update_ex().
|
static |
Definition at line 1894 of file colormanagement.c.
References do_processor_transform_thread(), height, IMB_processor_apply_threaded(), init_data(), processor_transform_init_handle(), and width.
Referenced by colormanagement_transform_ex(), IMB_colormanagement_buffer_make_display_space(), and IMB_colormanagement_transform_from_byte_threaded().
|
static |
Definition at line 1818 of file colormanagement.c.
References ProcessorTransformThread::byte_buffer, ProcessorTransformThread::channels, ProcessorTransformThread::cm_processor, ProcessorTransformThread::float_buffer, ProcessorTransformThread::float_from_byte, init_data(), NULL, ProcessorTransformThread::predivide, ProcessorTransformThread::start_line, ProcessorTransformThread::tot_line, width, and ProcessorTransformThread::width.
Referenced by processor_transform_apply_threaded().
|
static |
Definition at line 3975 of file colormanagement.c.
References BKE_curvemapping_copy(), BKE_curvemapping_free(), CurveMapping::changed_timestamp, COLORMANAGE_VIEW_USE_CURVES, global_gpu_state::curve_mapping, ColorManagedViewSettings::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, NULL, global_gpu_state::orig_curve_mapping, and global_gpu_state::use_curve_mapping.
Referenced by IMB_colormanagement_setup_glsl_draw_from_space().
|
static |
Definition at line 79 of file colormanagement.c.
Referenced by colormanage_colorspace_add(), colormanage_colorspace_get_indexed(), colormanage_colorspace_get_named(), colormanage_free_config(), and IMB_colormanagement_colorspace_items_add().
Definition at line 80 of file colormanagement.c.
Referenced by colormanage_display_add(), colormanage_display_get_indexed(), colormanage_display_get_named(), colormanage_free_config(), and IMB_colormanagement_display_items_add().
|
static |
Definition at line 82 of file colormanagement.c.
Referenced by colormanage_check_view_settings(), colormanage_free_config(), colormanage_look_add(), colormanage_look_get_indexed(), colormanage_look_get_named(), and IMB_colormanagement_look_items_add().
|
static |
Definition at line 73 of file colormanagement.c.
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 71 of file colormanagement.c.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 75 of file colormanagement.c.
Referenced by colormanage_imbuf_set_default_spaces(), colormanage_load_config(), display_buffer_apply_threaded(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 76 of file colormanagement.c.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 77 of file colormanagement.c.
Referenced by colormanage_load_config(), IMB_colormanagement_check_file_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 72 of file colormanagement.c.
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_role_colorspace_name_get(), IMB_colormanagement_scene_linear_to_color_picking_v3(), and IMB_colormanagement_setup_glsl_draw_from_space().
|
static |
Definition at line 74 of file colormanagement.c.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 84 of file colormanagement.c.
Referenced by colormanage_colorspace_add(), and colormanage_free_config().
|
static |
Definition at line 85 of file colormanagement.c.
Referenced by colormanage_free_config(), colormanage_load_config(), colormanagement_init(), IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 87 of file colormanagement.c.
Referenced by colormanage_free_config(), and colormanage_look_add().
|
static |
Definition at line 86 of file colormanagement.c.
Referenced by colormanage_free_config(), colormanage_view_add(), and colormanagement_init().
Definition at line 81 of file colormanagement.c.
Referenced by colormanage_free_config(), colormanage_view_add(), colormanage_view_get_indexed(), and colormanage_view_get_named().
|
static |
Definition at line 94 of file colormanagement.c.
Referenced by colormanage_load_config(), and IMB_colormanagement_srgb_to_scene_linear_v3().
| float imbuf_luma_coefficients[3] = {0.0f} |
Definition at line 90 of file colormanagement.c.
Referenced by colormanage_load_config(), IMB_colormanagement_get_luminance(), and IMB_colormanagement_get_luminance_byte().
| float imbuf_rgb_to_xyz[3][3] = {{0.0f}} |
Definition at line 92 of file colormanagement.c.
Referenced by colormanage_load_config(), IMB_colormanagement_scene_linear_to_srgb_v3(), and IMB_colormangement_rgb_to_xyz().
|
static |
Definition at line 93 of file colormanagement.c.
Referenced by colormanage_load_config(), and IMB_colormanagement_scene_linear_to_srgb_v3().
| float imbuf_xyz_to_rgb[3][3] = {{0.0f}} |
Definition at line 91 of file colormanagement.c.
Referenced by colormanage_load_config(), IMB_colormanagement_srgb_to_scene_linear_v3(), IMB_colormangement_get_xyz_to_rgb(), and IMB_colormangement_xyz_to_rgb().
|
static |
Definition at line 101 of file colormanagement.c.
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().