11 #ifndef RU_PixelFunctions_h
12 #define RU_PixelFunctions_h
73 float myFactor[4], myAddend[4];
80 : myScale(scale), myPivot(pivot) {}
99 {
float ig = 1.0f /
g; myInvGamma[0] = myInvGamma[1] =
100 myInvGamma[2] = myInvGamma[3] = ig; }
104 { myInvGamma[0] = 1.0f /
r; myInvGamma[1] = 1.0f /
g;
105 myInvGamma[2] = 1.0f/
b; myInvGamma[3] = 1.0f /
w; }
108 static float gamma(
float val,
float g);
111 {
return myCompSep; }
138 unsigned char myLClip:1,
149 :
myStep(step), myOffset(offset) {}
218 {
return saturation; }
323 float *sat = 0,
float *
val = 0,
bool maintain_lum =
true)
326 mySatScale(sat?sat[0]:1.0
f),
327 mySatShift(sat?sat[1]:0.0
f),
330 myMaintainLum(maintain_lum) {}
342 {
if(myHSVOp==CONVERT_TO_HSV)
return toHSV;
343 if(myHSVOp==CONVERT_TO_RGB)
return fromHSV;
365 {
return matrixmult; }
382 {
return myClip->getNumTracks() > 1; }
403 {
return myTable->getNumChannels() > 1; }
405 {
return myTable->is3DLUT(); }
509 : myScale(scale), myDoReplace(rep), myValue(v) {}
545 : myScale(scale), myDoReplace(rep), myValue(v) {}
559 : myScale(scale), myDoReplace(rep), myValue(v) {}
630 float global_in_range_min,
float global_in_range_max,
631 float global_out_range_min,
float global_out_range_max,
633 float comp_in_range_min[4],
float comp_in_range_max[4],
634 float comp_out_range_min[4],
float comp_out_range_max[4],
635 float comp_gamma[4]);
638 float global_in_range_min,
float global_in_range_max,
639 float global_out_range_min,
float global_out_range_max,
641 float comp_in_range_min,
float comp_in_range_max,
642 float comp_out_range_min,
float comp_out_range_max,
651 float safeLevels(
float val,
int);
653 static void colourMap(
float const effect,
654 const float from_min,
const float from_max,
655 const float to_min,
const float to_max,
656 float& factor,
float& addend);
660 {
return myLevelsFunc; }
676 float myCompInRangeMin[4];
677 float myCompInRangeMax[4];
678 float myCompOutRangeMin[4];
679 float myCompOutRangeMax[4];
RU_ScaleFunc(float scale, float pivot)
RUPixelFunc getPixelFunction() const override
bool needAllComponents() const override
static float mult(RU_PixelFunction *pf, float val, int)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
RU_LookupTableFunc(PXL_Lookup *table)
std::string upper(string_view a)
Return an all-upper case version of a (locale-independent).
RU_PowerFunc(float exponent)
RUVectorFunc getVectorFunction() const override
RU_AcosFunc(float scale, bool rep, float v)
RUPixelFunc getPixelFunction() const override
bool eachComponentDifferent() const override
RUPixelFunc getPixelFunction() const override
bool needAllComponents() const override
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
~RU_LookupTableFunc() override
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
GLuint GLsizei GLsizei * length
RUPixelFunc getPixelFunction() const override
RU_LookupClipFunc(const CL_Clip *clip)
float myGlobalOutRangeMin
RU_GammaFunc(float r, float g, float b, float w)
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
bool needAllComponents() const override
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
static float scale(RU_PixelFunction *pf, float val, int)
RUPixelFunc getPixelFunction() const override
GA_API const UT_StringHolder scale
RUPixelFunc getPixelFunction() const override
RUPixelFunc getPixelFunction() const override
RU_ComponentFunc(int comp)
bool needAllComponents() const override
RU_AsinFunc(float scale, bool rep, float v)
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
OIIO_FORCEINLINE OIIO_HOSTDEVICE float madd(float a, float b, float c)
Fused multiply and add: (a*b + c)
RU_VectorFunc(const UT_Matrix4 &matrix)
RUPixelFunc getPixelFunction() const override
RUPixelFunc getPixelFunction() const override
IMATH_HOSTDEVICE constexpr int sign(T a) IMATH_NOEXCEPT
float myGlobalOutRangeMax
RUPixelFunc getPixelFunction() const override
GLboolean GLboolean GLboolean b
RUPixelFunc getPixelFunction() const override
GLenum GLenum GLsizei void * table
RU_SinFunc(float scale, float shift)
RUVectorFunc getVectorFunction() const override
RU_QuantizeFunc(float step, float offset)
bool needAllComponents() const override
bool needAllComponents() const override
RU_HSVConvertFunc(RU_HSVConvertOp op, float hues=0.0f, float *sat=0, float *val=0, bool maintain_lum=true)
bool needAllComponents() const override
static float madd(RU_PixelFunction *pf, float val, int comp)
bool needAllComponents() const override
void getPixelShader(UT_String &frag_shader) override
RUPixelFunc getPixelFunction() const override
std::string lower(string_view a)
Return an all-upper case version of a (locale-independent).
bool needAllComponents() const override
static float add(RU_PixelFunction *pf, float val, int)
RU_LimitFunc(bool lower, float lval, bool upper, float uval, bool clamp)
RUPixelFunc getPixelFunction() const override
RU_InvertFunc(bool rep, float v)
GA_API const UT_StringHolder pivot
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
RUVectorFunc getVectorFunction() const override
bool eachComponentDifferent() const override
GLubyte GLubyte GLubyte GLubyte w
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
void(* RUVectorFunc)(RU_PixelFunction *, float **, const bool *)
bool needAllComponents() const override
RUPixelFunc getPixelFunction() const override
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
virtual void getPixelShader(UT_String &frag_shader)
RUPixelFunc getPixelFunction() const override
RUPixelFunc getPixelFunction() const override
float(* RUPixelFunc)(RU_PixelFunction *, float, int)
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
RU_TanFunc(float scale, bool rep, float v)
RUPixelFunc getPixelFunction() const override
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept
bool eachComponentDifferent() const override
RUVectorFunc getVectorFunction() const override
bool needAllComponents() const override
RUPixelFunc getPixelFunction() const override