Blender V5.0
blender::ocio Namespace Reference

Namespaces

namespace  internal

Classes

class  CPUProcessorCache
class  FallbackColorSpace
class  FallbackConfig
class  FallbackNOOPCPUProcessor
class  FallbackCustomCPUProcessor
class  FallbackDefaultDisplay
class  FallbackDefaultLook
class  FallbackDefaultView
class  FallbackGPUShaderBinder
class  FallbackProcessorCache
class  ColorSpace
struct  DisplayParameters
class  Config
class  CPUProcessor
class  Display
struct  GPUDisplayParameters
class  GPUShaderBinder
class  Look
class  PackedImage
struct  Version
class  View

Typedefs

using FallbackLinearRGBToSRGBCPUProcessor = FallbackCustomCPUProcessor<linearrgb_to_srgb_v3_v3>
using FallbackSRGBToLinearRGBCPUProcessor = FallbackCustomCPUProcessor<srgb_to_linearrgb_v3_v3>

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)
std::shared_ptr< const CPUProcessorcreate_fallback_display_cpu_processor (const Config &config, const DisplayParameters &display_parameters)
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)

Variables

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

Typedef Documentation

◆ FallbackLinearRGBToSRGBCPUProcessor

◆ FallbackSRGBToLinearRGBCPUProcessor

Enumeration Type Documentation

◆ BitDepth

enum class blender::ocio::BitDepth
strong
Enumerator
BIT_DEPTH_UNKNOWN 
BIT_DEPTH_F32 

Definition at line 17 of file OCIO_packed_image.hh.

◆ Gamut

enum class blender::ocio::Gamut
strong
Enumerator
Unknown 
Rec709 
P3D65 
Rec2020 

Definition at line 13 of file OCIO_view.hh.

◆ TransferFunction

Enumerator
Unknown 
sRGB 
ExtendedsRGB 
Gamma18 
Gamma22 
Gamma24 
Gamma26 
PQ 
HLG 

Definition at line 20 of file OCIO_view.hh.

Function Documentation

◆ calculate_white_point_matrix()

float3x3 blender::ocio::calculate_white_point_matrix ( const Config & config,
const float temperature,
const float tint )

◆ cleanup_description()

std::string blender::ocio::cleanup_description ( StringRef description)

Cleanup description making it possible to easily show in the interface as a tooltip.

This includes:

  • Stripping all trailing line break character.
  • Replacing all inner line break character with space.

Definition at line 11 of file description.cc.

References ELEM, blender::StringRefBase::is_empty(), result, and blender::StringRefBase::trim().

Referenced by TEST().

◆ create_fallback_display_cpu_processor()

◆ get_version()

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.

Referenced by make_ocio_info().

◆ source_comment_out_uniforms()

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.

Referenced by TEST().

◆ split_view_specific_look()

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::StringRefBase::find(), blender::StringRefBase::substr(), and view.

Referenced by TEST().

◆ TEST() [1/3]

blender::ocio::TEST ( ocio_description ,
cleanup_description  )

Definition at line 11 of file description_test.cc.

References cleanup_description(), and EXPECT_EQ().

◆ TEST() [2/3]

blender::ocio::TEST ( ocio_source_processor ,
source_comment_out_uniforms  )

Definition at line 11 of file source_processor_test.cc.

References EXPECT_EQ(), and source_comment_out_uniforms().

◆ TEST() [3/3]

blender::ocio::TEST ( ocio_view_look ,
split_view_specific_look  )

Definition at line 11 of file view_specific_look_test.cc.

References EXPECT_EQ(), split_view_specific_look(), and view.

Variable Documentation

◆ ACES_TO_XYZ

const float3x3 blender::ocio::ACES_TO_XYZ
static
Initial value:
= {{0.938280f, 0.337369f, 0.001174f},
{-0.004451f, 0.729522f, -0.003711f},
{0.016628f, -0.066890f, 1.091595f}}

Definition at line 27 of file OCIO_matrix.hh.

Referenced by colormanage_update_matrices().

◆ ACESCG_TO_XYZ

const float3x3 blender::ocio::ACESCG_TO_XYZ
static
Initial value:
= {{0.652238f, 0.267672f, -0.005382f},
{0.128237f, 0.674340f, 0.001369f},
{0.169983f, 0.057988f, 1.093071f}}

Definition at line 33 of file OCIO_matrix.hh.

Referenced by colormanage_update_matrices(), and imb_colormanagement_working_space_set_from_matrix().

◆ OCIO_XYZ_TO_P3

const double4x4 blender::ocio::OCIO_XYZ_TO_P3
static
Initial value:
= {
{2.690225911625598, -0.82008218427349111, 0.03624575465400464, 0},
{-1.0940019373661367, 1.7504809082920574, -0.07858083680558868, 0},
{-0.4250823476747525, 0.026601954212205722, 0.95874699366098559, 0},
{0, 0, 0, 1}}

Definition at line 44 of file OCIO_matrix.hh.

◆ OCIO_XYZ_TO_REC2020

const double4x4 blender::ocio::OCIO_XYZ_TO_REC2020
static
Initial value:
= {
{1.716651187971268, -0.66668435183248875, 0.01763985744531079, 0},
{-0.35567078377639244, 1.6164812366349386, -0.04277061325780853, 0},
{-0.25336628137365991, 0.015768545813911128, 0.94210312123547435, 0},
{0, 0, 0, 1}}

Definition at line 50 of file OCIO_matrix.hh.

◆ OCIO_XYZ_TO_REC709

const double4x4 blender::ocio::OCIO_XYZ_TO_REC709
static
Initial value:
= {
{3.2409699419045217, -0.96924363628087973, 0.055630079696993649, 0},
{-1.5373831775700935, 1.8759675015077204, -0.20397695888897652, 0},
{-0.49861076029300355, 0.041555057407175626, 1.0569715142428788, 0},
{0, 0, 0, 1}}

Definition at line 38 of file OCIO_matrix.hh.

◆ XYZ_TO_REC2020

const float3x3 blender::ocio::XYZ_TO_REC2020
static
Initial value:
{{1.7166512f, -0.6666844, 0.0176399f},
{-0.3556708f, 1.6164812f, -0.0427706f},
{-0.2533663f, 0.0157685f, 0.9421031f}}

Definition at line 21 of file OCIO_matrix.hh.

Referenced by colormanage_update_matrices(), and imb_colormanagement_working_space_set_from_matrix().

◆ XYZ_TO_REC709

const float3x3 blender::ocio::XYZ_TO_REC709
static
Initial value:
{{3.2409699f, -0.9692436f, 0.0556301f},
{-1.5373832f, 1.8759675f, -0.2039770f},
{-0.4986108f, 0.0415551f, 1.0569715f}}

Definition at line 14 of file OCIO_matrix.hh.

Referenced by colormanage_update_matrices(), blender::ocio::FallbackConfig::get_xyz_to_scene_linear_matrix(), and imb_colormanagement_working_space_set_from_matrix().