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

Method apply

src/OpenColorIO/CPUProcessor.cpp:379–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void CPUProcessor::Impl::apply(const ImageDesc & imgDesc) const
380{
381 // Get the ScanlineHelper for this thread (no significant performance impact).
382 std::unique_ptr<ScanlineHelper>
383 scanlineBuilder(CreateScanlineHelper(m_inBitDepth, m_inBitDepthOp,
384 m_outBitDepth, m_outBitDepthOp));
385
386 // Prepare the processing.
387 scanlineBuilder->init(imgDesc);
388
389 float * rgbaBuffer = nullptr;
390 long numPixels = 0;
391
392 while(true)
393 {
394 scanlineBuilder->prepRGBAScanline(&rgbaBuffer, numPixels);
395 if(numPixels == 0) break;
396
397 const size_t numOps = m_cpuOps.size();
398 for(size_t i = 0; i<numOps; ++i)
399 {
400 m_cpuOps[i]->apply(rgbaBuffer, rgbaBuffer, numPixels);
401 }
402
403 scanlineBuilder->finishRGBAScanline();
404 }
405}
406
407void CPUProcessor::Impl::apply(const ImageDesc & srcImgDesc, ImageDesc & dstImgDesc) const
408{

Callers 2

applyRGBMethod · 0.45
applyRGBAMethod · 0.45

Calls 6

CreateScanlineHelperFunction · 0.85
prepRGBAScanlineMethod · 0.80
finishRGBAScanlineMethod · 0.80
getImplFunction · 0.50
initMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected