Skip to content

Feature/optimiser debugging improvements#2244

Open
KevinJW wants to merge 18 commits into
AcademySoftwareFoundation:mainfrom
KevinJW:feature/optimiser_debugging
Open

Feature/optimiser debugging improvements#2244
KevinJW wants to merge 18 commits into
AcademySoftwareFoundation:mainfrom
KevinJW:feature/optimiser_debugging

Conversation

@KevinJW

@KevinJW KevinJW commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

This is a couple of changes related to improving the debug output of the optimiser.

Basically it outputs the results of each stage within the passes, that allows for better reasoning about what changes though the process, I've tried to ensure we don't suffer too much from the overhead from the extra logging during non-debug conditions.

I have not done any performance evaluation to confirm this so far.

As a side effect there is also a slight change to the includes to remove the dependency on pystring in the op/optimiser code.

@KevinJW KevinJW added the Needs Discussion Needs discussion before implmentation, which could result in changes, or a decision not to proceed. label Jan 12, 2026
@KevinJW KevinJW marked this pull request as draft January 13, 2026 09:36
@KevinJW KevinJW changed the title DRAFT: Feature/optimiser debugging improvements Feature/optimiser debugging improvements Jan 13, 2026
@KevinJW

KevinJW commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

Sample output

  - !<ColorSpace>
    name: Test Case 3
    aliases: [test_3]
    family: Display
    equalitygroup: ""
    bitdepth: 32f
    description: Test Case 3
    isdata: false
    categories: [file-io]
    encoding: sdr-video
    allocation: uniform
    from_display_reference: !<GroupTransform>
        children:
          - !<BuiltinTransform> {style: DISPLAY - CIE-XYZ-D65_to_G2.6-P3-D65}
          - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1.0], style: pass_thru, direction: forward}
          - !<ExponentTransform> {value: [2.4, 2.4, 2.4, 1.0], style: pass_thru, direction: inverse}
[OpenColorIO Debug]: **
[OpenColorIO Debug]: Optimizing Op Vec...
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 74a8bf8b9e517364ed1ed1e3ae488c3 >
[OpenColorIO Debug]:     Op 1: <AllocationNoOp> uniform
[OpenColorIO Debug]:     Op 2: <MatrixOffsetOp> <MatrixOffsetOp forward 22473544333a34d83eecb6440b4cf493 >
[OpenColorIO Debug]:     Op 3: <MatrixOffsetOp> <MatrixOffsetOp forward 11618c158eed367da8141462bf68bd0e >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 5: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 6: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 7: <AllocationNoOp> uniform
[OpenColorIO Debug]:     Op 8: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]: RemoveNoOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 22473544333a34d83eecb6440b4cf493 >
[OpenColorIO Debug]:     Op 1: <MatrixOffsetOp> <MatrixOffsetOp forward 11618c158eed367da8141462bf68bd0e >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 5: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]: ReplaceOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 22473544333a34d83eecb6440b4cf493 >
[OpenColorIO Debug]:     Op 1: <MatrixOffsetOp> <MatrixOffsetOp forward 11618c158eed367da8141462bf68bd0e >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 5: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]: ReplaceIdentityOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 22473544333a34d83eecb6440b4cf493 >
[OpenColorIO Debug]:     Op 1: <MatrixOffsetOp> <MatrixOffsetOp forward 11618c158eed367da8141462bf68bd0e >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 5: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveInverseOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 22473544333a34d83eecb6440b4cf493 >
[OpenColorIO Debug]:     Op 1: <MatrixOffsetOp> <MatrixOffsetOp forward 11618c158eed367da8141462bf68bd0e >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 5: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: CombineOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 4: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveNoOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 4: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 4: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceIdentityOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 4: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveInverseOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 4: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: CombineOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveNoOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceIdentityOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveInverseOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: CombineOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveNoOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceIdentityOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: RemoveInverseOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: CombineOps
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: ReplaceInverseLuts
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]: **
[OpenColorIO Debug]: Optimized 9->4, 3 passes, 2 no-op types removed, 1 no-ops removed, 0 ops replaced, 2 identity ops replaced, 0 inverse op pairs removed, 2 ops combined, 0 ops inverted
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward 57ce2b766d07caae17e91e40f8371777 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 3: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:
[OpenColorIO Debug]: **

@KevinJW

KevinJW commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

And the result from the shader

#version 120

// Declaration of the OCIO shader function

vec4 OCIODisplay(vec4 inPixel)
{
  vec4 outColor = inPixel;

  // Add Matrix processing

  {
    vec4 res = vec4(outColor.rgb.r, outColor.rgb.g, outColor.rgb.b, outColor.a);
    vec4 tmp = res;
    res = mat4(2.0249052859667822, -0.18359703225617749, 0.0090585611223476716, 0., -0.68906976103476791, 1.2895062077590191, -0.059279684057552288, 0., -0.33583552493201829, -0.10590917550284097, 1.0502211229352065, 0., 0., 0., 0., 1.) * tmp;
    outColor.rgb = vec3(res.x, res.y, res.z);
    outColor.a = res.w;
  }

  // Add Range processing

  {
    outColor.rgb = max(vec3(0., 0., 0.), outColor.rgb);
  }

  // Add Gamma 'basicPassThruRev' processing

  {
    vec4 gamma = vec4(0.41666666666666669, 0.41666666666666669, 0.41666666666666669, 1.);
    vec4 breakPnt = vec4(0., 0., 0., 0.);
    vec4 isAboveBreak = vec4(greaterThan( outColor, breakPnt));
    vec4 powSeg = pow(max( vec4(0., 0., 0., 0.), outColor ), gamma);
    vec4 res = isAboveBreak * powSeg + ( vec4(1., 1., 1., 1.) - isAboveBreak ) * outColor;
    outColor.rgb = vec3(res.x, res.y, res.z);
    outColor.a = res.w;
  }

  // Add Range processing

  {
    outColor.rgb = max(vec3(0., 0., 0.), outColor.rgb);
  }

  return outColor;
}


uniform sampler2D img;

void main()
{
    vec4 col = texture2D(img, gl_TexCoord[0].st);
    gl_FragColor = OCIODisplay(col);
}

@KevinJW KevinJW marked this pull request as ready for review January 19, 2026 20:49
@KevinJW KevinJW removed the Needs Discussion Needs discussion before implmentation, which could result in changes, or a decision not to proceed. label Jan 19, 2026
@remia

remia commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

From the sample log output you shared, my only comment would be that maybe we should add the current pass number (passes variable) somewhere?

@doug-walker doug-walker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Remi that it would be helpful to print the pass number.

Comment thread src/OpenColorIO/OpOptimizers.cpp Outdated
// Remove all ops for which isNoOp is true, including identity matrices.
int noops = optimizeIdentity ? RemoveNoOps(*this) : 0;
if (debugLoggingEnabled)
LogDebug(std::string("RemoveNoOps\n") + SerializeOpVec(*this, 4));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is perhaps a bit difficult to read through since it's printing out the result at each step, even if there was no change. Each optimization function return 0 if no change was made, so for example, you could just print out the relevant items with (for this function):
if (noops > 0 && debugLoggingEnabled)

But I don't object to leaving it as is, if you find it more helpful.

@KevinJW KevinJW force-pushed the feature/optimiser_debugging branch from f9b3524 to 4d9e394 Compare June 22, 2026 12:29
KevinJW added 5 commits June 23, 2026 18:07
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Add sstream to LogUtils.cpp which was previously being included
by transitive dependency in Op.h

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
…stage

Store the result of IsDebugLoggingEnabled() to avoid taking the internal mutex and to ensure either none or all the debugging will be output for the duration optimisation call.

Avoid calling operator<< between character string literals which can be combined by the preprocessor

Replace use of std::endl with "\n"

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Output Ops list only when it changes
Ensure passes count is >=1 even when optimisation cannot be done.

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
@KevinJW KevinJW force-pushed the feature/optimiser_debugging branch from 259abb9 to 40944b6 Compare June 23, 2026 17:10
@KevinJW

KevinJW commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

I've rebased and tweaked to give a shorter output when a given optimisation makes no changes. Plus added the pass number. Please take another glance.

…s variable when reporting the pass count.

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
@KevinJW

KevinJW commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Here is the current output vs previous

[OpenColorIO Debug]: **
[OpenColorIO Debug]: Optimizing Op Vec...
[OpenColorIO Debug]:     Op 0: <AllocationNoOp> lg2 -15 6
[OpenColorIO Debug]:     Op 1: <MatrixOffsetOp> <MatrixOffsetOp forward c0b0482a03bf2d0be5a5eecc46ddf616 >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 4: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]:     Op 5: <AllocationNoOp> uniform
[OpenColorIO Debug]: RemoveNoOpTypes - 2 optimisations found
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward c0b0482a03bf2d0be5a5eecc46ddf616 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicRev r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruFwd r:2.6 g:2.6 b:2.6 a:1  >
[OpenColorIO Debug]:     Op 3: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]: RemoveDynamicProperties - 0 removed
[OpenColorIO Debug]: Starting pass 1
[OpenColorIO Debug]: RemoveNoOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceIdentityOps - 0 optimisations found
[OpenColorIO Debug]: RemoveInverseOps - 0 optimisations found
[OpenColorIO Debug]: CombineOps - 1 optimisations found
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward c0b0482a03bf2d0be5a5eecc46ddf616 >
[OpenColorIO Debug]:     Op 1: <GammaOp> <GammaOp basicFwd r:1 g:1 b:1 a:1  >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]: Pass 1 summary: 0 no-op removed, 0 ops replaced, 0 identity ops replaced, 0 inverse op pairs removed, 1 ops combined.
[OpenColorIO Debug]: Starting pass 2
[OpenColorIO Debug]: RemoveNoOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceIdentityOps - 1 optimisations found
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward c0b0482a03bf2d0be5a5eecc46ddf616 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >
[OpenColorIO Debug]: RemoveInverseOps - 0 optimisations found
[OpenColorIO Debug]: CombineOps - 0 optimisations found
[OpenColorIO Debug]: Pass 2 summary: 0 no-op removed, 0 ops replaced, 1 identity ops replaced, 0 inverse op pairs removed, 0 ops combined.
[OpenColorIO Debug]: Starting pass 3
[OpenColorIO Debug]: RemoveNoOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceIdentityOps - 0 optimisations found
[OpenColorIO Debug]: RemoveInverseOps - 0 optimisations found
[OpenColorIO Debug]: CombineOps - 0 optimisations found
[OpenColorIO Debug]: ReplaceInverseLuts - 0 optimisations found
[OpenColorIO Debug]: **
[OpenColorIO Debug]: Optimized 6->3, 3 passes, 2 no-op types removed, 0 no-ops removed, 0 ops replaced, 1 identity ops replaced, 0 inverse op pairs removed, 1 ops combined, 0 ops inverted
[OpenColorIO Debug]:     Op 0: <MatrixOffsetOp> <MatrixOffsetOp forward c0b0482a03bf2d0be5a5eecc46ddf616 >
[OpenColorIO Debug]:     Op 1: <RangeOp> <RangeOp forward [0, nan, 0, nan] >
[OpenColorIO Debug]:     Op 2: <GammaOp> <GammaOp basicPassThruRev r:2.4 g:2.4 b:2.4 a:1  >

KevinJW added 2 commits June 25, 2026 19:56
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
@KevinJW KevinJW force-pushed the feature/optimiser_debugging branch from 08aebb1 to b9595b2 Compare June 25, 2026 19:22
KevinJW added 7 commits June 26, 2026 12:26
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
… pass the length of char* stings

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
… and report in the summary

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
…ices

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
As we only care about there being a single expensive Op switch to std::any_of should
return early once first matching Op is found.

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Hoist it out of the loop and clear() on demand

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
KevinJW added 3 commits June 26, 2026 14:39
…o function calls using std::as_const

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
…nst() usage

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
…mpliant

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants