MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / GetSrcRange

Function GetSrcRange

src/OpenColorIO/BakingUtils.cpp:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 void GetSrcRange(const Baker & baker,
54 const char * src,
55 float & start,
56 float & end)
57 {
58 // Calculate min/max value
59 ConstProcessorRcPtr proc = baker.getConfig()->getProcessor(
60 src, baker.getInputSpace());
61 ConstCPUProcessorRcPtr cpu = proc->getOptimizedCPUProcessor(
62 OPTIMIZATION_LOSSLESS);
63
64 float minval[3] = {0.0f, 0.0f, 0.0f};
65 float maxval[3] = {1.0f, 1.0f, 1.0f};
66
67 cpu->applyRGB(minval);
68 cpu->applyRGB(maxval);
69
70 start = std::min(std::min(minval[0], minval[1]), minval[2]);
71 end = std::max(std::max(maxval[0], maxval[1]), maxval[2]);
72 }
73} // Anonymous namespace
74
75

Callers 2

GetShaperRangeFunction · 0.85
GetTargetRangeFunction · 0.85

Calls 5

getProcessorMethod · 0.45
getConfigMethod · 0.45
getInputSpaceMethod · 0.45
applyRGBMethod · 0.45

Tested by

no test coverage detected