26 virtual bool isNoOp()
const {
return false; }
37 apply((
float*)data, 1, 1, 3,
sizeof(
float), 3 *
sizeof(
float),
44 #define OIIO_HAS_COLORPROCESSOR 1
52 #define OIIO_COLORCONFIG_USES_SHARED_PTR 1
100 int getNumColorSpaces()
const;
103 const char* getColorSpaceNameByIndex(
int index)
const;
107 const char* getColorSpaceNameByRole(
string_view role)
const;
111 OIIO::TypeDesc getColorSpaceDataType(
string_view name,
int* bits)
const;
115 std::vector<std::string> getColorSpaceNames()
const;
119 const char* getColorSpaceFamilyByName(
string_view name)
const;
122 int getNumRoles()
const;
125 const char* getRoleByIndex(
int index)
const;
128 std::vector<std::string>
getRoles()
const;
131 int getNumLooks()
const;
134 const char* getLookNameByIndex(
int index)
const;
137 std::vector<std::string> getLookNames()
const;
155 createColorProcessor(
ustring inputColorSpace,
ustring outputColorSpace,
174 string_view outputColorSpace,
bool inverse =
false,
179 ustring outputColorSpace,
bool inverse =
false,
184 int getNumDisplays()
const;
187 const char* getDisplayNameByIndex(
int index)
const;
191 std::vector<std::string> getDisplayNames()
const;
194 const char* getDefaultDisplayName()
const;
202 const char* getViewNameByIndex(
string_view display,
int index)
const;
207 std::vector<std::string> getViewNames(
string_view display =
"")
const;
211 const char* getDefaultViewName(
string_view display =
"")
const;
256 bool inverse =
false)
const;
258 bool inverse =
false)
const;
269 bool inverse =
false)
const;
292 static bool supportsOpenColorIO();
296 static int OpenColorIO_version_hex();
303 std::unique_ptr<Impl> m_impl;
304 Impl* getImpl()
const {
return m_impl.get(); }
314 return (x <= 0.04045
f) ? (x * (1.0f / 12.92f))
315 :
powf((x + 0.055
f) * (1.0
f / 1.055
f), 2.4
f);
319 #ifndef __CUDA_ARCH__
324 x <= 0.04045
f, x * (1.0
f / 12.92
f),
333 return (x <= 0.0031308
f) ? (12.92f *
x)
334 : (1.055
f *
powf(x, 1.
f / 2.4
f) - 0.055f);
338 #ifndef __CUDA_ARCH__
356 return x * (1.0f / 4.5f);
358 return powf((x + 0.099
f) * (1.0
f / 1.099
f), (1.0
f / 0.45
f));
368 return 1.099f *
powf(x, 0.45
f) - 0.099f;
OIIO_API std::string geterror(bool clear=true)
OIIO_API bool has_error()
Is there a pending global error message waiting to be retrieved?
OIIO_FORCEINLINE OIIO_HOSTDEVICE T fast_pow_pos(const T &x, const U &y)
GT_API const UT_StringHolder filename
Matrix44< float > M44f
4x4 matrix of float
GLsizei const GLchar *const * string
float linear_to_Rec709(float x)
Utility – convert linear value to Rec709.
SYS_API float powf(float x, float y)
PXL_API void getRoles(UT_StringArray &names)
Returns a list of the supported roles.
GLint GLsizei GLsizei height
float Rec709_to_linear(float x)
virtual bool hasChannelCrosstalk() const
vint4 select(const vbool4 &mask, const vint4 &a, const vint4 &b)
std::shared_ptr< ColorProcessor > ColorProcessorHandle
float linear_to_sRGB(float x)
Utility – convert linear value to sRGB.
OIIO_FORCEINLINE OIIO_HOSTDEVICE float madd(float a, float b, float c)
Fused multiply and add: (a*b + c)
GLuint const GLchar * name
PXL_API const char * parseColorSpaceFromString(const char *string)
float sRGB_to_linear(float x)
virtual ~ColorProcessor(void)
virtual bool isNoOp() const
LeafData & operator=(const LeafData &)=delete
#define OIIO_NAMESPACE_END
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
#define OIIO_NAMESPACE_BEGIN