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

Method apply

src/OpenColorIO/ops/cdl/CDLOpCPU.cpp:348–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346#if OCIO_USE_SSE2
347template<bool CLAMP>
348void CDLRendererFwdSSE<CLAMP>::apply(const void * inImg, void * outImg, long numPixels) const
349{
350 __m128 slope, offset, power, saturation, pix;
351 LoadRenderParams(this->m_renderParams, slope, offset, power, saturation);
352
353 float inAlpha;
354
355 const float * in = (const float *)inImg;
356 float * out = (float *)outImg;
357
358 for(long idx=0; idx<numPixels; ++idx)
359 {
360 pix = LoadPixel(in, inAlpha);
361
362 pix = _mm_mul_ps(pix, slope);
363 pix = _mm_add_ps(pix, offset);
364
365 ApplyPower<CLAMP>(pix, power);
366
367 ApplySaturation(pix, saturation);
368 ApplyClamp<CLAMP>(pix);
369
370 StorePixel(out, pix, inAlpha);
371
372 in += 4;
373 out += 4;
374 }
375}
376#endif
377
378template<bool CLAMP>

Callers 11

EvalTransformFunction · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45
bakeMethod · 0.45

Calls 10

LoadRenderParamsFunction · 0.85
LoadPixelFunction · 0.85
StorePixelFunction · 0.85
ApplySaturationFunction · 0.70
ApplySlopeFunction · 0.70
ApplyOffsetFunction · 0.70
getSlopeMethod · 0.45
getOffsetMethod · 0.45
getPowerMethod · 0.45
getSaturationMethod · 0.45

Tested by

no test coverage detected