|
Blender V5.3
|
Namespaces | |
| namespace | internal |
Classes | |
| class | ColorSpace |
| class | Config |
| class | CPUProcessor |
| class | CPUProcessorCache |
| class | Display |
| struct | DisplayParameters |
| struct | GPUDisplayParameters |
| class | GPUShaderBinder |
| class | LibOCIOColorSpace |
| class | LibOCIOConfig |
| class | LibOCIOCPUProcessor |
| class | LibOCIODisplay |
| class | LibOCIOGPUShaderBinder |
| class | LibOCIOLook |
| class | LibOCIOView |
| class | Look |
| class | ocio_fallback_config |
| class | PackedImage |
| struct | ScopeGraticule |
| struct | ScopeInfo |
| struct | Version |
| class | View |
Enumerations | |
| enum class | BitDepth { BIT_DEPTH_UNKNOWN , BIT_DEPTH_F32 } |
| enum class | Gamut { Unknown , Rec709 , P3D65 , Rec2020 } |
| enum class | TransferFunction { Unknown , sRGB , ExtendedsRGB , Gamma18 , Gamma22 , Gamma24 , Gamma26 , PQ , HLG } |
Functions | |
| std::string | cleanup_description (const StringRef description) |
| TEST (ocio_description, cleanup_description) | |
| void | report_exception (const OCIO_NAMESPACE::Exception &exception) |
| void | report_error (const StringRefNull error) |
| static OCIO_NAMESPACE::ConstColorSpaceRcPtr | get_display_view_colorspace (const OCIO_NAMESPACE::ConstConfigRcPtr &ocio_config, const char *display, const char *view) |
| static TransferFunction | system_extended_srgb_transfer_function (const LibOCIOView *view, const bool use_hdr_buffer) |
| static OCIO_NAMESPACE::TransformRcPtr | create_extended_srgb_transform (const TransferFunction transfer_function) |
| static void | adjust_for_hdr_image_file (const LibOCIOConfig &config, OCIO_NAMESPACE::GroupTransformRcPtr &group, StringRefNull display_name, StringRefNull view_name) |
| static void | display_as_scope_space (const LibOCIOConfig &config, OCIO_NAMESPACE::GroupTransformRcPtr &group, StringRefNull display_name, StringRefNull view_name) |
| static void | display_as_extended_srgb (const LibOCIOConfig &config, OCIO_NAMESPACE::GroupTransformRcPtr &group, StringRefNull display_name, StringRefNull view_name, const bool use_hdr_buffer) |
| OCIO_NAMESPACE::TransformRcPtr | create_ocio_display_transform (const OCIO_NAMESPACE::ConstConfigRcPtr &ocio_config, StringRefNull display, StringRefNull view, StringRefNull look, StringRefNull from_colorspace) |
| static OCIO_NAMESPACE::TransformRcPtr | create_untonemapped_ocio_display_transform (const LibOCIOConfig &config, StringRefNull display_name, StringRefNull from_colorspace, bool use_hdr_buffer) |
| OCIO_NAMESPACE::ConstProcessorRcPtr | create_ocio_display_processor (const LibOCIOConfig &config, const DisplayParameters &display_parameters) |
| TEST_F (ocio_fallback_config, loads_and_validates) | |
| OCIO_NAMESPACE::ConstProcessorRcPtr | create_ocio_processor (const OCIO_NAMESPACE::ConstConfigRcPtr &ocio_config, const StringRefNull from_colorspace, const StringRefNull to_colorspace) |
| OCIO_NAMESPACE::ConstProcessorRcPtr | create_ocio_processor_silent (const OCIO_NAMESPACE::ConstConfigRcPtr &ocio_config, const StringRefNull from_colorspace, const StringRefNull to_colorspace) |
| OCIO_NAMESPACE::ConstProcessorRcPtr | create_ocio_processor_between_configs (const OCIO_NAMESPACE::ConstConfigRcPtr &from_config, const StringRefNull from_colorspace, const OCIO_NAMESPACE::ConstConfigRcPtr &to_config, const StringRefNull to_colorspace) |
| static float | linear_to_srgb (const float linear) |
| static float | nits_to_scope_value (const float nits) |
| void | source_comment_out_uniforms (std::string &source) |
| TEST (ocio_source_processor, source_comment_out_uniforms) | |
| Version | get_version () |
| bool | split_view_specific_look (const StringRef look_name, StringRef &view, StringRef &ui_name) |
| TEST (ocio_view_look, split_view_specific_look) | |
| float3x3 | calculate_white_point_matrix (const Config &config, const float temperature, const float tint) |
| StringRef | interop_id_drop_namespace (const StringRef interop_id) |
Color space information | |
| static bool | to_scene_linear_matrix (const OCIO_NAMESPACE::ConstConfigRcPtr &ocio_config, const StringRefNull colorspace, float3x3 &to_scene_linear) |
Variables | |
| static CLG_LogRef | LOG = {"color_management"} |
| static CLG_LogRef | LOG = {"color_management"} |
| static const char * | fallback_config_source |
| static constexpr float | SCOPE_SDR_IN_HDR_SCOPE = 0.75f |
| static constexpr float | SCOPE_HDR_MAX_NITS = 10000.0f |
| static constexpr float | SCOPE_SDR_WHITE_NITS = 100.0f |
| static constexpr float | SCOPE_MAX_LINEAR = SCOPE_HDR_MAX_NITS / SCOPE_SDR_WHITE_NITS |
| static constexpr float | SCOPE_SRGB_A = 1.055f |
| static constexpr float | SCOPE_SRGB_B = 0.055f |
| static constexpr float | SCOPE_SRGB_GAMMA = 2.4f |
| static constexpr float | SCOPE_HDR_B = 0.0368291f |
| static constexpr float | SCOPE_HDR_C = 0.8882908f |
| static constexpr float | SCOPE_HDR_D = 0.8307242f |
| static const float3x3 | XYZ_TO_REC709 |
| static const float3x3 | XYZ_TO_REC2020 |
| static const float3x3 | ACES_TO_XYZ |
| static const float3x3 | ACESCG_TO_XYZ |
| static const double4x4 | OCIO_XYZ_TO_REC709 |
| static const double4x4 | OCIO_XYZ_TO_P3 |
| static const double4x4 | OCIO_XYZ_TO_REC2020 |
|
strong |
| Enumerator | |
|---|---|
| BIT_DEPTH_UNKNOWN | |
| BIT_DEPTH_F32 | |
Definition at line 15 of file OCIO_packed_image.hh.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Rec709 | |
| P3D65 | |
| Rec2020 | |
Definition at line 14 of file OCIO_view.hh.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| sRGB | |
| ExtendedsRGB | |
| Gamma18 | |
| Gamma22 | |
| Gamma24 | |
| Gamma26 | |
| PQ | |
| HLG | |
Definition at line 21 of file OCIO_view.hh.
|
static |
Definition at line 97 of file libocio_display_processor.cc.
References adjust_for_hdr_image_file(), blender::StringRefNull::c_str(), blender::ocio::LibOCIOView::display_colorspace(), ELEM, blender::ocio::LibOCIOConfig::get_color_space_for_hdr_image(), blender::ocio::LibOCIOConfig::get_display_by_name(), blender::ocio::LibOCIODisplay::get_view_by_name(), blender::ocio::LibOCIOColorSpace::is_display_referred(), blender::ocio::ColorSpace::name(), and blender::ocio::LibOCIOColorSpace::name().
Referenced by adjust_for_hdr_image_file(), and create_ocio_display_processor().
| float3x3 blender::ocio::calculate_white_point_matrix | ( | const Config & | config, |
| const float | temperature, | ||
| const float | tint ) |
Definition at line 14 of file white_point.cc.
References calculate_white_point_matrix(), blender::math::chromatic_adaption_matrix(), blender::ocio::Config::get_xyz_to_scene_linear_matrix(), blender::math::invert(), and blender::math::whitepoint_from_temp_tint().
Referenced by calculate_white_point_matrix(), and create_ocio_display_processor().
| std::string blender::ocio::cleanup_description | ( | StringRef | description | ) |
Cleanup description making it possible to easily show in the interface as a tooltip.
This includes:
Definition at line 11 of file description.cc.
References cleanup_description(), ELEM, blender::blender::StringRefBase::is_empty(), blender::result, and blender::blender::StringRefBase::trim().
Referenced by cleanup_description(), blender::ocio::LibOCIOColorSpace::LibOCIOColorSpace(), and TEST().
|
static |
Definition at line 74 of file libocio_display_processor.cc.
References create_extended_srgb_transform(), and sRGB.
Referenced by create_extended_srgb_transform(), create_untonemapped_ocio_display_transform(), and display_as_extended_srgb().
| OCIO_NAMESPACE::ConstProcessorRcPtr blender::ocio::create_ocio_display_processor | ( | const LibOCIOConfig & | config, |
| const DisplayParameters & | display_parameters ) |
Definition at line 469 of file libocio_display_processor.cc.
References adjust_for_hdr_image_file(), blender::StringRefNull::c_str(), calculate_white_point_matrix(), CLG_LEVEL_TRACE, CLOG_CHECK, CLOG_TRACE, create_ocio_display_processor(), create_ocio_display_transform(), create_untonemapped_ocio_display_transform(), blender::ocio::DisplayParameters::display, display_as_extended_srgb(), display_as_scope_space(), blender::ocio::DisplayParameters::exponent, blender::ocio::DisplayParameters::from_colorspace, blender::ocio::LibOCIOConfig::get_ocio_config(), blender::MatBase< float, 3, 3 >::identity(), blender::ocio::DisplayParameters::inverse, blender::blender::StringRefBase::is_empty(), blender::ocio::DisplayParameters::is_image_output, LOG, blender::ocio::DisplayParameters::look, report_exception(), blender::ocio::DisplayParameters::scale, blender::ocio::DisplayParameters::temperature, blender::ocio::DisplayParameters::tint, blender::math::transpose(), blender::ocio::DisplayParameters::use_display_emulation, blender::ocio::DisplayParameters::use_hdr_buffer, blender::ocio::DisplayParameters::use_scope_space, blender::ocio::DisplayParameters::use_white_balance, and blender::ocio::DisplayParameters::view.
Referenced by create_ocio_display_processor(), blender::ocio::LibOCIODisplay::create_scene_linear_cpu_processor(), and blender::ocio::LibOCIOConfig::get_display_cpu_processor().
| OCIO_NAMESPACE::TransformRcPtr blender::ocio::create_ocio_display_transform | ( | const OCIO_NAMESPACE::ConstConfigRcPtr & | ocio_config, |
| StringRefNull | display, | ||
| StringRefNull | view, | ||
| StringRefNull | look, | ||
| StringRefNull | from_colorspace ) |
Definition at line 374 of file libocio_display_processor.cc.
References blender::StringRefNull::c_str(), create_ocio_display_transform(), and report_exception().
Referenced by create_ocio_display_processor(), create_ocio_display_transform(), and blender::compositor::OCIOToDisplayShader::OCIOToDisplayShader().
| OCIO_NAMESPACE::ConstProcessorRcPtr blender::ocio::create_ocio_processor | ( | const OCIO_NAMESPACE::ConstConfigRcPtr & | ocio_config, |
| StringRefNull | from_colorspace, | ||
| StringRefNull | to_colorspace ) |
Create OpenColorIO processor between color spaces. If the processor can not be created returns nullptr.
The silent version does not print any errors if the processor creation has failed.
Definition at line 11 of file libocio_processor.cc.
References blender::StringRefNull::c_str(), create_ocio_processor(), and report_exception().
Referenced by create_ocio_processor(), blender::ocio::LibOCIOConfig::get_cpu_processor(), blender::ocio::LibOCIOColorSpace::get_from_scene_linear_cpu_processor(), blender::ocio::LibOCIOColorSpace::get_to_scene_linear_cpu_processor(), and to_scene_linear_matrix().
| OCIO_NAMESPACE::ConstProcessorRcPtr blender::ocio::create_ocio_processor_between_configs | ( | const OCIO_NAMESPACE::ConstConfigRcPtr & | from_config, |
| StringRefNull | from_colorspace, | ||
| const OCIO_NAMESPACE::ConstConfigRcPtr & | to_config, | ||
| StringRefNull | to_colorspace ) |
Create OpenColorIO processor that converts between color spaces in different configs, through standard interchange roles. If the processor can not be created returns nullptr.
Definition at line 43 of file libocio_processor.cc.
References blender::StringRefNull::c_str(), and create_ocio_processor_between_configs().
Referenced by create_ocio_processor_between_configs(), blender::ocio::LibOCIOColorSpace::get_from_scene_linear_cpu_processor(), and blender::ocio::LibOCIOColorSpace::get_to_scene_linear_cpu_processor().
| OCIO_NAMESPACE::ConstProcessorRcPtr blender::ocio::create_ocio_processor_silent | ( | const OCIO_NAMESPACE::ConstConfigRcPtr & | ocio_config, |
| const StringRefNull | from_colorspace, | ||
| const StringRefNull | to_colorspace ) |
Definition at line 27 of file libocio_processor.cc.
References blender::StringRefNull::c_str(), and create_ocio_processor_silent().
Referenced by create_ocio_processor_silent().
|
static |
Definition at line 441 of file libocio_display_processor.cc.
References blender::StringRefNull::c_str(), create_extended_srgb_transform(), create_untonemapped_ocio_display_transform(), blender::ocio::LibOCIOConfig::get_display_by_name(), blender::ocio::LibOCIODisplay::get_untonemapped_view(), blender::colorspace::scene_linear_to_rec709, system_extended_srgb_transfer_function(), blender::color::to_scene_linear(), and blender::math::transpose().
Referenced by create_ocio_display_processor(), and create_untonemapped_ocio_display_transform().
|
static |
Definition at line 171 of file libocio_display_processor.cc.
References blender::StringRefNull::c_str(), clamp(), CLOG_DEBUG, CLOG_WARN, create_extended_srgb_transform(), display_as_extended_srgb(), blender::ocio::LibOCIOView::display_colorspace(), ExtendedsRGB, Gamma18, Gamma22, Gamma24, Gamma26, blender::ocio::LibOCIOView::gamut(), blender::ocio::LibOCIOConfig::get_color_space(), blender::ocio::LibOCIOConfig::get_display_by_name(), blender::ocio::LibOCIODisplay::get_view_by_name(), HLG, blender::math::invert(), blender::ocio::LibOCIOColorSpace::is_display_referred(), blender::ocio::LibOCIODisplay::is_hdr(), LOG, blender::ocio::LibOCIOColorSpace::name(), P3D65, PQ, Rec2020, Rec709, sRGB, system_extended_srgb_transfer_function(), blender::ocio::LibOCIOView::transfer_function(), blender::math::transpose(), and Unknown.
Referenced by create_ocio_display_processor(), and display_as_extended_srgb().
|
static |
Definition at line 127 of file libocio_display_processor.cc.
References blender::ocio::LibOCIOView::append_scope_space_transforms(), blender::StringRefNull::c_str(), CLOG_DEBUG, CLOG_WARN, display_as_scope_space(), blender::ocio::LibOCIOView::display_colorspace(), blender::ocio::LibOCIOConfig::get_color_space(), blender::ocio::LibOCIOConfig::get_display_by_name(), blender::ocio::LibOCIODisplay::get_view_by_name(), blender::ocio::LibOCIOColorSpace::is_data(), blender::ocio::LibOCIOColorSpace::is_display_referred(), LOG, and blender::ocio::LibOCIOColorSpace::name().
Referenced by create_ocio_display_processor(), and display_as_scope_space().
|
static |
Definition at line 27 of file libocio_display.cc.
References get_display_view_colorspace(), and STREQ.
Referenced by get_display_view_colorspace(), and blender::ocio::LibOCIODisplay::LibOCIODisplay().
| Version blender::ocio::get_version | ( | ) |
Get OpenColorIO library version. When compiled without OpenColorIO library returns {0, 0, 0}.
Definition at line 11 of file version.cc.
References get_version().
Referenced by get_version(), and blender::make_ocio_info().
Drop the namespace from an interop ID, so e.g. blender:g24_rec2020_display becomes g24_rec2020_display.
Definition at line 85 of file OCIO_colorspace.hh.
References blender::StringRef::drop_prefix(), blender::blender::StringRefBase::find(), interop_id_drop_namespace(), and blender::blender::StringRefBase::not_found.
Referenced by blender::IMB_colormanagement_space_to_icc_profile(), interop_id_drop_namespace(), and blender::ocio::LibOCIODisplay::LibOCIODisplay().
Convert linear value to sRGB using the sRGB OETF.
Definition at line 70 of file libocio_scope.cc.
References linear_to_srgb(), SCOPE_SRGB_A, SCOPE_SRGB_B, and SCOPE_SRGB_GAMMA.
Referenced by linear_to_srgb(), and nits_to_scope_value().
Convert a nit value to a scope space position using the piecewise HDR encoding.
Definition at line 79 of file libocio_scope.cc.
References linear_to_srgb(), nits_to_scope_value(), SCOPE_HDR_B, SCOPE_HDR_C, SCOPE_HDR_D, SCOPE_SDR_IN_HDR_SCOPE, and SCOPE_SDR_WHITE_NITS.
Referenced by blender::ocio::LibOCIOView::append_scope_space_transforms(), nits_to_scope_value(), and blender::ocio::LibOCIOView::scope_info().
| void blender::ocio::report_error | ( | const StringRefNull | error | ) |
Definition at line 20 of file error_handling.cc.
References blender::StringRefNull::c_str(), CLOG_ERROR, LOG, and report_error().
Referenced by blender::ocio::LibOCIOConfig::get_color_space(), blender::ocio::LibOCIODisplay::LibOCIODisplay(), and report_error().
| void blender::ocio::report_exception | ( | const OCIO_NAMESPACE::Exception & | exception | ) |
Definition at line 15 of file error_handling.cc.
References CLOG_ERROR, LOG, and report_exception().
Referenced by blender::ocio::LibOCIOCPUProcessor::apply(), blender::ocio::LibOCIOConfig::create_fallback(), blender::ocio::LibOCIOConfig::create_from_environment(), create_ocio_display_processor(), create_ocio_display_transform(), create_ocio_processor(), blender::ocio::LibOCIOConfig::get_color_space(), blender::ocio::LibOCIOConfig::get_default_luma_coefs(), blender::ocio::LibOCIOConfig::get_display_view_color_space(), blender::ocio::LibOCIOColorSpace::icc_profile_path(), and report_exception().
| void blender::ocio::source_comment_out_uniforms | ( | std::string & | source | ) |
Comment out all uniform statements. This avoids double declarations from the backend. This function modifies source in-place without adding extra characters. This means that statement like uniform vec3 pos; becomes //iform vec3 pos;.
Definition at line 9 of file source_processor.cc.
References source_comment_out_uniforms().
Referenced by source_comment_out_uniforms(), and TEST().
| bool blender::ocio::split_view_specific_look | ( | StringRef | look_name, |
| StringRef & | view, | ||
| StringRef & | ui_name ) |
Split the view-specific look name to a view name and look name for the interface.
Look is considered to be view-specific when it contains dash in its name. In this case the part of the look name is considered to be the name of the view the look is specific to.
If the look is not view-specific view is an empty string and ui name is the look name.
Returns true if the look name is view-specific.
Definition at line 9 of file view_specific_look.cc.
References blender::blender::StringRefBase::find(), split_view_specific_look(), and blender::blender::StringRefBase::substr().
Referenced by blender::ocio::LibOCIOLook::LibOCIOLook(), split_view_specific_look(), and TEST().
|
static |
Definition at line 29 of file libocio_display_processor.cc.
References Gamma22, blender::ocio::LibOCIOView::is_hdr(), sRGB, system_extended_srgb_transfer_function(), and UNUSED_VARS.
Referenced by create_untonemapped_ocio_display_transform(), display_as_extended_srgb(), and system_extended_srgb_transfer_function().
| blender::ocio::TEST | ( | ocio_description | , |
| cleanup_description | ) |
Definition at line 11 of file description_test.cc.
References cleanup_description(), blender::EXPECT_EQ(), and TEST().
| blender::ocio::TEST | ( | ocio_source_processor | , |
| source_comment_out_uniforms | ) |
Definition at line 11 of file source_processor_test.cc.
References blender::EXPECT_EQ(), source_comment_out_uniforms(), and TEST().
| blender::ocio::TEST | ( | ocio_view_look | , |
| split_view_specific_look | ) |
Definition at line 11 of file view_specific_look_test.cc.
References blender::EXPECT_EQ(), EXPECT_FALSE, EXPECT_TRUE, split_view_specific_look(), and TEST().
| blender::ocio::TEST_F | ( | ocio_fallback_config | , |
| loads_and_validates | ) |
Definition at line 28 of file libocio_fallback_config_test.cc.
References blender::ocio::Config::create_fallback(), blender::ocio::LibOCIOConfig::get_ocio_config(), and TEST_F().
Referenced by TEST_F().
|
static |
Definition at line 340 of file libocio_config.cc.
References create_ocio_processor(), blender::MatBase< float, 3, 3 >::identity(), blender::color::to_scene_linear(), and to_scene_linear_matrix().
Referenced by blender::ocio::LibOCIOConfig::get_xyz_to_scene_linear_matrix(), and to_scene_linear_matrix().
|
static |
Definition at line 28 of file OCIO_matrix.hh.
|
static |
Definition at line 34 of file OCIO_matrix.hh.
|
static |
Definition at line 16 of file libocio_fallback_config.cc.
Referenced by blender::ocio::LibOCIOConfig::create_fallback().
|
static |
Definition at line 13 of file error_handling.cc.
Referenced by create_ocio_display_processor(), display_as_extended_srgb(), display_as_scope_space(), report_error(), and report_exception().
|
static |
Definition at line 27 of file libocio_display_processor.cc.
|
static |
Definition at line 45 of file OCIO_matrix.hh.
|
static |
Definition at line 51 of file OCIO_matrix.hh.
|
static |
Definition at line 39 of file OCIO_matrix.hh.
|
staticconstexpr |
Constants for the HDR log curve: scope = b * ln(linear - c) + d, computed to ensure C1 continuity with the sRGB OETF at SCOPE_SDR_IN_HDR_SCOPE.
Definition at line 65 of file libocio_scope.cc.
Referenced by nits_to_scope_value().
|
staticconstexpr |
Definition at line 66 of file libocio_scope.cc.
Referenced by nits_to_scope_value().
|
staticconstexpr |
Definition at line 67 of file libocio_scope.cc.
Referenced by nits_to_scope_value().
|
staticconstexpr |
Maximum HDR luminance in nits that maps to scope value 1.0, same as PQ and beyond what any real world display can do.
Definition at line 45 of file libocio_scope.cc.
|
staticconstexpr |
Maximum linear light value (nits / SDR white nits). Linear 1.0 = 100 nits = SDR white, linear MAX_LINEAR = 10000 nits.
Definition at line 54 of file libocio_scope.cc.
Referenced by blender::ocio::LibOCIOView::append_scope_space_transforms().
|
staticconstexpr |
Scope space encoding constants for SDR and HDR displays.
For SDR we use the sRGB OETF to get something that is near perceptually linear. For HDR we use the same curve for SDR values for the first 75% of scope space, and then use log for the remaining 25% from 100 nits to 10000 nits.
The log curve is chosen such that the two pieces meet at 100 nits with C1 continuity.
Gamut is the same as the display space.
The reason to use this instead of display space for scopes is that it lets us design a curve allocates most space for SDR values. It also means the scope drawing shaders can have a hardcoded color space transforms and we don't need to insert arbitrary OCIO transforms into them. Scope value at 100 nits (SDR reference white) for HDR displays.
Definition at line 39 of file libocio_scope.cc.
Referenced by nits_to_scope_value(), and blender::ocio::LibOCIOView::scope_info().
|
staticconstexpr |
SDR reference white in nits.
Definition at line 48 of file libocio_scope.cc.
Referenced by blender::ocio::LibOCIOView::append_scope_space_transforms(), and nits_to_scope_value().
|
staticconstexpr |
Constants for the sRGB OETF used for the SDR portion of the scope encoding.
Definition at line 57 of file libocio_scope.cc.
Referenced by linear_to_srgb().
|
staticconstexpr |
Definition at line 58 of file libocio_scope.cc.
Referenced by blender::ocio::LibOCIOView::append_scope_space_transforms(), and linear_to_srgb().
|
staticconstexpr |
Definition at line 59 of file libocio_scope.cc.
Referenced by blender::ocio::LibOCIOView::append_scope_space_transforms(), and linear_to_srgb().
|
static |
Definition at line 22 of file OCIO_matrix.hh.
|
static |
Definition at line 15 of file OCIO_matrix.hh.