|
Blender
V2.93
|
#include "BLI_compiler_compat.h"#include "BLI_sys_types.h"#include "intern/colormanagement_inline.c"Go to the source code of this file.
Macros | |
| #define | BCM_CONFIG_FILE "config.ocio" |
Enumerations | |
| enum | { COLOR_ROLE_SCENE_LINEAR = 0 , COLOR_ROLE_COLOR_PICKING , COLOR_ROLE_TEXTURE_PAINTING , COLOR_ROLE_DEFAULT_SEQUENCER , COLOR_ROLE_DEFAULT_BYTE , COLOR_ROLE_DEFAULT_FLOAT , COLOR_ROLE_DATA } |
| #define BCM_CONFIG_FILE "config.ocio" |
Definition at line 33 of file IMB_colormanagement.h.
| anonymous enum |
| Enumerator | |
|---|---|
| COLOR_ROLE_SCENE_LINEAR | |
| COLOR_ROLE_COLOR_PICKING | |
| COLOR_ROLE_TEXTURE_PAINTING | |
| COLOR_ROLE_DEFAULT_SEQUENCER | |
| COLOR_ROLE_DEFAULT_BYTE | |
| COLOR_ROLE_DEFAULT_FLOAT | |
| COLOR_ROLE_DATA | |
Definition at line 361 of file IMB_colormanagement.h.
Definition at line 1307 of file colormanagement.c.
References ImBuf::flags, IB_alphamode_channel_packed, IB_alphamode_ignore, IB_alphamode_premul, IMB_colormanagement_assign_float_colorspace(), IMB_colormanagement_assign_rect_colorspace(), IMB_colormanagement_get_float_colorspace(), and IMB_colormanagement_get_rect_colorspace().
Referenced by BKE_tracking_stabilize_frame().
| void IMB_colormanagement_assign_float_colorspace | ( | struct ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1324 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, ImBuf::float_colorspace, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by IMB_colormanagegent_copy_settings(), prepare_effect_imbufs(), seq_disk_cache_read_file(), seq_imbuf_assign_spaces(), and SEQ_render_imbuf_from_sequencer_space().
| void IMB_colormanagement_assign_rect_colorspace | ( | struct ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1338 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, IMB_COLORMANAGE_IS_DATA, ColorSpace::is_data, and ImBuf::rect_colorspace.
Referenced by add_ibuf_size(), image_get_render_result(), IMB_colormanagegent_copy_settings(), seq_disk_cache_read_file(), and seq_imbuf_assign_spaces().
| void IMB_colormanagement_buffer_make_display_space | ( | float * | buffer, |
| unsigned char * | display_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| float | dither, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
| void IMB_colormanagement_check_file_config | ( | struct Main * | bmain | ) |
Definition at line 1192 of file colormanagement.c.
References BLI_strncpy(), colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_display_get_default(), Image::colorspace_settings, MovieClip::colorspace_settings, Strip::colorspace_settings, Scene::display_settings, Scene::ed, ListBase::first, global_role_default_sequencer, Image::id, MovieClip::id, Scene::id, Main::images, MAX_COLORSPACE_NAME, Main::movieclips, ColorManagedColorspaceSettings::name, ID::next, scene, Main::scenes, SEQ_ALL_BEGIN, SEQ_ALL_END, Scene::sequencer_colorspace_settings, Sequence::strip, and Scene::view_settings.
Referenced by BKE_copybuffer_paste(), BKE_copybuffer_read(), lib_relocate_do(), setup_app_data(), and wm_link_append_exec().
| void IMB_colormanagement_check_is_data | ( | struct ImBuf * | ibuf, |
| const char * | name | ||
| ) |
Definition at line 1295 of file colormanagement.c.
References colormanage_colorspace_get_named(), ImBuf::colormanage_flag, IMB_COLORMANAGE_IS_DATA, and ColorSpace::is_data.
Referenced by add_ibuf_size().
| void IMB_colormanagement_color_picking_to_scene_linear_v3 | ( | float | pixel[3] | ) |
Definition at line 2353 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), global_color_picking_state::cpu_processor_from, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, NULL, OCIO_cpuProcessorApplyRGB(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by ui_perceptual_to_scene_linear_space().
| void IMB_colormanagement_colorspace_from_ibuf_ftype | ( | struct ColorManagedColorspaceSettings * | colorspace_settings, |
| struct ImBuf * | ibuf | ||
| ) |
Definition at line 3165 of file colormanagement.c.
References BLI_strncpy(), colormanage_colorspace_get_named(), IMB_colormanagement_role_colorspace_name_get(), IMB_file_type_from_ibuf(), ColorSpace::is_data, ColorManagedColorspaceSettings::name, NULL, and type.
Referenced by image_save_post().
| const char* IMB_colormanagement_colorspace_get_indexed_name | ( | int | index | ) |
Definition at line 3152 of file colormanagement.c.
References colormanage_colorspace_get_indexed(), and ColorSpace::name.
| int IMB_colormanagement_colorspace_get_named_index | ( | const char * | name | ) |
Definition at line 3139 of file colormanagement.c.
References colormanage_colorspace_get_named(), and ColorSpace::index.
| void IMB_colormanagement_colorspace_items_add | ( | struct EnumPropertyItem ** | items, |
| int * | totitem | ||
| ) |
Definition at line 3342 of file colormanagement.c.
References ColorSpace::description, EnumPropertyItem::description, ListBase::first, global_colorspaces, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorSpace::index, ColorSpace::is_invertible, ColorSpace::name, EnumPropertyItem::name, ColorSpace::next, RNA_enum_item_add(), and EnumPropertyItem::value.
| struct ColormanageProcessor* IMB_colormanagement_colorspace_processor_new | ( | const char * | from_colorspace, |
| const char * | to_colorspace | ||
| ) |
Definition at line 3791 of file colormanagement.c.
References colormanage_colorspace_get_named(), ColormanageProcessor::cpu_processor, create_colorspace_transform_processor(), ColorSpace::is_data, ColormanageProcessor::is_data_result, MEM_callocN, NULL, OCIO_processorGetCPUProcessor(), and OCIO_processorRelease().
Referenced by colormanagement_transform_ex(), IMB_colormanagement_transform_from_byte_threaded(), and IMB_colormanagement_transform_v4().
| void IMB_colormanagement_colorspace_to_scene_linear | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| struct ColorSpace * | colorspace, | ||
| bool | predivide | ||
| ) |
Definition at line 2163 of file colormanagement.c.
References buffer, colorspace_to_scene_linear_cpu_processor(), height, NULL, OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), and width.
Referenced by IMB_float_from_rect().
| void IMB_colormanagement_colorspace_to_scene_linear_v3 | ( | float | pixel[3], |
| struct ColorSpace * | colorspace | ||
| ) |
Definition at line 2104 of file colormanagement.c.
References colorspace_to_scene_linear_cpu_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by BKE_brush_sample_tex_3d(), ED_space_clip_color_sample(), ED_space_image_color_sample(), ED_space_node_color_sample(), multitex_nodes_intern(), paint_get_tex_pixel_col(), partial_buffer_update_rect(), tonemapmodifier_apply(), tonemapmodifier_apply_threaded_photoreceptor(), and tonemapmodifier_apply_threaded_simple().
| void IMB_colormanagement_colorspace_to_scene_linear_v4 | ( | float | pixel[4], |
| bool | predivide, | ||
| struct ColorSpace * | colorspace | ||
| ) |
Definition at line 2139 of file colormanagement.c.
References colorspace_to_scene_linear_cpu_processor(), NULL, OCIO_cpuProcessorApplyRGBA(), and OCIO_cpuProcessorApplyRGBA_predivide().
Referenced by image_sample_pixel_color_ubyte(), IMB_sampleImageAtLocation(), sample_apply(), blender::compositor::sampleImageAtLocation(), and sequencer_sample_apply().
| const char* IMB_colormanagement_display_get_default_name | ( | void | ) |
Definition at line 2895 of file colormanagement.c.
References colormanage_display_get_default(), and ColorManagedDisplay::name.
Referenced by BKE_color_managed_display_settings_init(), and UI_block_begin().
| const char* IMB_colormanagement_display_get_default_view_transform_name | ( | struct ColorManagedDisplay * | display | ) |
Definition at line 2917 of file colormanagement.c.
References colormanage_view_get_default_name().
Referenced by BKE_color_managed_view_settings_init_render(), and seq_add_set_view_transform().
| const char* IMB_colormanagement_display_get_indexed_name | ( | int | index | ) |
Definition at line 2882 of file colormanagement.c.
References colormanage_display_get_indexed(), ColorManagedDisplay::name, and NULL.
| struct ColorManagedDisplay* IMB_colormanagement_display_get_named | ( | const char * | name | ) |
Definition at line 2903 of file colormanagement.c.
References colormanage_display_get_named().
Referenced by BKE_color_managed_view_settings_init_render(), BKE_image_stamp_buf(), brush_painter_imbuf_new(), brush_painter_imbuf_update(), do_text_effect(), eyedropper_color_sample_fl(), eyedropper_gpencil_init(), eyedropper_init(), seq_add_set_view_transform(), and ui_block_cm_display_get().
| int IMB_colormanagement_display_get_named_index | ( | const char * | name | ) |
Definition at line 2869 of file colormanagement.c.
References colormanage_display_get_named(), and ColorManagedDisplay::index.
Referenced by colormanage_display_settings_to_cache().
| const char* IMB_colormanagement_display_get_none_name | ( | void | ) |
Definition at line 2908 of file colormanagement.c.
References colormanage_display_get_default_name(), colormanage_display_get_named(), and NULL.
Referenced by BKE_scene_disable_color_management().
| void IMB_colormanagement_display_items_add | ( | struct EnumPropertyItem ** | items, |
| int * | totitem | ||
| ) |
Definition at line 3269 of file colormanagement.c.
References EnumPropertyItem::description, ListBase::first, global_displays, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorManagedDisplay::index, ColorManagedDisplay::name, EnumPropertyItem::name, ColorManagedDisplay::next, RNA_enum_item_add(), and EnumPropertyItem::value.
| struct ColormanageProcessor* IMB_colormanagement_display_processor_new | ( | const struct ColorManagedViewSettings * | view_settings, |
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
| void IMB_colormanagement_display_settings_from_ctx | ( | const struct bContext * | C, |
| struct ColorManagedViewSettings ** | r_view_settings, | ||
| struct ColorManagedDisplaySettings ** | r_display_settings | ||
| ) |
Referenced by draw_image_buffer(), and ED_draw_imbuf_ctx_clipping().
| void IMB_colormanagement_display_to_scene_linear_v3 | ( | float | pixel[3], |
| struct ColorManagedDisplay * | display | ||
| ) |
Definition at line 2410 of file colormanagement.c.
References display_to_scene_linear_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by blf_draw_buffer__start(), buf_rectfill_area(), eyedropper_color_sample_fl(), eyedropper_init(), and paint_brush_color_get().
| void IMB_colormanagement_finish_glsl_draw | ( | void | ) |
Definition at line 4136 of file colormanagement.c.
References global_gpu_state::gpu_shader_bound, and OCIO_gpuDisplayShaderUnbind().
Referenced by draw_display_buffer(), ED_draw_imbuf_clipping(), gpu_viewport_draw_colormanaged(), and sequencer_draw_display_buffer().
| const char* IMB_colormanagement_get_display_colorspace_name | ( | const struct ColorManagedViewSettings * | view_settings, |
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
| const char* IMB_colormanagement_get_float_colorspace | ( | struct ImBuf * | ibuf | ) |
Definition at line 1352 of file colormanagement.c.
References COLOR_ROLE_SCENE_LINEAR, ImBuf::float_colorspace, IMB_colormanagement_role_colorspace_name_get(), and ColorSpace::name.
Referenced by IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), and write_internal_bake_pixels().
| BLI_INLINE float IMB_colormanagement_get_luminance | ( | const float | rgb[3] | ) |
Definition at line 41 of file colormanagement_inline.c.
References dot_v3v3(), and imbuf_luma_coefficients.
Referenced by BKE_histogram_update_sample_line(), blender::compositor::CalculateMeanOperation::calculateMean(), do_projectpaint_soften(), do_projectpaint_soften_f(), blender::compositor::SMAAEdgeDetectionOperation::executePixel(), blender::compositor::PhotoreceptorTonemapOperation::executePixel(), blender::compositor::ColorCorrectionOperation::executePixelSampled(), blender::compositor::ConvertColorToBWOperation::executePixelSampled(), blender::compositor::GlareThresholdOperation::executePixelSampled(), blender::compositor::LuminanceMatteOperation::executePixelSampled(), IMB_color_to_bw(), imb_savepng(), blender::compositor::CalculateStandardDeviationOperation::initializeTileData(), blender::compositor::TonemapOperation::initializeTileData(), make_waveform_view_from_ibuf_float(), node_shader_exec_rgbtobw(), paint_2d_lift_soften(), RE_texture_evaluate(), rgbtobw_valuefn(), scopes_update_cb(), tonemapmodifier_apply(), tonemapmodifier_apply_threaded_photoreceptor(), and ui_draw_but_CURVE().
| BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte | ( | const unsigned char | rgb[3] | ) |
Definition at line 47 of file colormanagement_inline.c.
References dot_v3v3(), imbuf_luma_coefficients, rgb_uchar_to_float(), and unit_float_to_uchar_clamp().
Referenced by BKE_histogram_update_sample_line(), IMB_color_to_bw(), make_waveform_view_from_ibuf_byte(), mcol_darken(), and mcol_lighten().
| const char* IMB_colormanagement_get_rect_colorspace | ( | struct ImBuf * | ibuf | ) |
Definition at line 1361 of file colormanagement.c.
References COLOR_ROLE_DEFAULT_BYTE, IMB_colormanagement_role_colorspace_name_get(), ColorSpace::name, and ImBuf::rect_colorspace.
Referenced by IMB_colormanagegent_copy_settings(), seq_disk_cache_add_header_entry(), seq_imbuf_to_sequencer_space(), write_external_bake_pixels(), and write_internal_bake_pixels().
| struct ImBuf* IMB_colormanagement_imbuf_for_write | ( | struct ImBuf * | ibuf, |
| bool | save_as_render, | ||
| bool | allocate_result, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| struct ImageFormatData * | image_format_data | ||
| ) |
| void IMB_colormanagement_imbuf_make_display_space | ( | struct ImBuf * | ibuf, |
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
Referenced by sequencer_get_scope(), and sequencer_make_scope().
| void IMB_colormanagement_imbuf_to_byte_texture | ( | unsigned char * | out_buffer, |
| const int | x, | ||
| const int | y, | ||
| const int | width, | ||
| const int | height, | ||
| const struct ImBuf * | ibuf, | ||
| const bool | compress_as_srgb, | ||
| const bool | store_premultiplied | ||
| ) |
Definition at line 2202 of file colormanagement.c.
References BLI_assert, colorspace_to_scene_linear_cpu_processor(), height, if(), IMB_alpha_affects_rgb(), IMB_colormanagement_space_is_srgb(), linearrgb_to_srgb_v3_v3(), mul_v3_fl(), NULL, OCIO_cpuProcessorApplyRGB(), ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, rgba_float_to_uchar(), rgba_uchar_to_float(), width, x, ImBuf::x, and y.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_data().
| void IMB_colormanagement_imbuf_to_float_texture | ( | float * | out_buffer, |
| const int | offset_x, | ||
| const int | offset_y, | ||
| const int | width, | ||
| const int | height, | ||
| const struct ImBuf * | ibuf, | ||
| const bool | store_premultiplied | ||
| ) |
Definition at line 2266 of file colormanagement.c.
References ImBuf::channels, height, if(), IMB_alpha_affects_rgb(), premul_to_straight_v4_v4(), ImBuf::rect_float, width, x, ImBuf::x, and y.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_data().
| void IMB_colormanagement_init_default_view_settings | ( | struct ColorManagedViewSettings * | view_settings, |
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
Referenced by BKE_color_managed_view_settings_init_default(), and wm_main_playanim_intern().
| const char* IMB_colormanagement_look_get_indexed_name | ( | int | index | ) |
Definition at line 3250 of file colormanagement.c.
References colormanage_look_get_indexed(), ColorManagedLook::name, and NULL.
| int IMB_colormanagement_look_get_named_index | ( | const char * | name | ) |
Definition at line 3237 of file colormanagement.c.
References colormanage_look_get_named(), and ColorManagedLook::index.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_look_items_add | ( | struct EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | view_name | ||
| ) |
Definition at line 3319 of file colormanagement.c.
References colormanage_compatible_look(), EnumPropertyItem::description, ListBase::first, global_looks, EnumPropertyItem::icon, EnumPropertyItem::identifier, ColorManagedLook::index, ColorManagedLook::name, EnumPropertyItem::name, ColorManagedLook::next, RNA_enum_item_add(), ColorManagedLook::ui_name, and EnumPropertyItem::value.
| void IMB_colormanagement_pixel_to_display_space_v3 | ( | float | result[3], |
| const float | pixel[3], | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
| void IMB_colormanagement_pixel_to_display_space_v4 | ( | float | result[4], |
| const float | pixel[4], | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings | ||
| ) |
Referenced by ED_image_draw_info().
| void IMB_colormanagement_processor_apply | ( | struct ColormanageProcessor * | cm_processor, |
| float * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | predivide | ||
| ) |
Definition at line 3867 of file colormanagement.c.
References buffer, ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), height, OCIO_cpuProcessorApply(), OCIO_cpuProcessorApply_predivide(), OCIO_createOCIO_PackedImageDesc(), OCIO_PackedImageDescRelease(), width, x, and y.
Referenced by colormanagement_transform_ex(), do_display_buffer_apply_thread(), do_processor_transform_thread(), and IMB_display_buffer_transform_apply().
| void IMB_colormanagement_processor_apply_byte | ( | struct ColormanageProcessor * | cm_processor, |
| unsigned char * | buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels | ||
| ) |
Definition at line 3910 of file colormanagement.c.
References BLI_assert, buffer, height, IMB_colormanagement_processor_apply_v4(), rgba_float_to_uchar(), rgba_uchar_to_float(), width, x, and y.
Referenced by colormanagement_transform_ex(), and do_processor_transform_thread().
| void IMB_colormanagement_processor_apply_pixel | ( | struct ColormanageProcessor * | cm_processor, |
| float * | pixel, | ||
| int | channels | ||
| ) |
Definition at line 3846 of file colormanagement.c.
References BLI_assert, ColormanageProcessor::curve_mapping, curve_mapping_apply_pixel(), IMB_colormanagement_processor_apply_v3(), and IMB_colormanagement_processor_apply_v4_predivide().
Referenced by partial_buffer_update_rect().
| void IMB_colormanagement_processor_apply_v3 | ( | struct ColormanageProcessor * | cm_processor, |
| float | pixel[3] | ||
| ) |
Definition at line 3835 of file colormanagement.c.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGB().
Referenced by BKE_histogram_update_sample_line(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_processor_apply_pixel(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4 | ( | struct ColormanageProcessor * | cm_processor, |
| float | pixel[4] | ||
| ) |
Definition at line 3812 of file colormanagement.c.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGBA().
Referenced by BKE_histogram_update_sample_line(), blender::compositor::PreviewOperation::executeRegion(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_processor_apply_byte(), IMB_colormanagement_transform_v4(), and scopes_update_cb().
| void IMB_colormanagement_processor_apply_v4_predivide | ( | struct ColormanageProcessor * | cm_processor, |
| float | pixel[4] | ||
| ) |
Definition at line 3823 of file colormanagement.c.
References BKE_curvemapping_evaluate_premulRGBF(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, and OCIO_cpuProcessorApplyRGBA_predivide().
Referenced by IMB_colormanagement_processor_apply_pixel().
| void IMB_colormanagement_processor_free | ( | struct ColormanageProcessor * | cm_processor | ) |
Definition at line 3928 of file colormanagement.c.
References BKE_curvemapping_free(), ColormanageProcessor::cpu_processor, ColormanageProcessor::curve_mapping, MEM_freeN, and OCIO_cpuProcessorRelease().
Referenced by BKE_histogram_update_sample_line(), BKE_scopes_update(), colormanage_display_buffer_process_ex(), colormanagement_transform_ex(), blender::compositor::PreviewOperation::executeRegion(), IMB_colormanagement_buffer_make_display_space(), IMB_colormanagement_pixel_to_display_space_v3(), IMB_colormanagement_pixel_to_display_space_v4(), IMB_colormanagement_transform_from_byte_threaded(), IMB_colormanagement_transform_v4(), IMB_display_buffer_transform_apply(), and imb_partial_display_buffer_update_ex().
| const char* IMB_colormanagement_role_colorspace_name_get | ( | int | role | ) |
Definition at line 1269 of file colormanagement.c.
References BLI_assert, COLOR_ROLE_COLOR_PICKING, COLOR_ROLE_DATA, COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, COLOR_ROLE_DEFAULT_SEQUENCER, COLOR_ROLE_SCENE_LINEAR, COLOR_ROLE_TEXTURE_PAINTING, global_role_color_picking, global_role_data, global_role_default_byte, global_role_default_float, global_role_default_sequencer, global_role_scene_linear, global_role_texture_painting, and NULL.
Referenced by add_ibuf_size(), BKE_image_add_generated(), colormanage_colorspace_get_roled(), colorspace_set_default_role(), image_get_render_result(), image_node_colorspace(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_get_float_colorspace(), IMB_colormanagement_get_rect_colorspace(), IMB_rect_from_float(), render_result_new_from_exr(), scene_init_data(), seq_add_set_view_transform(), SEQ_render_imbuf_from_sequencer_space(), SEQ_render_pixel_from_sequencer_space_v4(), wm_main_playanim_intern(), write_external_bake_pixels(), and write_internal_bake_pixels().
| void IMB_colormanagement_scene_linear_to_color_picking_v3 | ( | float | pixel[3] | ) |
Definition at line 2326 of file colormanagement.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), global_color_picking_state::cpu_processor_to, create_colorspace_transform_processor(), global_color_picking_state::failed, global_role_color_picking, global_role_scene_linear, NULL, OCIO_cpuProcessorApplyRGB(), OCIO_processorGetCPUProcessor(), OCIO_processorRelease(), and processor_lock.
Referenced by ui_scene_linear_to_perceptual_space().
| void IMB_colormanagement_scene_linear_to_colorspace_v3 | ( | float | pixel[3], |
| struct ColorSpace * | colorspace | ||
| ) |
Definition at line 2122 of file colormanagement.c.
References colorspace_from_scene_linear_cpu_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by tonemapmodifier_apply_threaded_photoreceptor(), and tonemapmodifier_apply_threaded_simple().
| void IMB_colormanagement_scene_linear_to_display_v3 | ( | float | pixel[3], |
| struct ColorManagedDisplay * | display | ||
| ) |
Definition at line 2400 of file colormanagement.c.
References display_from_scene_linear_processor(), NULL, and OCIO_cpuProcessorApplyRGB().
Referenced by brush_painter_imbuf_new(), brush_painter_imbuf_update(), eyedropper_color_set(), eyedropper_gpencil_color_set(), ui_block_cm_to_display_space_v3(), ui_draw_but_COLORBAND(), and ui_draw_colorband_handle().
| void IMB_colormanagement_scene_linear_to_srgb_v3 | ( | float | pixel[3] | ) |
Definition at line 2382 of file colormanagement.c.
References imbuf_rgb_to_xyz, imbuf_xyz_to_linear_srgb, linearrgb_to_srgb_v3_v3(), and mul_m3_v3().
Referenced by drop_color_invoke(), paint_brush_color_get(), sculpt_sample_color_invoke(), ui_block_colorpicker(), ui_do_but_COLOR(), and ui_update_color_picker_buts_rgb().
| bool IMB_colormanagement_setup_glsl_draw | ( | const struct ColorManagedViewSettings * | view_settings, |
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| float | dither, | ||
| bool | predivide | ||
| ) |
Referenced by ED_draw_imbuf_clipping(), and ocio_transform_ibuf().
| bool IMB_colormanagement_setup_glsl_draw_ctx | ( | const struct bContext * | C, |
| float | dither, | ||
| bool | predivide | ||
| ) |
Referenced by sequencer_OCIO_transform_ibuf().
| bool IMB_colormanagement_setup_glsl_draw_from_space | ( | const struct ColorManagedViewSettings * | view_settings, |
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| struct ColorSpace * | colorspace, | ||
| float | dither, | ||
| bool | predivide, | ||
| bool | do_overlay_merge | ||
| ) |
Referenced by ED_draw_imbuf_clipping(), gpu_viewport_draw_colormanaged(), and ocio_transform_ibuf().
| bool IMB_colormanagement_setup_glsl_draw_from_space_ctx | ( | const struct bContext * | C, |
| struct ColorSpace * | colorspace, | ||
| float | dither, | ||
| bool | predivide | ||
| ) |
Referenced by sequencer_OCIO_transform_ibuf().
| bool IMB_colormanagement_space_is_data | ( | struct ColorSpace * | colorspace | ) |
Definition at line 1370 of file colormanagement.c.
References ColorSpace::is_data.
Referenced by gpu_texture_update_from_ibuf(), imb_gpu_get_data(), and imb_gpu_get_format().
| bool IMB_colormanagement_space_is_scene_linear | ( | struct ColorSpace * | colorspace | ) |
Definition at line 1394 of file colormanagement.c.
References colormanage_ensure_srgb_scene_linear_info(), ColorSpace::info, and ColorSpace::is_scene_linear.
Referenced by gpu_texture_update_from_ibuf(), and imb_gpu_get_format().
| bool IMB_colormanagement_space_is_srgb | ( | struct ColorSpace * | colorspace | ) |
Definition at line 1400 of file colormanagement.c.
References colormanage_ensure_srgb_scene_linear_info(), ColorSpace::info, and ColorSpace::is_srgb.
Referenced by IMB_colormanagement_imbuf_to_byte_texture().
| bool IMB_colormanagement_space_name_is_data | ( | const char * | name | ) |
Definition at line 1406 of file colormanagement.c.
References colormanage_colorspace_get_named(), and ColorSpace::is_data.
Referenced by add_ibuf_size(), imb_handle_alpha(), node_shader_gpu_tex_environment(), node_shader_gpu_tex_image(), and uiTemplateImage().
| void IMB_colormanagement_srgb_to_scene_linear_v3 | ( | float | pixel[3] | ) |
Definition at line 2389 of file colormanagement.c.
References imbuf_linear_srgb_to_xyz, imbuf_xyz_to_rgb, mul_m3_v3(), and srgb_to_linearrgb_v3_v3().
Referenced by do_paint_brush_task_cb_ex(), drop_color_invoke(), sculpt_color_filter_modal(), sculpt_expand_cache_initial_config_set(), ui_colorpicker_hex_rna_cb(), and ui_do_but_COLOR().
| bool IMB_colormanagement_support_glsl_draw | ( | const struct ColorManagedViewSettings * | view_settings | ) |
Referenced by screen_render_invoke().
| void IMB_colormanagement_transform | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide | ||
| ) |
Definition at line 1972 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
Referenced by colormanage_imbuf_make_linear(), display_buffer_apply_get_linear_buffer(), IMB_colormanagement_transform_from_byte(), IMB_rect_from_float(), render_result_new_from_exr(), write_external_bake_pixels(), and write_internal_bake_pixels().
| void IMB_colormanagement_transform_byte | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2000 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
| void IMB_colormanagement_transform_byte_threaded | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2010 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
Referenced by seq_imbuf_to_sequencer_space().
| void IMB_colormanagement_transform_from_byte | ( | float * | float_buffer, |
| unsigned char * | byte_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2022 of file colormanagement.c.
References height, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_transform(), and width.
| void IMB_colormanagement_transform_from_byte_threaded | ( | float * | float_buffer, |
| unsigned char * | byte_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2042 of file colormanagement.c.
References height, IB_PROFILE_SRGB, IMB_buffer_float_from_byte(), IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_free(), IMB_premultiply_rect_float(), NULL, processor_transform_apply_threaded(), STREQ, and width.
Referenced by seq_imbuf_to_sequencer_space().
| void IMB_colormanagement_transform_threaded | ( | float * | buffer, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const char * | from_colorspace, | ||
| const char * | to_colorspace, | ||
| bool | predivide | ||
| ) |
Definition at line 1987 of file colormanagement.c.
References buffer, colormanagement_transform_ex(), height, NULL, and width.
Referenced by seq_imbuf_to_sequencer_space(), and SEQ_render_imbuf_from_sequencer_space().
| void IMB_colormanagement_transform_v4 | ( | float | pixel[4], |
| const char * | from_colorspace, | ||
| const char * | to_colorspace | ||
| ) |
Definition at line 2077 of file colormanagement.c.
References IMB_colormanagement_colorspace_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), and STREQ.
Referenced by SEQ_render_pixel_from_sequencer_space_v4().
| void IMB_colormanagement_validate_settings | ( | const struct ColorManagedDisplaySettings * | display_settings, |
| struct ColorManagedViewSettings * | view_settings | ||
| ) |
Referenced by BKE_color_managed_view_settings_init_render().
| const char* IMB_colormanagement_view_get_default_name | ( | const char * | display_name | ) |
Definition at line 3025 of file colormanagement.c.
References colormanage_display_get_named(), colormanage_view_get_default(), NULL, and view.
Referenced by BKE_scene_disable_color_management().
| const char* IMB_colormanagement_view_get_indexed_name | ( | int | index | ) |
Definition at line 3014 of file colormanagement.c.
References colormanage_view_get_indexed(), NULL, and view.
| int IMB_colormanagement_view_get_named_index | ( | const char * | name | ) |
Definition at line 3003 of file colormanagement.c.
References colormanage_view_get_named(), and view.
Referenced by colormanage_view_settings_to_cache().
| void IMB_colormanagement_view_items_add | ( | struct EnumPropertyItem ** | items, |
| int * | totitem, | ||
| const char * | display_name | ||
| ) |
Definition at line 3301 of file colormanagement.c.
References colormanage_display_get_named(), colormanagement_view_item_add(), LinkData::data, ListBase::first, LinkData::next, view, and ColorManagedDisplay::views.
| const float* IMB_colormangement_get_xyz_to_rgb | ( | void | ) |
Definition at line 1412 of file colormanagement.c.
References imbuf_xyz_to_rgb.
Referenced by get_XYZ_to_RGB_for_gpu().
| BLI_INLINE void IMB_colormangement_rgb_to_xyz | ( | float | xyz[3], |
| const float | rgb[3] | ||
| ) |
Definition at line 63 of file colormanagement_inline.c.
References imbuf_rgb_to_xyz, and mul_v3_m3v3().
| BLI_INLINE void IMB_colormangement_xyz_to_rgb | ( | float | rgb[3], |
| const float | xyz[3] | ||
| ) |
Definition at line 58 of file colormanagement_inline.c.
References imbuf_xyz_to_rgb, and mul_v3_m3v3().
| unsigned char* IMB_display_buffer_acquire | ( | struct ImBuf * | ibuf, |
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| void ** | cache_handle | ||
| ) |
Referenced by BKE_scopes_update(), draw_image_buffer(), draw_plane_marker_image(), ED_draw_imbuf_clipping(), and ocio_transform_ibuf().
| unsigned char* IMB_display_buffer_acquire_ctx | ( | const struct bContext * | C, |
| struct ImBuf * | ibuf, | ||
| void ** | cache_handle | ||
| ) |
Referenced by sequencer_OCIO_transform_ibuf().
| void IMB_display_buffer_release | ( | void * | cache_handle | ) |
Definition at line 2788 of file colormanagement.c.
References BLI_thread_lock(), BLI_thread_unlock(), colormanage_cache_handle_release(), and LOCK_COLORMANAGE.
Referenced by BKE_scopes_update(), draw_display_buffer(), draw_image_buffer(), draw_plane_marker_image(), ED_draw_imbuf_clipping(), imb_partial_display_buffer_update_ex(), and sequencer_draw_display_buffer().
| void IMB_display_buffer_transform_apply | ( | unsigned char * | display_buffer, |
| float * | linear_buffer, | ||
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| bool | predivide | ||
| ) |
Referenced by render_result_rect_get_pixels().
| void IMB_partial_display_buffer_update | ( | struct ImBuf * | ibuf, |
| const float * | linear_buffer, | ||
| const unsigned char * | byte_buffer, | ||
| int | stride, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax | ||
| ) |
Referenced by image_buffer_rect_update().
| void IMB_partial_display_buffer_update_delayed | ( | struct ImBuf * | ibuf, |
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax | ||
| ) |
Definition at line 3733 of file colormanagement.c.
References BLI_rcti_init(), BLI_rcti_union(), ImBuf::invalid_rect, rcti::xmax, and rcti::xmin.
Referenced by imapaint_image_update().
| void IMB_partial_display_buffer_update_threaded | ( | struct ImBuf * | ibuf, |
| const float * | linear_buffer, | ||
| const unsigned char * | byte_buffer, | ||
| int | stride, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| const struct ColorManagedViewSettings * | view_settings, | ||
| const struct ColorManagedDisplaySettings * | display_settings, | ||
| int | xmin, | ||
| int | ymin, | ||
| int | xmax, | ||
| int | ymax | ||
| ) |
Definition at line 3701 of file colormanagement.c.
References height, imb_partial_display_buffer_update_ex(), stride, and width.
Referenced by IMB_display_buffer_acquire().