|
Blender V5.0
|
#include "IMB_colormanagement.hh"#include "IMB_colormanagement_intern.hh"#include <cmath>#include <cstring>#include "DNA_ID.h"#include "DNA_color_types.h"#include "DNA_image_types.h"#include "DNA_movieclip_types.h"#include "DNA_node_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_color.hh"#include "BLI_colorspace.hh"#include "BLI_fileops.hh"#include "BLI_listbase.h"#include "BLI_math_color.h"#include "BLI_math_color.hh"#include "BLI_math_matrix.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_vector_types.hh"#include "BLI_path_utils.hh"#include "BLI_rect.h"#include "BLI_string_ref.hh"#include "BLI_string_utf8.h"#include "BLI_task.hh"#include "BLI_threads.h"#include "BLI_vector_set.hh"#include "BKE_appdir.hh"#include "BKE_colortools.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_idtype.hh"#include "BKE_image_format.hh"#include "BKE_library.hh"#include "BKE_main.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "GPU_capabilities.hh"#include "RNA_define.hh"#include "SEQ_iterator.hh"#include "DEG_depsgraph.hh"#include "CLG_log.h"#include "OCIO_api.hh"Go to the source code of this file.
Classes | |
| struct | ColormanageProcessor |
| struct | GlobalGPUState |
| struct | GlobalColorPickingState |
| struct | ColormanageCacheViewSettings |
| struct | ColormanageCacheDisplaySettings |
| struct | ColormanageCacheKey |
| struct | ColormanageCacheData |
| struct | ColormanageCache |
| struct | DisplayBufferThread |
| struct | DisplayBufferInitData |
| struct | ProcessorTransformThread |
| struct | ProcessorTransformInitData |
Typedefs | |
| using | float3 |
| using | float3x3 |
Functions | |
Color Managed Cache | |
| static MovieCache * | colormanage_moviecache_get (const ImBuf *ibuf) |
| static ColormanageCacheData * | colormanage_cachedata_get (const ImBuf *ibuf) |
| static uint | colormanage_hashhash (const void *key_v) |
| static bool | colormanage_hashcmp (const void *av, const void *bv) |
| static MovieCache * | colormanage_moviecache_ensure (ImBuf *ibuf) |
| static void | colormanage_cachedata_set (ImBuf *ibuf, ColormanageCacheData *data) |
| static void | colormanage_view_settings_to_cache (ImBuf *ibuf, ColormanageCacheViewSettings *cache_view_settings, const ColorManagedViewSettings *view_settings) |
| static void | colormanage_display_settings_to_cache (ColormanageCacheDisplaySettings *cache_display_settings, const ColorManagedDisplaySettings *display_settings) |
| static void | colormanage_settings_to_key (ColormanageCacheKey *key, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings) |
| static ImBuf * | colormanage_cache_get_ibuf (ImBuf *ibuf, ColormanageCacheKey *key, void **cache_handle) |
| static uchar * | colormanage_cache_get (ImBuf *ibuf, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings, void **cache_handle) |
| static void | colormanage_cache_put (ImBuf *ibuf, const ColormanageCacheViewSettings *view_settings, const ColormanageCacheDisplaySettings *display_settings, uchar *display_buffer, void **cache_handle) |
| static void | colormanage_cache_handle_release (void *cache_handle) |
Initialization / De-initialization | |
| static bool | colormanage_role_color_space_name_get (ocio::Config &config, char *colorspace_name, const char *role, const char *backup_role, const bool optional=false) |
| static void | colormanage_update_matrices () |
| static bool | colormanage_load_config (ocio::Config &config) |
| static void | colormanage_free_config () |
| void | colormanagement_init () |
| void | colormanagement_exit () |
Internal functions | |
| static StringRef | view_filter_for_look (StringRefNull view_name) |
| static bool | colormanage_compatible_look (const ocio::Look *look, StringRef view_filter) |
| static bool | colormanage_compatible_look (const ocio::Look *look, const char *view_name) |
| static bool | colormanage_use_look (const char *look_name, const char *view_name) |
| void | colormanage_cache_free (ImBuf *ibuf) |
| void | IMB_colormanagement_display_settings_from_ctx (const bContext *C, ColorManagedViewSettings **r_view_settings, ColorManagedDisplaySettings **r_display_settings) |
| static bool | get_display_emulation (const ColorManagedDisplaySettings &display_settings) |
| static std::shared_ptr< const ocio::CPUProcessor > | get_display_buffer_processor (const ColorManagedDisplaySettings &display_settings, const char *look, const char *view_transform, const float exposure, const float gamma, const float temperature, const float tint, const bool use_white_balance, const char *from_colorspace, const ColorManagedDisplaySpace target, const bool inverse=false) |
| void | IMB_colormanagement_init_untonemapped_view_settings (ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *) |
| static void | curve_mapping_apply_pixel (const CurveMapping *curve_mapping, float *pixel, int channels) |
| void | colormanage_imbuf_set_default_spaces (ImBuf *ibuf) |
| void | colormanage_imbuf_make_linear (ImBuf *ibuf, const char *from_colorspace, const ColorManagedFileOutput output) |
Functions for converting between color temperature/tint and RGB white points | |
| void | IMB_colormanagement_get_whitepoint (const float temperature, const float tint, float whitepoint[3]) |
| bool | IMB_colormanagement_set_whitepoint (const float whitepoint[3], float &temperature, float &tint) |
Display Buffer Transform Routines | |
| static void | display_buffer_init_handle (DisplayBufferThread *handle, int start_line, int tot_line, DisplayBufferInitData *init_data) |
| 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_no_processor (DisplayBufferThread *handle) |
| static void | do_display_buffer_apply_thread (DisplayBufferThread *handle) |
| static void | display_buffer_apply_threaded (ImBuf *ibuf, const float *buffer, uchar *byte_buffer, float *display_buffer, uchar *display_buffer_byte, ColormanageProcessor *cm_processor) |
| static bool | is_colorspace_same_as_display (const ColorSpace *colorspace, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
| bool | IMB_colormanagement_display_processor_needed (const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
| ColormanageProcessor * | IMB_colormanagement_display_processor_for_imbuf (const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space) |
| static void | colormanage_display_buffer_process_ex (ImBuf *ibuf, float *display_buffer, uchar *display_buffer_byte, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space) |
| static void | colormanage_display_buffer_process (ImBuf *ibuf, uchar *display_buffer, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space) |
Threaded Processor Transform Routines | |
| static void | processor_transform_init_handle (ProcessorTransformThread *handle, int start_line, int tot_line, ProcessorTransformInitData *init_data) |
| static void | do_processor_transform_thread (ProcessorTransformThread *handle) |
| static void | processor_transform_apply_threaded (uchar *byte_buffer, float *float_buffer, const int width, const int height, const int channels, ColormanageProcessor *cm_processor, const bool predivide, const bool float_from_byte) |
Color Space Transformation Functions | |
| static void | colormanagement_transform_ex (uchar *byte_buffer, float *float_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide) |
| void | IMB_colormanagement_transform_float (float *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace, bool predivide) |
| void | IMB_colormanagement_transform_byte (uchar *buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace) |
| void | IMB_colormanagement_transform_byte_to_float (float *float_buffer, uchar *byte_buffer, int width, int height, int channels, const char *from_colorspace, const char *to_colorspace) |
| void | IMB_colormanagement_transform_v4 (float pixel[4], const char *from_colorspace, const char *to_colorspace) |
| void | IMB_colormanagement_colorspace_to_scene_linear_v3 (float pixel[3], const ColorSpace *colorspace) |
| void | IMB_colormanagement_scene_linear_to_colorspace_v3 (float pixel[3], const ColorSpace *colorspace) |
| void | IMB_colormanagement_colorspace_to_scene_linear_v4 (float pixel[4], const bool predivide, const ColorSpace *colorspace) |
| void | IMB_colormanagement_colorspace_to_scene_linear (float *buffer, const int width, const int height, const int channels, const ColorSpace *colorspace, const bool predivide) |
| void | IMB_colormanagement_scene_linear_to_colorspace (float *buffer, const int width, const int height, const int channels, const ColorSpace *colorspace) |
| void | IMB_colormanagement_imbuf_to_byte_texture (uchar *out_buffer, const int offset_x, const int offset_y, const int width, const int height, const ImBuf *ibuf, const bool store_premultiplied) |
| void | 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) |
| void | IMB_colormanagement_scene_linear_to_color_picking_v3 (float color_picking[3], const float scene_linear[3]) |
| void | IMB_colormanagement_color_picking_to_scene_linear_v3 (float scene_linear[3], const float color_picking[3]) |
| void | IMB_colormanagement_scene_linear_to_display_v3 (float pixel[3], const ColorManagedDisplay *display, const ColorManagedDisplaySpace display_space) |
| void | IMB_colormanagement_display_to_scene_linear_v3 (float pixel[3], const ColorManagedDisplay *display, const ColorManagedDisplaySpace display_space) |
| void | IMB_colormanagement_pixel_to_display_space_v4 (float result[4], const float pixel[4], const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space) |
| static void | colormanagement_imbuf_make_display_space (ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space, bool make_byte) |
| void | IMB_colormanagement_imbuf_make_display_space (ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space) |
| static ImBuf * | imbuf_ensure_editable (ImBuf *ibuf, ImBuf *colormanaged_ibuf, bool allocate_result) |
| ImBuf * | IMB_colormanagement_imbuf_for_write (ImBuf *ibuf, bool save_as_render, bool allocate_result, const ImageFormatData *image_format) |
Public Display Buffers Interfaces | |
| uchar * | IMB_display_buffer_acquire (ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, void **cache_handle) |
| uchar * | IMB_display_buffer_acquire_ctx (const bContext *C, ImBuf *ibuf, void **cache_handle) |
| 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) |
| void | IMB_display_buffer_release (void *cache_handle) |
Display Functions | |
| int | IMB_colormanagement_display_get_named_index (const char *name) |
| const char * | IMB_colormanagement_display_get_indexed_name (const int index) |
| const char * | IMB_colormanagement_display_get_default_name () |
| const ColorManagedDisplay * | IMB_colormanagement_display_get_named (const char *name) |
| const char * | IMB_colormanagement_display_get_none_name () |
| const char * | IMB_colormanagement_display_get_default_view_transform_name (const ColorManagedDisplay *display) |
| const ColorSpace * | IMB_colormangement_display_get_color_space (const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) |
| bool | IMB_colormanagement_display_is_hdr (const ColorManagedDisplaySettings *display_settings, const char *view_name) |
| bool | IMB_colormanagement_display_is_wide_gamut (const ColorManagedDisplaySettings *display_settings, const char *view_name) |
| bool | IMB_colormanagement_display_support_emulation (const ColorManagedDisplaySettings *display_settings, const char *view_name) |
View Functions | |
| int | IMB_colormanagement_view_get_id_by_name (const char *name) |
| const char * | IMB_colormanagement_view_get_name_by_id (const int index) |
| const char * | IMB_colormanagement_view_get_default_name (const char *display_name) |
| const char * | IMB_colormanagement_view_get_raw_or_default_name (const char *display_name) |
Color Space Functions | |
| const ColorSpace * | colormanage_colorspace_get_named (const char *name) |
| const ColorSpace * | colormanage_colorspace_get_roled (const int role) |
| int | IMB_colormanagement_colorspace_get_named_index (const char *name) |
| const char * | IMB_colormanagement_colorspace_get_indexed_name (const int index) |
| const char * | IMB_colormanagement_colorspace_get_name (const ColorSpace *colorspace) |
| void | IMB_colormanagement_colorspace_from_ibuf_ftype (ColorManagedColorspaceSettings *colorspace_settings, ImBuf *ibuf) |
Looks Functions | |
| int | IMB_colormanagement_look_get_named_index (const char *name) |
| const char * | IMB_colormanagement_look_get_indexed_name (const int index) |
| const char * | IMB_colormanagement_look_get_default_name () |
| const char * | IMB_colormanagement_look_validate_for_view (const char *view_name, const char *look_name) |
RNA Helper Functions | |
| void | IMB_colormanagement_display_items_add (EnumPropertyItem **items, int *totitem) |
| void | IMB_colormanagement_view_items_add (EnumPropertyItem **items, int *totitem, const char *display_name) |
| void | IMB_colormanagement_look_items_add (EnumPropertyItem **items, int *totitem, const char *view_name) |
| void | IMB_colormanagement_colorspace_items_add (EnumPropertyItem **items, int *totitem) |
Partial Display Buffer Update | |
| static void | partial_buffer_update_rect (ImBuf *ibuf, uchar *display_buffer, const float *linear_buffer, const uchar *byte_buffer, int display_stride, int linear_stride, int linear_offset_x, int linear_offset_y, ColormanageProcessor *cm_processor, const int xmin, const int ymin, const int xmax, const int ymax) |
| static void | imb_partial_display_buffer_update_ex (ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax, bool do_threads) |
| 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) |
| void | IMB_partial_display_buffer_update_threaded (ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, int ymax) |
| void | IMB_partial_display_buffer_update_delayed (ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax) |
Pixel Processor Functions | |
| ColormanageProcessor * | IMB_colormanagement_display_processor_new (const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorManagedDisplaySpace display_space, const bool inverse) |
| ColormanageProcessor * | IMB_colormanagement_colorspace_processor_new (const char *from_colorspace, const char *to_colorspace) |
| bool | IMB_colormanagement_processor_is_noop (ColormanageProcessor *cm_processor) |
| void | IMB_colormanagement_processor_apply_v4 (ColormanageProcessor *cm_processor, float pixel[4]) |
| void | IMB_colormanagement_processor_apply_v4_predivide (ColormanageProcessor *cm_processor, float pixel[4]) |
| void | IMB_colormanagement_processor_apply_v3 (ColormanageProcessor *cm_processor, float pixel[3]) |
| void | IMB_colormanagement_processor_apply_pixel (ColormanageProcessor *cm_processor, float *pixel, int channels) |
| void | IMB_colormanagement_processor_apply (ColormanageProcessor *cm_processor, float *buffer, int width, int height, int channels, bool predivide) |
| void | IMB_colormanagement_processor_apply_byte (ColormanageProcessor *cm_processor, uchar *buffer, int width, int height, int channels) |
| void | IMB_colormanagement_processor_free (ColormanageProcessor *cm_processor) |
| static CurveMapping * | update_glsl_curve_mapping (const ColorManagedViewSettings *view_settings) |
| bool | IMB_colormanagement_setup_glsl_draw_from_space (const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge) |
| bool | IMB_colormanagement_setup_glsl_draw (const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float dither, bool predivide) |
| bool | IMB_colormanagement_setup_glsl_draw_from_space_ctx (const bContext *C, const ColorSpace *from_colorspace, float dither, bool predivide) |
| bool | IMB_colormanagement_setup_glsl_draw_ctx (const bContext *C, float dither, bool predivide) |
| bool | IMB_colormanagement_setup_glsl_draw_to_scene_linear (const char *from_colorspace_name, const bool predivide) |
| void | IMB_colormanagement_finish_glsl_draw () |
Variables | |
| static CLG_LogRef | LOG = {"color_management"} |
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 91 of file colormanagement.cc.
Referenced by display_buffer_init_handle(), and IMB_display_buffer_acquire().
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float3x3 |
Definition at line 1008 of file BLI_math_matrix_types.hh.
Definition at line 4579 of file colormanagement.cc.
References b, blackbody_table_b, blackbody_table_g, blackbody_table_r, and i.
Referenced by IMB_colormanagement_blackbody_temperature_to_rgb().
| void colormanage_cache_free | ( | ImBuf * | ibuf | ) |
Definition at line 744 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 381 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 359 of file colormanagement.cc.
References colormanage_moviecache_get(), and IMB_moviecache_get().
Referenced by colormanage_cache_get().
|
static |
Definition at line 478 of file colormanagement.cc.
References IMB_freeImBuf().
Referenced by IMB_display_buffer_release().
|
static |
Definition at line 435 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, MEM_callocN(), 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 269 of file colormanagement.cc.
References ImBuf::colormanage_cache, and ColormanageCache::data.
Referenced by colormanage_cache_free(), and colormanage_cache_get().
|
static |
Definition at line 315 of file colormanagement.cc.
References ImBuf::colormanage_cache, ColormanageCache::data, data, and MEM_callocN().
Referenced by colormanage_cache_put().
|
static |
Definition at line 1070 of file colormanagement.cc.
References CLOG_WARN, g_config, LOG, and name.
Referenced by colormanage_check_colorspace_settings().
|
static |
Definition at line 1090 of file colormanagement.cc.
References colormanage_check_colorspace_name(), and ColorManagedColorspaceSettings::name.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 919 of file colormanagement.cc.
References blender::StringRefNull::c_str(), CLOG_WARN, ColorManagedDisplaySettings::display_device, g_config, blender::StringRefBase::is_empty(), LOG, blender::ocio::Display::name(), blender::StringRefBase::startswith(), and STRNCPY_UTF8.
Referenced by IMB_colormanagement_check_file_config().
|
static |
Definition at line 995 of file colormanagement.cc.
References blender::StringRefNull::c_str(), CLOG_INFO, CLOG_WARN, colormanage_compatible_look(), colormanage_find_matching_view_name(), ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, g_config, ColorManagedViewSettings::gamma, blender::ocio::Display::get_default_view(), blender::ocio::Display::get_view_by_name(), IMB_colormanagement_look_get_default_name(), blender::StringRefBase::is_empty(), LOG, ColorManagedViewSettings::look, blender::ocio::View::name(), STRNCPY_UTF8, view, and ColorManagedViewSettings::view_transform.
Referenced by IMB_colormanagement_check_file_config().
| const ColorSpace * colormanage_colorspace_get_named | ( | const char * | name | ) |
Definition at line 3181 of file colormanagement.cc.
References g_config, and name.
Referenced by colormanage_colorspace_get_roled(), IMB_colormanagement_colorspace_get_named_index(), IMB_colormanagement_imbuf_for_write(), and imb_handle_colorspace_and_alpha().
| const ColorSpace * colormanage_colorspace_get_roled | ( | const int | role | ) |
Definition at line 3186 of file colormanagement.cc.
References colormanage_colorspace_get_named(), and IMB_colormanagement_role_colorspace_name_get().
Referenced by IMB_save_image().
|
static |
Definition at line 732 of file colormanagement.cc.
References colormanage_compatible_look(), and view_filter_for_look().
|
static |
Definition at line 721 of file colormanagement.cc.
References blender::StringRefBase::is_empty(), blender::ocio::Look::is_noop, and blender::ocio::Look::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 2030 of file colormanagement.cc.
References colormanage_display_buffer_process_ex().
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 2008 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, display_buffer_apply_threaded(), ImBuf::float_buffer, IMB_colormanagement_display_processor_for_imbuf(), and IMB_colormanagement_processor_free().
Referenced by colormanage_display_buffer_process(), and colormanagement_imbuf_make_display_space().
|
static |
Definition at line 342 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 957 of file colormanagement.cc.
References blender::StringRefBase::find(), blender::ocio::Display::get_default_view(), blender::ocio::Display::get_num_views(), blender::ocio::Display::get_view_by_index(), blender::ocio::Display::get_view_by_name(), blender::StringRefBase::startswith(), blender::StringRefBase::substr(), and view.
Referenced by colormanage_check_view_settings(), and IMB_colormanagement_validate_settings().
|
static |
Definition at line 612 of file colormanagement.cc.
References g_all_view_names, and g_config.
Referenced by colormanagement_exit(), and colormanagement_init().
|
static |
Definition at line 287 of file colormanagement.cc.
References b, ColormanageCacheKey::display, and ColormanageCacheKey::view.
Referenced by colormanage_moviecache_ensure().
|
static |
Definition at line 278 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, | ||
| const ColorManagedFileOutput | output ) |
Definition at line 875 of file colormanagement.cc.
References ImBuf::byte_buffer, blender::StringRefNull::c_str(), ImBuf::channels, ImBuf::colormanage_flag, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, g_config, global_role_scene_linear, IMB_alpha_affects_rgb(), IMB_COLORMANAGE_IS_DATA, IMB_colormanagement_transform_float(), IMB_free_byte_pixels(), blender::ocio::ColorSpace::is_data(), blender::ocio::ColorSpace::name(), output, Video, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_colorspace_and_alpha().
| void colormanage_imbuf_set_default_spaces | ( | ImBuf * | ibuf | ) |
Definition at line 864 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::colorspace, g_config, and global_role_default_byte.
Referenced by IMB_initImBuf().
|
static |
Definition at line 555 of file colormanagement.cc.
References blender::StringRefNull::c_str(), CLOG_ERROR, colormanage_role_color_space_name_get(), colormanage_update_matrices(), g_all_view_names, g_config, blender::ocio::Display::get_num_views(), blender::ocio::Display::get_view_by_index(), global_role_aces_interchange, global_role_color_picking, global_role_data, global_role_default_byte, global_role_default_float, global_role_default_float_default, global_role_default_sequencer, global_role_scene_linear, global_role_scene_linear_default, global_role_texture_painting, global_scene_linear_to_xyz_default, LOG, blender::ocio::Display::name(), OCIO_ROLE_ACES_INTERCHANGE, 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, blender::colorspace::scene_linear_to_xyz, STRNCPY(), and view.
Referenced by colormanagement_init().
|
static |
Definition at line 295 of file colormanagement.cc.
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 260 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 491 of file colormanagement.cc.
References BLI_strncpy_utf8(), blender::StringRefNull::c_str(), CLOG_ERROR, blender::ocio::Config::get_color_space(), LOG, MAX_COLORSPACE_NAME, and blender::ocio::ColorSpace::name().
Referenced by colormanage_load_config().
|
static |
Definition at line 351 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 521 of file colormanagement.cc.
References blender::colorspace::aces_to_scene_linear, blender::ocio::ACES_TO_XYZ, blender::colorspace::acescg_to_scene_linear, blender::ocio::ACESCG_TO_XYZ, g_config, blender::MatBase< float, 3, 3 >::identity(), blender::math::invert(), blender::math::is_equal(), blender::colorspace::luma_coefficients, blender::colorspace::rec2020_to_scene_linear, blender::colorspace::rec709_to_scene_linear, blender::colorspace::scene_linear_is_rec709, blender::colorspace::scene_linear_to_aces, blender::colorspace::scene_linear_to_acescg, blender::colorspace::scene_linear_to_rec2020, blender::colorspace::scene_linear_to_rec709, blender::colorspace::scene_linear_to_xyz, blender::ocio::XYZ_TO_REC2020, blender::ocio::XYZ_TO_REC709, and blender::colorspace::xyz_to_scene_linear.
Referenced by colormanage_load_config(), and IMB_colormanagement_working_space_set_from_name().
|
static |
Definition at line 738 of file colormanagement.cc.
References colormanage_compatible_look(), g_config, and blender::ocio::Look::is_noop.
Referenced by get_display_buffer_processor(), and IMB_colormanagement_setup_glsl_draw_from_space().
|
static |
Definition at line 324 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_id_by_name(), 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 676 of file colormanagement.cc.
References colormanage_free_config(), global_color_picking_state, and global_gpu_state.
Referenced by IMB_exit().
|
static |
Definition at line 2632 of file colormanagement.cc.
References ImBuf::byte_buffer, colormanage_display_buffer_process_ex(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, and IMB_alloc_byte_pixels().
Referenced by IMB_colormanagement_imbuf_for_write(), and IMB_colormanagement_imbuf_make_display_space().
| void colormanagement_init | ( | ) |
Definition at line 618 of file colormanagement.cc.
References BCM_CONFIG_FILE, BKE_appdir_folder_id(), BLENDER_DATAFILES, BLI_getenv(), BLI_init_srgb_conversion(), BLI_path_join, BLI_setenv(), CLOG_ERROR, CLOG_INFO_NOCHECK, CLOG_STR_INFO_NOCHECK, colormanage_free_config(), colormanage_load_config(), blender::ocio::Config::create_fallback(), blender::ocio::Config::create_from_environment(), blender::ocio::Config::create_from_file(), FILE_MAX, g_config, g_config_is_custom, and LOG.
Referenced by IMB_init().
|
static |
Definition at line 2175 of file colormanagement.cc.
References IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_free(), IMB_colormanagement_processor_is_noop(), processor_transform_apply_threaded(), and STREQ.
Referenced by IMB_colormanagement_transform_byte(), and IMB_colormanagement_transform_float().
|
static |
Definition at line 848 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 1708 of file colormanagement.cc.
References BLI_assert_msg, DisplayBufferThread::buffer, DisplayBufferThread::byte_buffer, DisplayBufferThread::byte_colorspace, DisplayBufferThread::channels, DisplayBufferThread::cm_processor, DisplayBufferThread::float_colorspace, global_role_scene_linear, i, IMB_colormanagement_transform_float(), DisplayBufferThread::is_data, ColormanageProcessor::is_data_result, DisplayBufferThread::predivide, rgb_uchar_to_float(), rgba_uchar_to_float(), and DisplayBufferThread::width.
Referenced by do_display_buffer_apply_thread().
|
static |
Definition at line 1908 of file colormanagement.cc.
References ImBuf::byte_buffer, blender::StringRefNull::c_str(), ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBuf::float_buffer, global_role_default_byte, init_data(), blender::ocio::ColorSpace::name(), blender::threading::parallel_for(), and ImBuf::y.
Referenced by colormanage_display_buffer_process_ex().
|
static |
Definition at line 1660 of file colormanagement.cc.
References DisplayBufferThread::buffer, DisplayBufferThread::byte_buffer, DisplayBufferThread::byte_colorspace, DisplayBufferThread::channels, ImBuf::channels, DisplayBufferThread::cm_processor, ImBuf::colormanage_flag, DisplayBufferThread::display_buffer, DisplayBufferThread::display_buffer_byte, DISPLAY_BUFFER_CHANNELS, DisplayBufferThread::dither, ImBuf::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.
|
static |
Definition at line 1788 of file colormanagement.cc.
References DisplayBufferThread::buffer, DisplayBufferThread::byte_buffer, DisplayBufferThread::channels, DisplayBufferThread::display_buffer, DisplayBufferThread::display_buffer_byte, DisplayBufferThread::dither, IB_PROFILE_SRGB, IMB_buffer_byte_from_byte(), IMB_buffer_byte_from_float(), IMB_buffer_float_from_byte(), IMB_buffer_float_from_float(), DisplayBufferThread::predivide, DisplayBufferThread::start_line, DisplayBufferThread::tot_line, and DisplayBufferThread::width.
Referenced by do_display_buffer_apply_thread().
|
static |
Definition at line 1847 of file colormanagement.cc.
References DisplayBufferThread::channels, DisplayBufferThread::cm_processor, DisplayBufferThread::display_buffer, display_buffer_apply_get_linear_buffer(), DisplayBufferThread::display_buffer_byte, DisplayBufferThread::dither, do_display_buffer_apply_no_processor(), i, IB_PROFILE_SRGB, IMB_buffer_byte_from_float(), IMB_colormanagement_processor_apply(), DisplayBufferThread::is_data, MEM_freeN(), MEM_malloc_arrayN(), DisplayBufferThread::predivide, DisplayBufferThread::start_line, straight_to_premul_v4(), DisplayBufferThread::tot_line, and DisplayBufferThread::width.
|
static |
Definition at line 2103 of file colormanagement.cc.
References ProcessorTransformThread::byte_buffer, ProcessorTransformThread::channels, ProcessorTransformThread::cm_processor, ProcessorTransformThread::float_buffer, ProcessorTransformThread::float_from_byte, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_processor_apply(), IMB_colormanagement_processor_apply_byte(), IMB_premultiply_rect_float(), ProcessorTransformThread::predivide, ProcessorTransformThread::tot_line, and ProcessorTransformThread::width.
Referenced by processor_transform_apply_threaded().
|
static |
Definition at line 796 of file colormanagement.cc.
References colormanage_use_look(), blender::ocio::DisplayParameters::display, ColorManagedDisplaySettings::display_device, DISPLAY_SPACE_DRAW, DISPLAY_SPACE_IMAGE_OUTPUT, blender::ocio::DisplayParameters::exponent, blender::ocio::DisplayParameters::from_colorspace, g_config, get_display_emulation(), GPU_hdr_support(), IMB_colormanagement_display_is_hdr(), blender::ocio::DisplayParameters::inverse, inverse, blender::ocio::DisplayParameters::is_image_output, blender::ocio::DisplayParameters::look, max_ff(), powf, blender::ocio::DisplayParameters::scale, blender::ocio::DisplayParameters::temperature, blender::ocio::DisplayParameters::tint, blender::ocio::DisplayParameters::use_display_emulation, blender::ocio::DisplayParameters::use_hdr_buffer, blender::ocio::DisplayParameters::use_hdr_display, blender::ocio::DisplayParameters::use_white_balance, and blender::ocio::DisplayParameters::view.
Referenced by IMB_colormanagement_display_processor_new().
|
static |
Definition at line 784 of file colormanagement.cc.
References COLORMANAGE_DISPLAY_EMULATION_AUTO, COLORMANAGE_DISPLAY_EMULATION_OFF, and ColorManagedDisplaySettings::emulation.
Referenced by get_display_buffer_processor(), and IMB_colormanagement_setup_glsl_draw_from_space().
Definition at line 1248 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 1279 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, g_config, IMB_COLORMANAGE_IS_DATA, blender::ocio::ColorSpace::is_data(), and name.
Referenced by add_ibuf_for_tile(), IMB_colormanagegent_copy_settings(), and blender::seq::seq_imbuf_assign_spaces().
| void IMB_colormanagement_assign_float_colorspace | ( | ImBuf * | ibuf, |
| const char * | name ) |
Definition at line 1265 of file colormanagement.cc.
References ImBuf::colormanage_flag, ImBufFloatBuffer::colorspace, ImBuf::float_buffer, g_config, IMB_COLORMANAGE_IS_DATA, blender::ocio::ColorSpace::is_data(), and name.
Referenced by assign_render_pass_ibuf_colorspace(), blender::seq::ensure_linear_float_buffer(), IMB_colormanagegent_copy_settings(), blender::seq::prepare_effect_imbufs(), RE_render_result_rect_to_ibuf(), blender::seq::render_imbuf_from_sequencer_space(), render_result_new_from_exr(), and blender::seq::seq_imbuf_assign_spaces().
Definition at line 4611 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 BKE_light_color(), 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 4624 of file colormanagement.cc.
References float, i, IMB_colormanagement_blackbody_temperature_to_rgb(), max, 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 1096 of file colormanagement.cc.
References colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), blender::seq::foreach_strip(), g_config, global_role_default_sequencer, ID_IS_LINKED, LISTBASE_FOREACH, ColorManagedColorspaceSettings::name, Main::scenes, and STRNCPY_UTF8.
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 1236 of file colormanagement.cc.
References ImBuf::colormanage_flag, g_config, IMB_COLORMANAGE_IS_DATA, blender::ocio::ColorSpace::is_data(), and name.
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 2564 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), copy_v3_v3(), g_config, global_color_picking_state, global_role_color_picking, global_role_scene_linear, and processor_lock.
Referenced by ui_draw_gradient_hsv_to_rgb(), and ui_perceptual_to_scene_linear_space().
| void IMB_colormanagement_colorspace_from_ibuf_ftype | ( | ColorManagedColorspaceSettings * | colorspace_settings, |
| ImBuf * | ibuf ) |
Definition at line 3228 of file colormanagement.cc.
References ImFileType::default_save_role, g_config, IMB_colormanagement_role_colorspace_name_get(), IMB_file_type_from_ibuf(), ColorManagedColorspaceSettings::name, ImFileType::save, and STRNCPY_UTF8.
| const char * IMB_colormanagement_colorspace_get_indexed_name | ( | const int | index | ) |
Definition at line 3208 of file colormanagement.cc.
References g_config, and OCIO_ROLE_SCENE_LINEAR.
Referenced by IMB_colormanagement_working_space_get_indexed_name().
| const char * IMB_colormanagement_colorspace_get_name | ( | const ColorSpace * | colorspace | ) |
Definition at line 3223 of file colormanagement.cc.
Referenced by blender::ed::vse::get_texture_colorspace_name(), image_colorspace_from_imbuf(), image_save_post(), imb_exr_set_known_colorspace(), openexr_header_metadata_colorspace(), probe_video_colorspace(), and blender::imbuf::set_file_colorspace().
| int IMB_colormanagement_colorspace_get_named_index | ( | const char * | name | ) |
Definition at line 3193 of file colormanagement.cc.
References colormanage_colorspace_get_named(), g_config, name, OCIO_ROLE_SCENE_LINEAR, and STREQ.
Referenced by IMB_colormanagement_working_space_get_named_index().
| void IMB_colormanagement_colorspace_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem ) |
Definition at line 3812 of file colormanagement.cc.
References EnumPropertyItem::description, g_config, EnumPropertyItem::icon, EnumPropertyItem::identifier, EnumPropertyItem::name, OCIO_ROLE_SCENE_LINEAR, RNA_enum_item_add(), and EnumPropertyItem::value.
| ColormanageProcessor * IMB_colormanagement_colorspace_processor_new | ( | const char * | from_colorspace, |
| const char * | to_colorspace ) |
Definition at line 4239 of file colormanagement.cc.
References ColormanageProcessor::cpu_processor, g_config, IMB_colormanagement_space_name_is_data(), and ColormanageProcessor::is_data_result.
Referenced by colormanagement_transform_ex(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_cpu(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_single(), IMB_byte_from_float(), IMB_colormanagement_transform_byte_to_float(), IMB_colormanagement_transform_v4(), and blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color().
| void IMB_colormanagement_colorspace_to_scene_linear | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const 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 2341 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply(), blender::ocio::CPUProcessor::apply_predivide(), blender::ocio::BIT_DEPTH_F32, and printf.
Referenced by blender::seq::pixels_to_scene_linear_byte(), blender::seq::pixels_to_scene_linear_float(), and blender::ed::vse::rgba_float_to_display_space().
| void IMB_colormanagement_colorspace_to_scene_linear_v3 | ( | float | pixel[3], |
| const 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 2293 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgb(), and printf.
Referenced by BKE_brush_sample_tex_3d(), ED_space_clip_color_sample(), ED_space_image_color_sample(), ED_space_node_color_sample(), IMB_sampleImageAtLocation(), blender::ed::sculpt_paint::load_tex_task_cb_ex(), multitex_nodes_intern(), paint_sample_color(), partial_buffer_update_rect(), and project_paint_uvpixel_init().
| void IMB_colormanagement_colorspace_to_scene_linear_v4 | ( | float | pixel[4], |
| const bool | predivide, | ||
| const ColorSpace * | colorspace ) |
Definition at line 2321 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgba(), blender::ocio::CPUProcessor::apply_rgba_predivide(), and printf.
Referenced by image_sample_pixel_color_ubyte(), blender::ed::space_node::sample_apply(), and sequencer_sample_apply().
| const char * IMB_colormanagement_display_get_default_name | ( | ) |
Definition at line 3026 of file colormanagement.cc.
References blender::StringRefNull::c_str(), g_config, and blender::ocio::Display::name().
Referenced by BKE_color_managed_display_settings_init(), IMB_colormanagement_display_get_none_name(), and UI_block_begin().
| const char * IMB_colormanagement_display_get_default_view_transform_name | ( | const ColorManagedDisplay * | display | ) |
Definition at line 3045 of file colormanagement.cc.
References blender::StringRefNull::c_str(), blender::ocio::Display::get_default_view(), and blender::ocio::View::name().
Referenced by BKE_color_managed_view_settings_init(), and blender::seq::strip_add_set_view_transform().
| const char * IMB_colormanagement_display_get_indexed_name | ( | const int | index | ) |
Definition at line 3017 of file colormanagement.cc.
References blender::StringRefNull::c_str(), g_config, and blender::ocio::Display::name().
| const ColorManagedDisplay * IMB_colormanagement_display_get_named | ( | const char * | name | ) |
Used by performance-critical pixel processing areas, such as color widgets.
Definition at line 3032 of file colormanagement.cc.
References g_config, and name.
Referenced by BKE_color_managed_view_settings_init(), eyedropper_color_sample_fl(), blender::ui::greasepencil::eyedropper_grease_pencil_init(), eyedropper_init(), paint_sample_color(), blender::seq::strip_add_set_view_transform(), and ui_block_cm_display_get().
| int IMB_colormanagement_display_get_named_index | ( | const char * | name | ) |
Definition at line 3008 of file colormanagement.cc.
References g_config, blender::ocio::Display::index, and name.
Referenced by colormanage_display_settings_to_cache().
| const char * IMB_colormanagement_display_get_none_name | ( | ) |
Definition at line 3037 of file colormanagement.cc.
References g_config, and IMB_colormanagement_display_get_default_name().
Referenced by BKE_scene_disable_color_management().
| bool IMB_colormanagement_display_is_hdr | ( | const ColorManagedDisplaySettings * | display_settings, |
| const char * | view_name ) |
Definition at line 3079 of file colormanagement.cc.
References ColorManagedDisplaySettings::display_device, g_config, blender::ocio::Display::get_view_by_name(), and view.
Referenced by get_display_buffer_processor(), get_hdr_framebuffer_format(), GPU_viewport_colorspace_set(), and IMB_colormanagement_setup_glsl_draw_from_space().
| bool IMB_colormanagement_display_is_wide_gamut | ( | const ColorManagedDisplaySettings * | display_settings, |
| const char * | view_name ) |
Definition at line 3090 of file colormanagement.cc.
References ColorManagedDisplaySettings::display_device, g_config, blender::ocio::Display::get_view_by_name(), blender::ocio::Rec709, and view.
Referenced by get_hdr_framebuffer_format().
| void IMB_colormanagement_display_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem ) |
Definition at line 3726 of file colormanagement.cc.
References blender::StringRefNull::c_str(), blender::ocio::Display::description(), EnumPropertyItem::description, g_config, EnumPropertyItem::icon, EnumPropertyItem::identifier, blender::ocio::Display::index, blender::ocio::Display::is_hdr(), blender::ocio::Display::name(), EnumPropertyItem::name, RNA_enum_item_add(), blender::ocio::Display::ui_name(), and EnumPropertyItem::value.
| ColormanageProcessor * IMB_colormanagement_display_processor_for_imbuf | ( | const ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| const ColorManagedDisplaySpace | display_space ) |
Definition at line 1996 of file colormanagement.cc.
References IMB_colormanagement_display_processor_needed(), and IMB_colormanagement_display_processor_new().
Referenced by blender::ed::vse::ScopeHistogram::calc_from_ibuf(), and colormanage_display_buffer_process_ex().
| bool IMB_colormanagement_display_processor_needed | ( | const ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 1980 of file colormanagement.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, and is_colorspace_same_as_display().
Referenced by IMB_colormanagement_display_processor_for_imbuf(), and blender::ed::vse::update_gpu_scopes().
| ColormanageProcessor * IMB_colormanagement_display_processor_new | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings, | ||
| const ColorManagedDisplaySpace | display_space, | ||
| const bool | inverse ) |
Definition at line 4190 of file colormanagement.cc.
References BKE_curvemapping_copy(), BKE_curvemapping_premultiply(), COLORMANAGE_VIEW_USE_CURVES, COLORMANAGE_VIEW_USE_WHITE_BALANCE, ColormanageProcessor::cpu_processor, ColorManagedViewSettings::curve_mapping, ColormanageProcessor::curve_mapping, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, get_display_buffer_processor(), global_role_scene_linear, IMB_colormanagement_init_untonemapped_view_settings(), IMB_colormangement_display_get_color_space(), inverse, blender::ocio::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(), blender::compositor::compute_preview_cpu(), blender::compositor::compute_preview_gpu(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_cpu(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_single(), IMB_colormanagement_display_processor_for_imbuf(), 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 766 of file colormanagement.cc.
References C, CTX_data_scene(), CTX_wm_space_image(), Scene::display_settings, Image::flag, IMA_VIEW_AS_RENDER, SpaceImage::image, and Scene::view_settings.
Referenced by blender::ed::vse::draw_strip_thumbnails(), ED_draw_imbuf_ctx_clipping(), IMB_colormanagement_setup_glsl_draw_from_space_ctx(), and IMB_display_buffer_acquire_ctx().
| bool IMB_colormanagement_display_support_emulation | ( | const ColorManagedDisplaySettings * | display_settings, |
| const char * | view_name ) |
Definition at line 3101 of file colormanagement.cc.
References ColorManagedDisplaySettings::display_device, g_config, blender::ocio::Display::get_view_by_name(), and view.
| void IMB_colormanagement_display_to_scene_linear_v3 | ( | float | pixel[3], |
| const ColorManagedDisplay * | display, | ||
| const ColorManagedDisplaySpace | display_space = DISPLAY_SPACE_DRAW ) |
Same as IMB_colormanagement_scene_linear_to_display_v3, but converts color in opposite direction.
Definition at line 2604 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgb(), DISPLAY_SPACE_DRAW, and blender::ocio::Display::get_to_scene_linear_cpu_processor().
Referenced by eyedropper_color_sample_fl(), eyedropper_init(), and paint_sample_color().
| void IMB_colormanagement_finish_glsl_draw | ( | ) |
Finish GLSL-based display space conversion.
Definition at line 4533 of file colormanagement.cc.
References g_config, and global_gpu_state.
Referenced by draw_display_buffer(), ED_draw_imbuf_clipping(), gpu_viewport_draw_colormanaged(), blender::ed::vse::preview_draw_texture_to_linear(), and blender::ed::vse::update_gpu_scopes().
| const char * IMB_colormanagement_get_float_colorspace | ( | const ImBuf * | ibuf | ) |
Definition at line 1293 of file colormanagement.cc.
References blender::StringRefNull::c_str(), COLOR_ROLE_SCENE_LINEAR, ImBufFloatBuffer::colorspace, ImBuf::float_buffer, IMB_colormanagement_role_colorspace_name_get(), and blender::ocio::ColorSpace::name().
Referenced by blender::image_engine::FloatBufferCache::cached_float_buffer(), blender::seq::ensure_linear_float_buffer(), blender::ed::sculpt_paint::paint::image::ImageBufferFloat4::get_colorspace_name(), IMB_colormanagegent_copy_settings(), blender::seq::seq_imbuf_to_sequencer_space(), and blender::ed::object::write_internal_bake_pixels().
| const char * IMB_colormanagement_get_rect_colorspace | ( | const ImBuf * | ibuf | ) |
Definition at line 1302 of file colormanagement.cc.
References ImBuf::byte_buffer, blender::StringRefNull::c_str(), COLOR_ROLE_DEFAULT_BYTE, ImBufByteBuffer::colorspace, IMB_colormanagement_role_colorspace_name_get(), and blender::ocio::ColorSpace::name().
Referenced by blender::ed::sculpt_paint::paint::image::ImageBufferByte4::get_colorspace_name(), IMB_colormanagegent_copy_settings(), blender::seq::seq_imbuf_to_sequencer_space(), seq_process_render_image(), 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 1591 of file colormanagement.cc.
References blender::colorspace::scene_linear_to_xyz.
Referenced by blender::nodes::node_composite_colorbalance_cc::ColorBalanceFunction::call(), blender::nodes::node_composite_colorbalance_cc::get_white_point_matrix(), and blender::nodes::node_composite_colorbalance_cc::node_gpu_material().
| 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 1602 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 1586 of file colormanagement.cc.
References blender::colorspace::xyz_to_scene_linear.
Referenced by blender::nodes::node_composite_colorbalance_cc::ColorBalanceFunction::call(), blender::nodes::node_composite_colorbalance_cc::get_white_point_matrix(), get_XYZ_to_RGB_for_gpu(), and blender::nodes::node_composite_colorbalance_cc::node_gpu_material().
| 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 2684 of file colormanagement.cc.
References BKE_image_format_is_byte(), BKE_imtype_requires_linear_float(), ImBuf::byte_buffer, blender::StringRefNull::c_str(), ImBuf::channels, colormanage_colorspace_get_named(), colormanagement_imbuf_make_display_space(), ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImageFormatData::display_settings, DISPLAY_SPACE_IMAGE_OUTPUT, DISPLAY_SPACE_VIDEO_OUTPUT, ImBuf::float_buffer, g_config, 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_byte_from_float(), IMB_colormanagement_transform_byte(), IMB_colormanagement_transform_float(), IMB_colormangement_display_get_color_space(), IMB_float_from_byte(), IMB_free_byte_pixels(), imbuf_ensure_editable(), ImageFormatData::imtype, ImageFormatData::linear_colorspace_settings, ImageFormatData::media_type, MEDIA_TYPE_VIDEO, blender::ocio::ColorSpace::name(), ColorManagedColorspaceSettings::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_clipboard_copy_exec(), image_save_single(), and RE_WriteRenderViewsMovie().
| void IMB_colormanagement_imbuf_make_display_space | ( | ImBuf * | ibuf, |
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| const ColorManagedDisplaySpace | display_space ) |
Definition at line 2651 of file colormanagement.cc.
References colormanagement_imbuf_make_display_space().
| 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 2398 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(), in, out, ImBuf::x, 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 2444 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgb(), ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::colorspace, copy_v4_v4(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, blender::ocio::ColorSpace::get_to_scene_linear_cpu_processor(), IMB_alpha_affects_rgb(), in, mul_v3_fl(), out, blender::threading::parallel_for(), premul_to_straight_v4_v4(), rgba_uchar_to_float(), srgb_to_linearrgb_v3_v3(), ImBuf::x, x, and y.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_data().
| void IMB_colormanagement_init_untonemapped_view_settings | ( | ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 831 of file colormanagement.cc.
References ColorManagedViewSettings::curve_mapping, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, ColorManagedViewSettings::look, STRNCPY_UTF8, ColorManagedViewSettings::temperature, ColorManagedViewSettings::tint, and ColorManagedViewSettings::view_transform.
Referenced by 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 3273 of file colormanagement.cc.
References blender::StringRefNull::c_str(), g_config, and blender::ocio::Look::name().
Referenced by colormanage_check_view_settings(), and IMB_colormanagement_look_validate_for_view().
| const char * IMB_colormanagement_look_get_indexed_name | ( | const int | index | ) |
Definition at line 3264 of file colormanagement.cc.
References blender::StringRefNull::c_str(), g_config, and blender::ocio::Look::name().
| int IMB_colormanagement_look_get_named_index | ( | const char * | name | ) |
Definition at line 3255 of file colormanagement.cc.
References g_config, blender::ocio::Look::index, and name.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_look_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | view_name ) |
Definition at line 3788 of file colormanagement.cc.
References blender::StringRefNull::c_str(), colormanage_compatible_look(), blender::ocio::Look::description(), EnumPropertyItem::description, g_config, EnumPropertyItem::icon, EnumPropertyItem::identifier, blender::ocio::Look::index, blender::ocio::Look::name(), EnumPropertyItem::name, RNA_enum_item_add(), blender::ocio::Look::ui_name(), EnumPropertyItem::value, and view_filter_for_look().
| const char * IMB_colormanagement_look_validate_for_view | ( | const char * | view_name, |
| const char * | look_name ) |
Definition at line 3282 of file colormanagement.cc.
References blender::StringRefNull::c_str(), colormanage_compatible_look(), g_config, IMB_colormanagement_look_get_default_name(), blender::ocio::Look::name(), and blender::ocio::Look::ui_name().
| void IMB_colormanagement_pixel_to_display_space_v4 | ( | float | result[4], |
| const float | pixel[4], | ||
| const ColorManagedViewSettings * | view_settings, | ||
| const ColorManagedDisplaySettings * | display_settings, | ||
| const ColorManagedDisplaySpace | display_space ) |
Definition at line 2615 of file colormanagement.cc.
References copy_v4_v4(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), and result.
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 4333 of file colormanagement.cc.
References blender::ocio::BIT_DEPTH_F32, ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), x, and y.
Referenced by do_display_buffer_apply_thread(), do_processor_transform_thread(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_cpu(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_cpu(), IMB_byte_from_float(), IMB_display_buffer_transform_apply(), and blender::ed::vse::rgba_float_to_display_space().
| void IMB_colormanagement_processor_apply_byte | ( | ColormanageProcessor * | cm_processor, |
| uchar * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels ) |
Definition at line 4373 of file colormanagement.cc.
References BLI_assert, IMB_colormanagement_processor_apply_v4(), rgba_float_to_uchar(), rgba_uchar_to_float(), x, and y.
Referenced by do_processor_transform_thread().
| void IMB_colormanagement_processor_apply_pixel | ( | ColormanageProcessor * | cm_processor, |
| float * | pixel, | ||
| int | channels ) |
Definition at line 4312 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(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_single(), and partial_buffer_update_rect().
| void IMB_colormanagement_processor_apply_v3 | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[3] ) |
Definition at line 4301 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, and ColormanageProcessor::curve_mapping.
Referenced by BKE_histogram_update_sample_line(), IMB_colormanagement_processor_apply_pixel(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4 | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[4] ) |
Definition at line 4277 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, and ColormanageProcessor::curve_mapping.
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(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4_predivide | ( | ColormanageProcessor * | cm_processor, |
| float | pixel[4] ) |
Definition at line 4288 of file colormanagement.cc.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, and ColormanageProcessor::curve_mapping.
Referenced by IMB_colormanagement_processor_apply_pixel().
| void IMB_colormanagement_processor_free | ( | ColormanageProcessor * | cm_processor | ) |
Definition at line 4391 of file colormanagement.cc.
References BKE_curvemapping_free(), and ColormanageProcessor::curve_mapping.
Referenced by BKE_histogram_update_sample_line(), BKE_scopes_update(), blender::ed::vse::ScopeHistogram::calc_from_ibuf(), colormanage_display_buffer_process_ex(), colormanagement_transform_ex(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_cpu(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_cpu(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_single(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_single(), IMB_byte_from_float(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_transform_byte_to_float(), IMB_colormanagement_transform_v4(), IMB_display_buffer_transform_apply(), imb_partial_display_buffer_update_ex(), and blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color().
| bool IMB_colormanagement_processor_is_noop | ( | ColormanageProcessor * | cm_processor | ) |
Definition at line 4252 of file colormanagement.cc.
References ColormanageProcessor::cpu_processor, and ColormanageProcessor::curve_mapping.
Referenced by colormanagement_transform_ex(), and IMB_byte_from_float().
| const char * IMB_colormanagement_role_colorspace_name_get | ( | int | role | ) |
Definition at line 1208 of file colormanagement.cc.
References BLI_assert, CLOG_WARN, COLOR_ROLE_ACES_INTERCHANGE, 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_aces_interchange, 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 LOG.
Referenced by add_exr_compositing_result(), add_ibuf_for_tile(), blender::io::fbx::add_image_texture(), 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_render_write_exr(), BKE_image_save_options_init(), colormanage_colorspace_get_roled(), blender::seq::ensure_linear_float_buffer(), blender::ed::vse::get_texture_colorspace_name(), image_colorspace_from_imbuf(), image_exr_from_scene_linear_to_output(), image_node_colorspace(), IMB_byte_from_float(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), imb_exr_set_known_colorspace(), imb_handle_colorspace_and_alpha(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::init_brush_color(), blender::io::usd::USDMaterialReader::load_tex_image(), openexr_header_metadata_colorspace(), openexr_header_metadata_colorspace(), probe_video_colorspace(), RE_render_result_rect_to_ibuf(), blender::seq::render_imbuf_from_sequencer_space(), blender::seq::render_pixel_from_sequencer_space_v4(), render_result_exr_file_cache_read(), render_result_new_from_exr(), scene_init_data(), seq_process_render_image(), blender::seq::strip_add_set_view_transform(), ui_block_colorpicker(), 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 2535 of file colormanagement.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), copy_v3_v3(), g_config, global_color_picking_state, global_role_color_picking, global_role_scene_linear, 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, | ||
| const 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 2373 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply(), blender::ocio::BIT_DEPTH_F32, and printf.
Referenced by blender::seq::scene_linear_to_image_chunk_byte(), and blender::seq::scene_linear_to_image_chunk_float().
| void IMB_colormanagement_scene_linear_to_colorspace_v3 | ( | float | pixel[3], |
| const 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 2307 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgb(), and printf.
Referenced by blf_draw_buffer__start(), brush_painter_imbuf_new(), brush_painter_imbuf_update(), do_projectpaint_draw(), do_projectpaint_thread(), IMB_rectfill_area(), paint_2d_bucket_fill(), paint_2d_gradient_fill(), paint_proj_stroke_ps(), and project_paint_uvpixel_init().
| void IMB_colormanagement_scene_linear_to_display_v3 | ( | float | pixel[3], |
| const ColorManagedDisplay * | display, | ||
| const ColorManagedDisplaySpace | display_space = DISPLAY_SPACE_DRAW ) |
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 2593 of file colormanagement.cc.
References blender::ocio::CPUProcessor::apply_rgb(), DISPLAY_SPACE_DRAW, and blender::ocio::Display::get_from_scene_linear_cpu_processor().
Referenced by eyedropper_color_set(), ui_block_cm_to_display_space_v3(), ui_draw_but_COLORBAND(), ui_draw_colorband_handle(), ui_draw_gradient_hsv_to_rgb(), and UI_tooltip_color_field_add().
| bool IMB_colormanagement_set_whitepoint | ( | const float | whitepoint[3], |
| float & | temperature, | ||
| float & | tint ) |
Definition at line 1610 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 4497 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 4520 of file colormanagement.cc.
References C, and IMB_colormanagement_setup_glsl_draw_from_space_ctx().
| bool IMB_colormanagement_setup_glsl_draw_from_space | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings, | ||
| const 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 4437 of file colormanagement.cc.
References blender::StringRefNull::c_str(), colormanage_use_look(), COLORMANAGE_VIEW_USE_WHITE_BALANCE, blender::ocio::GPUDisplayParameters::curve_mapping, blender::ocio::GPUDisplayParameters::display, ColorManagedDisplaySettings::display_device, blender::ocio::GPUDisplayParameters::dither, blender::ocio::GPUDisplayParameters::do_overlay_merge, blender::ocio::GPUDisplayParameters::exponent, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, blender::ocio::GPUDisplayParameters::from_colorspace, g_config, ColorManagedViewSettings::gamma, get_display_emulation(), global_gpu_state, global_role_scene_linear, GPU_hdr_support(), IMB_colormanagement_display_is_hdr(), IMB_colormanagement_init_untonemapped_view_settings(), blender::ocio::GPUDisplayParameters::look, ColorManagedViewSettings::look, max_ff(), blender::ocio::ColorSpace::name(), powf, blender::ocio::GPUDisplayParameters::scale, blender::ocio::GPUDisplayParameters::temperature, ColorManagedViewSettings::temperature, blender::ocio::GPUDisplayParameters::tint, ColorManagedViewSettings::tint, update_glsl_curve_mapping(), blender::ocio::GPUDisplayParameters::use_display_emulation, blender::ocio::GPUDisplayParameters::use_hdr_buffer, blender::ocio::GPUDisplayParameters::use_hdr_display, blender::ocio::GPUDisplayParameters::use_predivide, blender::ocio::GPUDisplayParameters::use_white_balance, blender::ocio::GPUDisplayParameters::view, 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(), ocio_transform_ibuf(), and blender::ed::vse::update_gpu_scopes().
| bool IMB_colormanagement_setup_glsl_draw_from_space_ctx | ( | const bContext * | C, |
| const 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 4506 of file colormanagement.cc.
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_setup_glsl_draw_to_scene_linear | ( | const char * | from_colorspace_name, |
| bool | predivide ) |
Configures GPU shader for conversion from the given space to scene linear. Drawing happens in the same immediate mode as when GPU_SHADER_3D_IMAGE_COLOR shader is used.
Returns true if the GPU shader was successfully bound.
Definition at line 4525 of file colormanagement.cc.
References g_config, and global_gpu_state.
Referenced by blender::ed::vse::preview_draw_texture_to_linear().
| const ColorSpace * IMB_colormanagement_space_from_cicp | ( | const int | cicp[4], |
| const ColorManagedFileOutput | output ) |
Definition at line 1531 of file colormanagement.cc.
References CICP_PRI_P3D65, CICP_PRI_REC2020, CICP_PRI_REC709, CICP_TRC_BT709, CICP_TRC_G22, CICP_TRC_G26, CICP_TRC_HLG, CICP_TRC_PQ, CICP_TRC_SRGB, ELEM, g_config, blender::StringRefBase::is_empty(), nullptr, output, and Video.
Referenced by probe_video_colorspace(), and blender::imbuf::set_file_colorspace().
| const char * IMB_colormanagement_space_from_filepath_rules | ( | const char * | filepath | ) |
Definition at line 1311 of file colormanagement.cc.
References g_config.
Referenced by imb_handle_colorspace_and_alpha().
| const ColorSpace * IMB_colormanagement_space_from_interop_id | ( | StringRefNull | interop_id | ) |
Definition at line 1581 of file colormanagement.cc.
References g_config.
Referenced by IMB_colormanagement_working_space_items_add(), and imb_exr_set_known_colorspace().
| StringRefNull IMB_colormanagement_space_get_interop_id | ( | const ColorSpace * | colorspace | ) |
Definition at line 1576 of file colormanagement.cc.
References blender::ocio::ColorSpace::interop_id().
Referenced by openexr_header_metadata_colorspace().
| const ColorSpace * IMB_colormanagement_space_get_named | ( | const char * | name | ) |
Definition at line 1316 of file colormanagement.cc.
References g_config, and name.
Referenced by IMB_exr_add_channels(), imb_exr_part_colorspace(), and openexr_header_metadata_colorspace().
| bool IMB_colormanagement_space_is_data | ( | const ColorSpace * | colorspace | ) |
Definition at line 1321 of file colormanagement.cc.
References blender::ocio::ColorSpace::is_data().
Referenced by blender::compositor::compute_linear_buffer(), gpu_texture_update_from_ibuf(), IMB_colormanagement_imbuf_to_byte_texture(), IMB_exr_begin_write(), IMB_gpu_get_compressed_format(), imb_gpu_get_data(), imb_gpu_get_format(), and imb_is_grayscale_texture_format_compatible().
| bool IMB_colormanagement_space_is_scene_linear | ( | const ColorSpace * | colorspace | ) |
Definition at line 1326 of file colormanagement.cc.
References blender::ocio::ColorSpace::is_scene_linear().
Referenced by blender::compositor::compute_linear_buffer(), gpu_texture_update_from_ibuf(), IMB_colormanagement_imbuf_to_byte_texture(), IMB_colormanagement_space_name_is_scene_linear(), IMB_gpu_get_compressed_format(), imb_gpu_get_data(), imb_gpu_get_format(), imb_is_grayscale_texture_format_compatible(), and blender::seq::is_linear_float_buffer().
| bool IMB_colormanagement_space_is_srgb | ( | const ColorSpace * | colorspace | ) |
Definition at line 1331 of file colormanagement.cc.
References blender::ocio::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(), imb_is_grayscale_texture_format_compatible(), paint_2d_stroke(), and paint_proj_stroke_ps().
| bool IMB_colormanagement_space_name_is_data | ( | const char * | name | ) |
Definition at line 1336 of file colormanagement.cc.
References g_config, blender::ocio::ColorSpace::is_data(), and name.
Referenced by add_ibuf_for_tile(), BKE_image_format_update_color_space_for_type(), BKE_image_save_options_init(), blender::image_engine::FloatBufferCache::cached_float_buffer(), 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_colorspace_and_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 1342 of file colormanagement.cc.
References g_config, IMB_colormanagement_space_is_scene_linear(), and name.
Referenced by BKE_image_format_update_color_space_for_type(), blender::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 1348 of file colormanagement.cc.
References g_config, IMB_colormanagement_space_is_srgb(), and name.
Referenced by blender::io::usd::get_node_tex_image_color_space().
| bool IMB_colormanagement_space_to_cicp | ( | const ColorSpace * | colorspace, |
| const ColorManagedFileOutput | output, | ||
| const bool | rgb_matrix, | ||
| int | cicp[4] ) |
Definition at line 1444 of file colormanagement.cc.
References CICP_MATRIX_BT709, CICP_MATRIX_REC2020_NCL, CICP_MATRIX_RGB, CICP_PRI_P3D65, CICP_PRI_REC2020, CICP_PRI_REC709, CICP_RANGE_FULL, CICP_TRC_BT709, CICP_TRC_G22, CICP_TRC_G26, CICP_TRC_HLG, CICP_TRC_PQ, CICP_TRC_SRGB, ELEM, blender::ocio::ColorSpace::interop_id(), blender::StringRefBase::is_empty(), output, and Video.
Referenced by blender::imbuf::imb_create_write_spec().
| blender::Vector< char > IMB_colormanagement_space_to_icc_profile | ( | const ColorSpace * | colorspace | ) |
Definition at line 1374 of file colormanagement.cc.
References BKE_appdir_folder_id(), BLENDER_DATAFILES, BLI_path_join, BLI_path_make_safe_filename(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::StringRef::drop_suffix(), blender::StringRefBase::endswith(), FILE_MAX, blender::ocio::ColorSpace::interop_id(), blender::StringRefBase::is_empty(), blender::fstream::open(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), size(), and STRNCPY().
Referenced by blender::imbuf::imb_create_write_spec(), imb_savewebp(), and write_jpeg().
| const char * IMB_colormanagement_srgb_colorspace_name_get | ( | ) |
Definition at line 1354 of file colormanagement.cc.
References blender::StringRefNull::c_str(), g_config, global_role_default_byte, i, and blender::ocio::ColorSpace::name().
Referenced by blender::io::usd::USDMaterialReader::load_tex_image().
| void IMB_colormanagement_transform_byte | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Convert a byte image buffer from one color space to another.
Definition at line 2217 of file colormanagement.cc.
References colormanagement_transform_ex().
Referenced by IMB_colormanagement_imbuf_for_write().
| void IMB_colormanagement_transform_byte_to_float | ( | float * | float_buffer, |
| unsigned char * | byte_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Convert a byte image buffer into a float buffer, changing the color spaces too.
Definition at line 2228 of file colormanagement.cc.
References IndexRange::first(), float, i, IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_free(), blender::threading::parallel_for(), processor_transform_apply_threaded(), and STREQ.
Referenced by blender::seq::do_glow_effect_byte(), blender::seq::seq_imbuf_to_sequencer_space(), and seq_process_render_image().
| void IMB_colormanagement_transform_float | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide ) |
Convert a float image buffer from one color space to another.
Definition at line 2205 of file colormanagement.cc.
References colormanagement_transform_ex().
Referenced by colormanage_imbuf_make_linear(), display_buffer_apply_get_linear_buffer(), blender::seq::ensure_linear_float_buffer(), image_exr_from_scene_linear_to_output(), IMB_colormanagement_imbuf_for_write(), blender::seq::render_imbuf_from_sequencer_space(), render_result_new_from_exr(), blender::seq::seq_imbuf_to_sequencer_space(), blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| void IMB_colormanagement_transform_v4 | ( | float | pixel[4], |
| const char * | from_colorspace, | ||
| const char * | to_colorspace ) |
Definition at line 2269 of file colormanagement.cc.
References IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), and STREQ.
Referenced by blender::seq::render_pixel_from_sequencer_space_v4().
| void IMB_colormanagement_validate_settings | ( | const ColorManagedDisplaySettings * | display_settings, |
| ColorManagedViewSettings * | view_settings ) |
Definition at line 1185 of file colormanagement.cc.
References blender::StringRefNull::c_str(), colormanage_find_matching_view_name(), ColorManagedDisplaySettings::display_device, g_config, blender::ocio::Display::get_num_views(), blender::ocio::Display::get_view_by_index(), blender::StringRefBase::is_empty(), STRNCPY_UTF8, view, and ColorManagedViewSettings::view_transform.
Referenced by BKE_color_managed_view_settings_init().
| const char * IMB_colormanagement_view_get_default_name | ( | const char * | display_name | ) |
Definition at line 3136 of file colormanagement.cc.
References g_config, blender::ocio::Display::get_default_view(), and view.
| int IMB_colormanagement_view_get_id_by_name | ( | const char * | name | ) |
Definition at line 3118 of file colormanagement.cc.
References g_all_view_names, and name.
Referenced by colormanage_view_settings_to_cache(), and IMB_colormanagement_view_items_add().
| const char * IMB_colormanagement_view_get_name_by_id | ( | const int | index | ) |
Definition at line 3123 of file colormanagement.cc.
References BLI_assert, and g_all_view_names.
| const char * IMB_colormanagement_view_get_raw_or_default_name | ( | const char * | display_name | ) |
Definition at line 3151 of file colormanagement.cc.
References g_config, blender::ocio::Display::get_default_view(), blender::ocio::Display::get_view_by_name(), and view.
Referenced by BKE_scene_disable_color_management().
| void IMB_colormanagement_view_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | display_name ) |
Definition at line 3764 of file colormanagement.cc.
References EnumPropertyItem::description, g_config, blender::ocio::Display::get_num_views(), blender::ocio::Display::get_view_by_index(), EnumPropertyItem::icon, EnumPropertyItem::identifier, IMB_colormanagement_view_get_id_by_name(), EnumPropertyItem::name, RNA_enum_item_add(), EnumPropertyItem::value, and view.
Definition at line 4695 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().
| void IMB_colormanagement_wavelength_to_rgb_table | ( | float * | r_table, |
| const int | width ) |
Definition at line 4708 of file colormanagement.cc.
References float, i, and IMB_colormanagement_wavelength_to_rgb().
Referenced by blender::nodes::node_shader_wavelength_cc::node_shader_gpu_wavelength().
| void IMB_colormanagement_working_space_check | ( | Main * | bmain, |
| const bool | for_undo, | ||
| const bool | have_editable_assets ) |
Definition at line 3456 of file colormanagement.cc.
References CLOG_DEBUG, Main::colorspace, global_role_scene_linear_default, global_scene_linear_to_xyz_default, IMB_colormanagement_working_space_convert(), imb_colormanagement_working_space_set_from_matrix(), blender::math::invert(), blender::math::is_zero(), LOG, MainColorspace::scene_linear_name, blender::colorspace::scene_linear_to_xyz, MainColorspace::scene_linear_to_xyz, and STRNCPY().
Referenced by setup_app_data().
| void IMB_colormanagement_working_space_convert | ( | Main * | bmain, |
| const blender::float3x3 & | current_scene_linear_to_xyz, | ||
| const blender::float3x3 & | new_xyz_to_scene_linear, | ||
| const bool | depsgraph_tag, | ||
| const bool | linked_only, | ||
| const bool | editable_assets_only ) |
Definition at line 3528 of file colormanagement.cc.
References Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify(), Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::begin(), BKE_idtype_get_info_from_id(), BLI_assert, CLOG_ERROR, copy_v3_v3(), data, DEG_id_tag_update(), blender::math::determinant(), Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::end(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDTypeInfo::foreach_working_space_color, blender::ImplicitSharingPtr< T, IsStrong >::get(), global_scene_linear_to_xyz_default, i, ID_RECALC_ALL, blender::MatBase< float, 3, 3 >::identity(), imb_working_space_compare_threshold, imb_working_space_convert(), Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::math::is_equal(), blender::math::is_zero(), Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), ID::lib, LIBRARY_ASSET_EDITABLE, LOG, M, blender::bke::node_tree_from_id(), blender::threading::parallel_for(), Library::runtime, and size().
Referenced by blo_read_file_internal(), IMB_colormanagement_working_space_check(), IMB_colormanagement_working_space_convert(), library_link_end(), and wm_set_working_color_space_exec().
Definition at line 3688 of file colormanagement.cc.
References Main::colorspace, global_scene_linear_to_xyz_default, IMB_colormanagement_working_space_convert(), blender::math::invert(), blender::math::is_zero(), MainColorspace::scene_linear_name, MainColorspace::scene_linear_to_xyz, and STRNCPY().
| const char * IMB_colormanagement_working_space_get | ( | ) |
Definition at line 3366 of file colormanagement.cc.
References global_role_scene_linear.
| const char * IMB_colormanagement_working_space_get_default | ( | ) |
Definition at line 3319 of file colormanagement.cc.
References global_role_scene_linear_default.
Referenced by wm_set_working_color_space_invoke().
| const char * IMB_colormanagement_working_space_get_indexed_name | ( | int | index | ) |
Definition at line 3329 of file colormanagement.cc.
References IMB_colormanagement_colorspace_get_indexed_name().
Referenced by wm_set_working_color_space_exec(), and wm_set_working_color_space_invoke().
| int IMB_colormanagement_working_space_get_named_index | ( | const char * | name | ) |
Definition at line 3324 of file colormanagement.cc.
References IMB_colormanagement_colorspace_get_named_index(), and name.
Referenced by wm_set_working_color_space_invoke().
| void IMB_colormanagement_working_space_init_default | ( | Main * | bmain | ) |
Definition at line 3705 of file colormanagement.cc.
References Main::colorspace, global_role_scene_linear_default, global_scene_linear_to_xyz_default, MainColorspace::scene_linear_name, MainColorspace::scene_linear_to_xyz, and STRNCPY().
Referenced by BKE_main_new(), and IMB_colormanagement_working_space_init_startup().
| void IMB_colormanagement_working_space_init_startup | ( | Main * | bmain | ) |
Definition at line 3711 of file colormanagement.cc.
References Main::colorspace, g_config_is_custom, IMB_colormanagement_working_space_init_default(), blender::math::is_zero(), and MainColorspace::scene_linear_to_xyz.
Referenced by setup_app_data().
| void IMB_colormanagement_working_space_items_add | ( | EnumPropertyItem ** | items, |
| int * | totitem ) |
Definition at line 3334 of file colormanagement.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::contains(), EnumPropertyItem::description, g_config, global_role_scene_linear_default, EnumPropertyItem::icon, EnumPropertyItem::identifier, IMB_colormanagement_space_from_interop_id(), EnumPropertyItem::name, blender::Vector< T, InlineBufferCapacity, Allocator >::prepend(), RNA_enum_item_add(), and EnumPropertyItem::value.
Referenced by working_space_itemf().
|
static |
Definition at line 3397 of file colormanagement.cc.
References blender::ocio::ACESCG_TO_XYZ, CLOG_ERROR, Main::colorspace, Main::filepath, g_config, global_role_scene_linear_default, global_scene_linear_to_xyz_default, IMB_colormanagement_working_space_set_from_name(), imb_working_space_compare_threshold, blender::math::invert(), blender::StringRefBase::is_empty(), blender::math::is_equal(), MainColorspace::is_missing_opencolorio_config, LOG, name, MainColorspace::scene_linear_name, MainColorspace::scene_linear_to_xyz, STRNCPY(), blender::ocio::XYZ_TO_REC2020, and blender::ocio::XYZ_TO_REC709.
Referenced by IMB_colormanagement_working_space_check().
| bool IMB_colormanagement_working_space_set_from_name | ( | const char * | name | ) |
Definition at line 3371 of file colormanagement.cc.
References CLOG_DEBUG, colormanage_update_matrices(), g_config, global_color_picking_state, global_role_default_float, global_role_default_float_default, global_role_scene_linear, global_role_scene_linear_default, LOG, name, STREQ, and STRNCPY().
Referenced by imb_colormanagement_working_space_set_from_matrix(), and wm_set_working_color_space_exec().
| const ColorSpace * IMB_colormangement_display_get_color_space | ( | const ColorManagedViewSettings * | view_settings, |
| const ColorManagedDisplaySettings * | display_settings ) |
Definition at line 3055 of file colormanagement.cc.
References ColorManagedDisplaySettings::display_device, g_config, blender::ocio::Display::get_untonemapped_view(), blender::ocio::Display::get_view_by_name(), blender::ocio::View::name(), view, and ColorManagedViewSettings::view_transform.
Referenced by image_save_post(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_imbuf_for_write(), and is_colorspace_same_as_display().
| 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 2848 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, DISPLAY_SPACE_DRAW, ImBuf::float_buffer, g_config, IB_DISPLAY_BUFFER_INVALID, IMB_colormanagement_init_untonemapped_view_settings(), IMB_partial_display_buffer_update_threaded(), ImBuf::invalid_rect, is_colorspace_same_as_display(), LOCK_COLORMANAGE, MEM_calloc_arrayN(), MEM_malloc_arrayN(), ImBuf::userflags, ImBuf::x, rcti::xmax, rcti::xmin, ImBuf::y, rcti::ymax, and rcti::ymin.
Referenced by BKE_scopes_update(), draw_plane_marker_image(), blender::ed::vse::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 2945 of file colormanagement.cc.
References C, IMB_colormanagement_display_settings_from_ctx(), and IMB_display_buffer_acquire().
| void IMB_display_buffer_release | ( | void * | cache_handle | ) |
Definition at line 2991 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(), blender::ed::vse::draw_strip_thumbnails(), ED_draw_imbuf_clipping(), and imb_partial_display_buffer_update_ex().
| 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 2955 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_malloc_arrayN().
Referenced by render_result_rect_get_pixels().
| 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 4112 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 4172 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 4013 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, ColormanageCacheDisplaySettings::display, ImBuf::display_buffer_flags, IndexRange::first(), ImBuf::float_buffer, g_config, IB_DISPLAY_BUFFER_INVALID, IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), IMB_display_buffer_release(), is_colorspace_same_as_display(), LOCK_COLORMANAGE, IndexRange::one_after_last(), blender::threading::parallel_for(), partial_buffer_update_rect(), 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 4140 of file colormanagement.cc.
References imb_partial_display_buffer_update_ex().
Referenced by IMB_display_buffer_acquire().
|
static |
Definition at line 3518 of file colormanagement.cc.
References imb_working_space_convert(), blender::color::premultiply_alpha(), and blender::color::unpremultiply_alpha().
|
static |
Definition at line 3492 of file colormanagement.cc.
References blender::math::clamp(), e, fabsf, i, and roundf.
Referenced by IMB_colormanagement_working_space_convert(), and imb_working_space_convert().
|
static |
Definition at line 2661 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 1953 of file colormanagement.cc.
References COLORMANAGE_VIEW_USE_CURVES, COLORMANAGE_VIEW_USE_WHITE_BALANCE, ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, g_config, ColorManagedViewSettings::gamma, blender::ocio::Display::get_untonemapped_view(), IMB_colormangement_display_get_color_space(), blender::StringRefBase::is_empty(), ColorManagedViewSettings::look, blender::ocio::View::name(), blender::ocio::Look::process_space(), and ColorManagedViewSettings::view_transform.
Referenced by IMB_colormanagement_display_processor_needed(), IMB_display_buffer_acquire(), and imb_partial_display_buffer_update_ex().
|
static |
Definition at line 3862 of file colormanagement.cc.
References BLI_assert_msg, ImBuf::byte_buffer, ImBuf::channels, ImBuf::colormanage_flag, ImBufByteBuffer::colorspace, copy_v3_v3(), copy_v4_v4(), ImBuf::dither, i, 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_freeN(), MEM_malloc_arrayN(), 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().
|
static |
Definition at line 2139 of file colormanagement.cc.
References do_processor_transform_thread(), IndexRange::first(), init_data(), blender::threading::parallel_for(), processor_transform_init_handle(), and IndexRange::size().
Referenced by colormanagement_transform_ex(), and IMB_colormanagement_transform_byte_to_float().
|
static |
Definition at line 2069 of file colormanagement.cc.
References ProcessorTransformThread::byte_buffer, ProcessorTransformThread::channels, ProcessorTransformThread::cm_processor, ProcessorTransformThread::float_buffer, ProcessorTransformThread::float_from_byte, init_data(), ProcessorTransformThread::predivide, ProcessorTransformThread::start_line, ProcessorTransformThread::tot_line, and ProcessorTransformThread::width.
Referenced by processor_transform_apply_threaded().
|
static |
Definition at line 4402 of file colormanagement.cc.
References BKE_curvemapping_copy(), BKE_curvemapping_free(), CurveMapping::changed_timestamp, COLORMANAGE_VIEW_USE_CURVES, ColorManagedViewSettings::curve_mapping, ColorManagedViewSettings::flag, and global_gpu_state.
Referenced by IMB_colormanagement_setup_glsl_draw_from_space().
|
static |
Definition at line 690 of file colormanagement.cc.
References blender::StringRefBase::find(), g_config, blender::StringRefBase::is_empty(), blender::StringRefBase::substr(), and blender::ocio::Look::view().
Referenced by colormanage_compatible_look(), and IMB_colormanagement_look_items_add().
Definition at line 4676 of file colormanagement.cc.
References cie_color_match, float, and i.
Referenced by IMB_colormanagement_wavelength_to_rgb().
|
static |
Definition at line 4570 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
Definition at line 4561 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
Definition at line 4553 of file colormanagement.cc.
Referenced by blackbody_temperature_to_rec709(), and svm_math_blackbody_color_rec709().
|
static |
Definition at line 1439 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1440 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1438 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1429 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1428 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1427 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1442 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1431 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1432 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1435 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1436 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1434 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
static |
Definition at line 1433 of file colormanagement.cc.
Referenced by IMB_colormanagement_space_from_cicp(), and IMB_colormanagement_space_to_cicp().
|
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 4647 of file colormanagement.cc.
Referenced by svm_math_wavelength_color_xyz(), and wavelength_to_xyz().
|
static |
Definition at line 89 of file colormanagement.cc.
Referenced by colormanage_free_config(), colormanage_load_config(), IMB_colormanagement_view_get_id_by_name(), and IMB_colormanagement_view_get_name_by_id().
|
static |
Definition at line 87 of file colormanagement.cc.
Referenced by colormanage_check_colorspace_name(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_colorspace_get_named(), colormanage_free_config(), colormanage_imbuf_make_linear(), colormanage_imbuf_set_default_spaces(), colormanage_load_config(), colormanage_update_matrices(), colormanage_use_look(), colormanagement_init(), get_display_buffer_processor(), IMB_colormanagement_assign_byte_colorspace(), IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_check_file_config(), IMB_colormanagement_check_is_data(), IMB_colormanagement_color_picking_to_scene_linear_v3(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_colorspace_get_indexed_name(), IMB_colormanagement_colorspace_get_named_index(), IMB_colormanagement_colorspace_items_add(), IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_display_get_default_name(), IMB_colormanagement_display_get_indexed_name(), IMB_colormanagement_display_get_named(), IMB_colormanagement_display_get_named_index(), IMB_colormanagement_display_get_none_name(), IMB_colormanagement_display_is_hdr(), IMB_colormanagement_display_is_wide_gamut(), IMB_colormanagement_display_items_add(), IMB_colormanagement_display_support_emulation(), IMB_colormanagement_finish_glsl_draw(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_look_get_default_name(), IMB_colormanagement_look_get_indexed_name(), IMB_colormanagement_look_get_named_index(), IMB_colormanagement_look_items_add(), IMB_colormanagement_look_validate_for_view(), IMB_colormanagement_scene_linear_to_color_picking_v3(), IMB_colormanagement_setup_glsl_draw_from_space(), IMB_colormanagement_setup_glsl_draw_to_scene_linear(), IMB_colormanagement_space_from_cicp(), IMB_colormanagement_space_from_filepath_rules(), IMB_colormanagement_space_from_interop_id(), IMB_colormanagement_space_get_named(), IMB_colormanagement_space_name_is_data(), IMB_colormanagement_space_name_is_scene_linear(), IMB_colormanagement_space_name_is_srgb(), IMB_colormanagement_srgb_colorspace_name_get(), IMB_colormanagement_validate_settings(), IMB_colormanagement_view_get_default_name(), IMB_colormanagement_view_get_raw_or_default_name(), IMB_colormanagement_view_items_add(), IMB_colormanagement_working_space_items_add(), imb_colormanagement_working_space_set_from_matrix(), IMB_colormanagement_working_space_set_from_name(), IMB_colormangement_display_get_color_space(), IMB_display_buffer_acquire(), imb_partial_display_buffer_update_ex(), is_colorspace_same_as_display(), and view_filter_for_look().
|
static |
Definition at line 88 of file colormanagement.cc.
Referenced by colormanagement_init(), and IMB_colormanagement_working_space_init_startup().
|
static |
|
static |
|
static |
Definition at line 101 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 96 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 94 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
|
static |
Definition at line 98 of file colormanagement.cc.
Referenced by colormanage_imbuf_set_default_spaces(), colormanage_load_config(), display_buffer_apply_threaded(), IMB_colormanagement_imbuf_for_write(), IMB_colormanagement_role_colorspace_name_get(), and IMB_colormanagement_srgb_colorspace_name_get().
|
static |
Definition at line 99 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_role_colorspace_name_get(), and IMB_colormanagement_working_space_set_from_name().
|
static |
Definition at line 105 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_working_space_set_from_name().
|
static |
Definition at line 100 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 95 of file colormanagement.cc.
Referenced by colormanage_imbuf_make_linear(), colormanage_load_config(), display_buffer_apply_get_linear_buffer(), 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(), IMB_colormanagement_setup_glsl_draw_from_space(), IMB_colormanagement_working_space_get(), and IMB_colormanagement_working_space_set_from_name().
|
static |
Definition at line 104 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_working_space_check(), IMB_colormanagement_working_space_get_default(), IMB_colormanagement_working_space_init_default(), IMB_colormanagement_working_space_items_add(), imb_colormanagement_working_space_set_from_matrix(), and IMB_colormanagement_working_space_set_from_name().
|
static |
Definition at line 97 of file colormanagement.cc.
Referenced by colormanage_load_config(), and IMB_colormanagement_role_colorspace_name_get().
| float3x3 global_scene_linear_to_xyz_default = float3x3::zero() |
Definition at line 107 of file colormanagement.cc.
Referenced by colormanage_load_config(), IMB_colormanagement_working_space_check(), IMB_colormanagement_working_space_convert(), IMB_colormanagement_working_space_convert(), IMB_colormanagement_working_space_init_default(), and imb_colormanagement_working_space_set_from_matrix().
|
static |
Definition at line 3317 of file colormanagement.cc.
Referenced by IMB_colormanagement_working_space_convert(), and imb_colormanagement_working_space_set_from_matrix().
|
static |
Definition at line 73 of file colormanagement.cc.
|
static |
Definition at line 114 of file colormanagement.cc.
Referenced by IMB_colormanagement_color_picking_to_scene_linear_v3(), and IMB_colormanagement_scene_linear_to_color_picking_v3().