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

Method apply

src/OpenColorIO/ops/log/LogOpCPU.cpp:391–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void LogRenderer::apply(const void * inImg, void * outImg, long numPixels) const
392{
393 static constexpr float minValue = std::numeric_limits<float>::min();
394
395 const float * in = (const float *)inImg;
396 float * out = (float *)outImg;
397
398 for (long idx = 0; idx<numPixels; ++idx)
399 {
400 const float alphares = in[3];
401
402 // NB: 'in' and 'out' could be pointers to the same memory buffer.
403 std::memcpy(out, in, 4 * sizeof(float));
404
405 ApplyMax(out, minValue);
406 ApplyLog2(out);
407 ApplyScale(out, m_logScale);
408
409 out[3] = alphares;
410
411 in += 4;
412 out += 4;
413 }
414}
415
416#if OCIO_USE_SSE2
417LogRendererSSE::LogRendererSSE(ConstLogOpDataRcPtr & log, float logScale)

Callers

nothing calls this directly

Calls 8

ApplyMaxFunction · 0.85
ApplyLog2Function · 0.85
sseLog2Function · 0.85
ApplyExp2Function · 0.85
sseExp2Function · 0.85
ApplyAddFunction · 0.85
ApplyScaleFunction · 0.70
_mm_max_psFunction · 0.50

Tested by

no test coverage detected