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

Function Validate

tests/cpu/CPUProcessor_tests.cpp:1397–1407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1395}
1396
1397void Validate(const OCIO::PackedImageDesc & imgDesc, unsigned lineNo)
1398{
1399 const float * outImg = reinterpret_cast<float*>(imgDesc.getData());
1400 for(size_t pxl=0; pxl<NB_PIXELS; ++pxl)
1401 {
1402 OCIO_CHECK_CLOSE_FROM(outImg[4*pxl+0], resImg[4*pxl+0], 1e-6f, lineNo);
1403 OCIO_CHECK_CLOSE_FROM(outImg[4*pxl+1], resImg[4*pxl+1], 1e-6f, lineNo);
1404 OCIO_CHECK_CLOSE_FROM(outImg[4*pxl+2], resImg[4*pxl+2], 1e-6f, lineNo);
1405 OCIO_CHECK_CLOSE_FROM(outImg[4*pxl+3], resImg[4*pxl+3], 1e-6f, lineNo);
1406 }
1407}
1408
1409void Process(const OCIO::ConstCPUProcessorRcPtr & cpuProcessor,
1410 const OCIO::PackedImageDesc & srcImgDesc,

Callers 2

ProcessFunction · 0.85
ValidateForOCIOMethod · 0.85

Calls 1

getDataMethod · 0.45

Tested by

no test coverage detected