Skip to content

Commit a5bb65f

Browse files
committed
Minor clean-up
Signed-off-by: Doug Walker <[email protected]>
1 parent 43df683 commit a5bb65f

22 files changed

+281
-291
lines changed

include/OpenColorIO/OpenColorTypes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ enum FixedFunctionStyle
510510
FIXED_FUNCTION_ACES_RGB_TO_JMH_20, ///< ACES 2.0 RGB to JMh -- EXPERIMENTAL
511511
FIXED_FUNCTION_ACES_TONESCALE_COMPRESS_20, ///< ACES 2.0 Tonescale and chroma compression -- EXPERIMENTAL
512512
FIXED_FUNCTION_ACES_GAMUT_COMPRESS_20, ///< ACES 2.0 Gamut compression -- EXPERIMENTAL
513-
FIXED_FUNCTION_RGB_TO_HSY_LIN, ///< RGB to HSY (Hue, Saturation, Lightness) using linear
514-
FIXED_FUNCTION_RGB_TO_HSY_LOG, ///< RGB to HSY (Hue, Saturation, Lightness) using log
515-
FIXED_FUNCTION_RGB_TO_HSY_VID, ///< RGB to HSY (Hue, Saturation, Lightness) using video
513+
FIXED_FUNCTION_RGB_TO_HSY_LIN, ///< RGB to HSY (Hue, Saturation, Luminance) for linear spaces
514+
FIXED_FUNCTION_RGB_TO_HSY_LOG, ///< RGB to HSY (Hue, Saturation, Luma) for log spaces
515+
FIXED_FUNCTION_RGB_TO_HSY_VID, ///< RGB to HSY (Hue, Saturation, Luma) for video spaces
516516
};
517517

518518
/// Enumeration of the :cpp:class:`ExposureContrastTransform` transform algorithms.

src/OpenColorIO/DynamicProperty.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void DynamicPropertyGradingHueCurveImpl::precompute()
373373
curveImpl->computeKnotsAndCoefs(m_knotsCoefs, static_cast<int>(c),
374374
m_gradingHueCurve->getDrawCurveOnly());
375375
}
376-
if (m_knotsCoefs.m_numKnots == 0) m_knotsCoefs.m_localBypass = true;
376+
if (m_knotsCoefs.m_numKnots <= 0) m_knotsCoefs.m_localBypass = true;
377377
}
378378

379379
DynamicPropertyGradingHueCurveImplRcPtr DynamicPropertyGradingHueCurveImpl::createEditableCopy() const

src/OpenColorIO/DynamicProperty.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class DynamicPropertyGradingRGBCurveImpl : public DynamicPropertyImpl,
151151
bool getLocalBypass() const;
152152
int getNumKnots() const;
153153
int getNumCoefs() const;
154-
static int GetNumOffsetValues() { return 8; }
154+
static int GetNumOffsetValues() { return 8; } // offset and num vals for four curves
155155
const int * getKnotsOffsetsArray() const;
156156
const int * getCoefsOffsetsArray() const;
157157
const float * getKnotsArray() const;
@@ -189,7 +189,7 @@ class DynamicPropertyGradingHueCurveImpl : public DynamicPropertyImpl,
189189
bool getLocalBypass() const;
190190
int getNumKnots() const;
191191
int getNumCoefs() const;
192-
static int GetNumOffsetValues() { return 16; }
192+
static int GetNumOffsetValues() { return 16; } // offset and num vals for eight curves
193193
const int * getKnotsOffsetsArray() const;
194194
const int * getCoefsOffsetsArray() const;
195195
const float * getKnotsArray() const;

src/OpenColorIO/GpuShaderUtils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ void AddLinToLogShaderChannelBlue(GpuShaderCreatorRcPtr & shaderCreator, GpuShad
275275
// Convert "grading log" values to scene-linear.
276276
void AddLogToLinShader(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & st);
277277

278-
279278
void AddLogToLinShaderChannelBlue(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & st);
280279

281280
} // namespace OCIO_NAMESPACE

src/OpenColorIO/ops/fixedfunction/FixedFunctionOpCPU.cpp

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ class Renderer_HSV_TO_RGB : public OpCPU
240240

241241
class Renderer_RGB_TO_HSY_LOG : public OpCPU
242242
{
243-
const float MIN_0 = -0.1f;
244243
public:
245244
Renderer_RGB_TO_HSY_LOG() = delete;
246245
explicit Renderer_RGB_TO_HSY_LOG(ConstFixedFunctionOpDataRcPtr & data);
@@ -250,7 +249,6 @@ class Renderer_RGB_TO_HSY_LOG : public OpCPU
250249

251250
class Renderer_HSY_LOG_TO_RGB : public OpCPU
252251
{
253-
const float MIN_0 = -0.1f;;
254252
public:
255253
Renderer_HSY_LOG_TO_RGB() = delete;
256254
explicit Renderer_HSY_LOG_TO_RGB(ConstFixedFunctionOpDataRcPtr & data);
@@ -260,7 +258,6 @@ class Renderer_HSY_LOG_TO_RGB : public OpCPU
260258

261259
class Renderer_RGB_TO_HSY_VID : public OpCPU
262260
{
263-
const float MIN_0 = 0.0f;
264261
public:
265262
Renderer_RGB_TO_HSY_VID() = delete;
266263
explicit Renderer_RGB_TO_HSY_VID(ConstFixedFunctionOpDataRcPtr & data);
@@ -270,7 +267,6 @@ class Renderer_RGB_TO_HSY_VID : public OpCPU
270267

271268
class Renderer_HSY_VID_TO_RGB : public OpCPU
272269
{
273-
const float MIN_0 = 0.0f;
274270
public:
275271
Renderer_HSY_VID_TO_RGB() = delete;
276272
explicit Renderer_HSY_VID_TO_RGB(ConstFixedFunctionOpDataRcPtr & data);
@@ -280,7 +276,6 @@ class Renderer_HSY_VID_TO_RGB : public OpCPU
280276

281277
class Renderer_RGB_TO_HSY_LIN : public OpCPU
282278
{
283-
const float MIN_0 = 0.2f;
284279
public:
285280
Renderer_RGB_TO_HSY_LIN() = delete;
286281
explicit Renderer_RGB_TO_HSY_LIN(ConstFixedFunctionOpDataRcPtr & data);
@@ -290,7 +285,6 @@ class Renderer_RGB_TO_HSY_LIN : public OpCPU
290285

291286
class Renderer_HSY_LIN_TO_RGB : public OpCPU
292287
{
293-
const float MIN_0 = 0.2f;
294288
public:
295289
Renderer_HSY_LIN_TO_RGB() = delete;
296290
explicit Renderer_HSY_LIN_TO_RGB(ConstFixedFunctionOpDataRcPtr & data);
@@ -1594,7 +1588,7 @@ void Renderer_HSV_TO_RGB::apply(const void * inImg, void * outImg, long numPixel
15941588
}
15951589
}
15961590

1597-
void applyHSYToRGB(const void * inImg, void * outImg, long numPixels, float min0)
1591+
void applyHSYToRGB(const void * inImg, void * outImg, long numPixels, FixedFunctionOpData::Style funcStyle)
15981592
{
15991593
const float * in = (const float *)inImg;
16001594
float * out = (float *)outImg;
@@ -1623,7 +1617,7 @@ void applyHSYToRGB(const void * inImg, void * outImg, long numPixels, float min0
16231617

16241618
const float distRgb = std::fabs(red - luma) + std::fabs(grn - luma) + std::fabs(blu - luma);
16251619

1626-
if (min0 > 0.f) // linear
1620+
if (funcStyle == FixedFunctionOpData::HSY_LIN_TO_RGB)
16271621
{
16281622
const float sumRgb = red + grn + blu;
16291623

@@ -1656,13 +1650,13 @@ void applyHSYToRGB(const void * inImg, void * outImg, long numPixels, float min0
16561650
gainS = gainS >= 0.f ? gainS : (2.f * c) / (denom + discrim * 2.f);
16571651
}
16581652
}
1659-
else if (min0 < 0.f) // log
1653+
else if (funcStyle == FixedFunctionOpData::HSY_LOG_TO_RGB)
16601654
{
16611655
const float satGain = 4.f;
16621656
const float currSat = distRgb * satGain;
16631657
gainS = sat / std::max(1e-10f, currSat);
16641658
}
1665-
else // video
1659+
else // funcStyle == FixedFunctionOpData::HSY_VID_TO_RGB
16661660
{
16671661
const float satGain = 1.25f;
16681662
const float currSat = distRgb * satGain;
@@ -1680,7 +1674,7 @@ void applyHSYToRGB(const void * inImg, void * outImg, long numPixels, float min0
16801674

16811675
}
16821676

1683-
void applyRGBToHSY(const void * inImg, void * outImg, long numPixels, float min0)
1677+
void applyRGBToHSY(const void * inImg, void * outImg, long numPixels, FixedFunctionOpData::Style funcStyle)
16841678
{
16851679
const float * in = (const float *)inImg;
16861680
float * out = (float *)outImg;
@@ -1704,7 +1698,7 @@ void applyRGBToHSY(const void * inImg, void * outImg, long numPixels, float min0
17041698

17051699
float sat = 0.f;
17061700

1707-
if (min0 > 0.f) // linear
1701+
if (funcStyle == FixedFunctionOpData::RGB_TO_HSY_LIN)
17081702
{
17091703
const float sumRgb = red + grn + blu;
17101704
const float k = 0.15f;
@@ -1717,12 +1711,12 @@ void applyRGBToHSY(const void * inImg, void * outImg, long numPixels, float min0
17171711
sat = satLo + alpha * (satHi - satLo);
17181712
sat *= 1.4f;
17191713
}
1720-
else if (min0 < 0.f) // log
1714+
else if (funcStyle == FixedFunctionOpData::RGB_TO_HSY_LOG)
17211715
{
17221716
const float sat_gain = 4.f;
17231717
sat = distRgb * sat_gain;
17241718
}
1725-
else // video
1719+
else // FixedFunctionOpData::RGB_TO_HSY_VID
17261720
{
17271721
const float sat_gain = 1.25f;
17281722
sat = distRgb * sat_gain;
@@ -1769,7 +1763,7 @@ Renderer_RGB_TO_HSY_LOG::Renderer_RGB_TO_HSY_LOG(ConstFixedFunctionOpDataRcPtr &
17691763

17701764
void Renderer_RGB_TO_HSY_LOG::apply(const void * inImg, void * outImg, long numPixels) const
17711765
{
1772-
applyRGBToHSY(inImg, outImg, numPixels, MIN_0);
1766+
applyRGBToHSY(inImg, outImg, numPixels, FixedFunctionOpData::RGB_TO_HSY_LOG);
17731767
}
17741768

17751769
Renderer_HSY_LOG_TO_RGB::Renderer_HSY_LOG_TO_RGB(ConstFixedFunctionOpDataRcPtr & /*data*/)
@@ -1779,7 +1773,7 @@ Renderer_HSY_LOG_TO_RGB::Renderer_HSY_LOG_TO_RGB(ConstFixedFunctionOpDataRcPtr &
17791773

17801774
void Renderer_HSY_LOG_TO_RGB::apply(const void * inImg, void * outImg, long numPixels) const
17811775
{
1782-
applyHSYToRGB(inImg, outImg, numPixels, MIN_0);
1776+
applyHSYToRGB(inImg, outImg, numPixels, FixedFunctionOpData::HSY_LOG_TO_RGB);
17831777
}
17841778

17851779
Renderer_RGB_TO_HSY_LIN::Renderer_RGB_TO_HSY_LIN(ConstFixedFunctionOpDataRcPtr & /*data*/)
@@ -1789,7 +1783,7 @@ Renderer_RGB_TO_HSY_LIN::Renderer_RGB_TO_HSY_LIN(ConstFixedFunctionOpDataRcPtr &
17891783

17901784
void Renderer_RGB_TO_HSY_LIN::apply(const void * inImg, void * outImg, long numPixels) const
17911785
{
1792-
applyRGBToHSY(inImg, outImg, numPixels, MIN_0);
1786+
applyRGBToHSY(inImg, outImg, numPixels, FixedFunctionOpData::RGB_TO_HSY_LIN);
17931787
}
17941788

17951789
Renderer_HSY_LIN_TO_RGB::Renderer_HSY_LIN_TO_RGB(ConstFixedFunctionOpDataRcPtr & /*data*/)
@@ -1799,7 +1793,7 @@ Renderer_HSY_LIN_TO_RGB::Renderer_HSY_LIN_TO_RGB(ConstFixedFunctionOpDataRcPtr &
17991793

18001794
void Renderer_HSY_LIN_TO_RGB::apply(const void * inImg, void * outImg, long numPixels) const
18011795
{
1802-
applyHSYToRGB(inImg, outImg, numPixels, MIN_0);
1796+
applyHSYToRGB(inImg, outImg, numPixels, FixedFunctionOpData::HSY_LIN_TO_RGB);
18031797
}
18041798

18051799
Renderer_RGB_TO_HSY_VID::Renderer_RGB_TO_HSY_VID(ConstFixedFunctionOpDataRcPtr & /*data*/)
@@ -1809,7 +1803,7 @@ Renderer_RGB_TO_HSY_VID::Renderer_RGB_TO_HSY_VID(ConstFixedFunctionOpDataRcPtr &
18091803

18101804
void Renderer_RGB_TO_HSY_VID::apply(const void * inImg, void * outImg, long numPixels) const
18111805
{
1812-
applyRGBToHSY(inImg, outImg, numPixels, MIN_0);
1806+
applyRGBToHSY(inImg, outImg, numPixels, FixedFunctionOpData::RGB_TO_HSY_VID);
18131807
}
18141808

18151809
Renderer_HSY_VID_TO_RGB::Renderer_HSY_VID_TO_RGB(ConstFixedFunctionOpDataRcPtr & /*data*/)
@@ -1819,7 +1813,7 @@ Renderer_HSY_VID_TO_RGB::Renderer_HSY_VID_TO_RGB(ConstFixedFunctionOpDataRcPtr &
18191813

18201814
void Renderer_HSY_VID_TO_RGB::apply(const void * inImg, void * outImg, long numPixels) const
18211815
{
1822-
applyHSYToRGB(inImg, outImg, numPixels, MIN_0);
1816+
applyHSYToRGB(inImg, outImg, numPixels, FixedFunctionOpData::HSY_VID_TO_RGB);
18231817
}
18241818

18251819
Renderer_XYZ_TO_xyY::Renderer_XYZ_TO_xyY(ConstFixedFunctionOpDataRcPtr & /*data*/)

src/OpenColorIO/ops/fixedfunction/FixedFunctionOpData.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ class FixedFunctionOpData : public OpData
6262
ACES_TONESCALE_COMPRESS_20_INV, // ACES2 Tonescale and chroma compression (inv)
6363
ACES_GAMUT_COMPRESS_20_FWD, // ACES2 Gamut compression
6464
ACES_GAMUT_COMPRESS_20_INV, // ACES2 Gamut compression (inv)
65-
RGB_TO_HSY_LOG, // RGB to HSY (Hue, Saturation, Lightness) using log
66-
RGB_TO_HSY_LIN, // RGB to HSY (Hue, Saturation, Lightness) using linear
67-
RGB_TO_HSY_VID, // RGB to HSY (Hue, Saturation, Lightness) using video
68-
HSY_LOG_TO_RGB, // HSY (Hue, Saturation, Lightness) using log to RGB
69-
HSY_LIN_TO_RGB, // HSY (Hue, Saturation, Lightness) using linear to RGB
70-
HSY_VID_TO_RGB // HSY (Hue, Saturation, Lightness) using video to RGB
65+
RGB_TO_HSY_LIN, // RGB to HSY (Hue, Saturation, Luminance) for linear spaces
66+
RGB_TO_HSY_LOG, // RGB to HSY (Hue, Saturation, Luma) for log spaces
67+
RGB_TO_HSY_VID, // RGB to HSY (Hue, Saturation, Luma) for video spaces
68+
HSY_LIN_TO_RGB, // HSY (Hue, Saturation, Luminance) to RGB for linear spaces
69+
HSY_LOG_TO_RGB, // HSY (Hue, Saturation, Luma) to RGB for log spaces
70+
HSY_VID_TO_RGB // HSY (Hue, Saturation, Luma) to RGB for video spaces
7171
};
7272

7373
static const char * ConvertStyleToString(Style style, bool detailed);

src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,9 @@ void Add_RGB_TO_HSV(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
16921692
ss.newLine() << pxl << ".rgb = " << ss.float3Const("hue * 1./6.", "sat", "val") << ";";
16931693
}
16941694

1695-
void Add_RGB_TO_HSY(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, float min0)
1695+
void Add_RGB_TO_HSY(GpuShaderCreatorRcPtr & shaderCreator,
1696+
GpuShaderText & ss,
1697+
FixedFunctionOpData::Style funcStyle)
16961698
{
16971699
const std::string pxl(shaderCreator->getPixelName());
16981700

@@ -1703,7 +1705,7 @@ void Add_RGB_TO_HSY(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17031705
ss.newLine() << "float maxRGB = max( " << pxl << ".x, max( " << pxl << ".y, " << pxl << ".z ) );";
17041706
ss.newLine() << ss.float3Decl("RGBm") << " = " << pxl << ".rgb - luma;";
17051707
ss.newLine() << "float distRGB = dot( abs(RGBm), ones );";
1706-
if (min0 > 0.f)
1708+
if (funcStyle == FixedFunctionOpData::RGB_TO_HSY_LIN)
17071709
{
17081710
ss.newLine() << "float sumRGB = dot( " << pxl << ".rgb, ones );";
17091711
ss.newLine() << "float sat_hi = distRGB / (0.15 + sumRGB);";
@@ -1713,11 +1715,11 @@ void Add_RGB_TO_HSY(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17131715
ss.newLine() << "float sat = sat_lo + alpha * (sat_hi - sat_lo);";
17141716
ss.newLine() << "sat *= 1.4;";
17151717
}
1716-
else if (min0 < 0.f)
1718+
else if (funcStyle == FixedFunctionOpData::RGB_TO_HSY_LOG)
17171719
{
17181720
ss.newLine() << "float sat = distRGB * 4.;";
17191721
}
1720-
else
1722+
else // RGB_TO_HSY_VID
17211723
{
17221724
ss.newLine() << "float sat = distRGB * 1.25;";
17231725
}
@@ -1733,7 +1735,9 @@ void Add_RGB_TO_HSY(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17331735
ss.newLine() << "" << pxl << ".r = hue * 1./6.; " << pxl << ".g = sat; " << pxl << ".b = luma;";
17341736
}
17351737

1736-
void Add_HSY_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, float min0)
1738+
void Add_HSY_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator,
1739+
GpuShaderText & ss,
1740+
FixedFunctionOpData::Style funcStyle)
17371741
{
17381742
const std::string pxl(shaderCreator->getPixelName());
17391743

@@ -1754,7 +1758,7 @@ void Add_HSY_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17541758

17551759
ss.newLine() << "float sat = " << pxl << ".y;";
17561760
ss.newLine() << "float distRGB = dot( abs(RGB0 - luma), ones );";
1757-
if (min0 > 0.f)
1761+
if (funcStyle == FixedFunctionOpData::HSY_LIN_TO_RGB)
17581762
{
17591763
ss.newLine() << "float sumRGB = dot( RGB0, ones );";
17601764
ss.newLine() << "float k = 0.15;";
@@ -1773,11 +1777,11 @@ void Add_HSY_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17731777
ss.newLine() << "sm = (sm >= 0.) ? sm : (2. * c) / (denom + discrim * 2.);";
17741778
ss.newLine() << "float gainS = (alpha == 1.) ? s1 : (alpha == 0.) ? s0 : sm;";
17751779
}
1776-
else if (min0 < 0.f)
1780+
else if (funcStyle == FixedFunctionOpData::HSY_LOG_TO_RGB)
17771781
{
17781782
ss.newLine() << "float gainS = sat / max(1e-10, distRGB * 4.);";
17791783
}
1780-
else
1784+
else // HSY_VID_TO_RGB
17811785
{
17821786
ss.newLine() << "float gainS = sat / max(1e-10, distRGB * 1.25);";
17831787
}
@@ -1786,32 +1790,32 @@ void Add_HSY_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss, f
17861790

17871791
void Add_RGB_TO_HSY_LOG(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
17881792
{
1789-
Add_RGB_TO_HSY(shaderCreator, ss, -0.1f);
1793+
Add_RGB_TO_HSY(shaderCreator, ss, FixedFunctionOpData::RGB_TO_HSY_LOG);
17901794
}
17911795

17921796
void Add_RGB_TO_HSY_LIN(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
17931797
{
1794-
Add_RGB_TO_HSY(shaderCreator, ss, 0.2f);
1798+
Add_RGB_TO_HSY(shaderCreator, ss, FixedFunctionOpData::RGB_TO_HSY_LIN);
17951799
}
17961800

17971801
void Add_RGB_TO_HSY_VID(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
17981802
{
1799-
Add_RGB_TO_HSY(shaderCreator, ss, 0.0f);
1803+
Add_RGB_TO_HSY(shaderCreator, ss, FixedFunctionOpData::RGB_TO_HSY_VID);
18001804
}
18011805

18021806
void Add_HSY_LOG_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
18031807
{
1804-
Add_HSY_TO_RGB(shaderCreator, ss, -0.1f);
1808+
Add_HSY_TO_RGB(shaderCreator, ss, FixedFunctionOpData::HSY_LOG_TO_RGB);
18051809
}
18061810

18071811
void Add_HSY_LIN_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
18081812
{
1809-
Add_HSY_TO_RGB(shaderCreator, ss, 0.2f);
1813+
Add_HSY_TO_RGB(shaderCreator, ss, FixedFunctionOpData::HSY_LIN_TO_RGB);
18101814
}
18111815

18121816
void Add_HSY_VID_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)
18131817
{
1814-
Add_HSY_TO_RGB(shaderCreator, ss, 0.0f);
1818+
Add_HSY_TO_RGB(shaderCreator, ss, FixedFunctionOpData::HSY_VID_TO_RGB);
18151819
}
18161820

18171821
void Add_HSV_TO_RGB(GpuShaderCreatorRcPtr & shaderCreator, GpuShaderText & ss)

src/OpenColorIO/ops/gradinghuecurve/GradingHueCurve.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
namespace OCIO_NAMESPACE
1212
{
13+
1314
namespace
1415
{
16+
1517
static const std::vector<GradingControlPoint> DefaultHueHueCtrl{ {0.0f, 0.0f},
1618
{1.f/6.f, 1.f/6.f},
1719
{2.f/6.f, 2.f/6.f},
@@ -42,7 +44,7 @@ static const std::vector<GradingControlPoint> DefaultSatLumCtrl{ {0.0f, 1.0f}, {
4244
static const std::vector<GradingControlPoint> DefaultLumLumCtrl{ { 0.f, 0.f },{ 0.5f, 0.5f },{ 1.0f, 1.0f } };
4345
static const std::vector<GradingControlPoint> DefaultLumLumLinCtrl{ { -7.0f, -7.0f },{ 0.f, 0.f },{ 7.0f, 7.0f } };
4446

45-
}
47+
} // anon
4648

4749
const GradingBSplineCurveImpl GradingHueCurveImpl::DefaultHueHue(DefaultHueHueCtrl, BSplineType::HUE_HUE_B_SPLINE );
4850
const GradingBSplineCurveImpl GradingHueCurveImpl::DefaultHueSat(DefaultHueSatCtrl, BSplineType::PERIODIC_1_B_SPLINE );
@@ -337,6 +339,5 @@ bool operator!=(const GradingHueCurve & lhs, const GradingHueCurve & rhs)
337339
return !(lhs == rhs);
338340
}
339341

340-
341342
} // namespace OCIO_NAMESPACE
342343

src/OpenColorIO/ops/gradinghuecurve/GradingHueCurveOp.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class GradingHueCurveOp : public Op
6565
}
6666
};
6767

68-
6968
GradingHueCurveOp::GradingHueCurveOp(GradingHueCurveOpDataRcPtr & hueCurveData)
7069
: Op()
7170
{
@@ -198,15 +197,10 @@ void GradingHueCurveOp::extractGpuShaderInfo(GpuShaderCreatorRcPtr & shaderCreat
198197
GetGradingHueCurveGPUShaderProgram(shaderCreator, data);
199198
}
200199

201-
202200
} // Anon namespace
203201

204-
205-
206-
207202
///////////////////////////////////////////////////////////////////////////
208203

209-
210204
void CreateGradingHueCurveOp(OpRcPtrVec & ops,
211205
GradingHueCurveOpDataRcPtr & curveData,
212206
TransformDirection direction)

0 commit comments

Comments
 (0)