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

Method validate

src/OpenColorIO/ops/lut1d/Lut1DOpData.cpp:393–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void Lut1DOpData::validate() const
394{
395 if (m_hueAdjust == HUE_WYPN)
396 {
397 throw Exception("1D LUT HUE_WYPN hue adjust style is not implemented.");
398 }
399
400 if (!IsValidInterpolation(m_interpolation))
401 {
402 std::ostringstream oss;
403 oss << "1D LUT does not support interpolation algorithm: ";
404 oss << InterpolationToString(getInterpolation());
405 oss << ".";
406 throw Exception(oss.str().c_str());
407 }
408
409 try
410 {
411 getArray().validate();
412 }
413 catch (const Exception& e)
414 {
415 std::ostringstream oss;
416 oss << "1D LUT content array issue: ";
417 oss << e.what();
418
419 throw Exception(oss.str().c_str());
420 }
421
422 // If isHalfDomain is set, we need to make sure we have 65536 entries.
423 if (isInputHalfDomain() && getArray().getLength()
424 != HALF_DOMAIN_REQUIRED_ENTRIES)
425 {
426 std::ostringstream oss;
427 oss << "1D LUT: ";
428 oss << getArray().getLength();
429 oss << " entries found, ";
430 oss << HALF_DOMAIN_REQUIRED_ENTRIES;
431 oss << " required for halfDomain 1D LUT.";
432
433 throw Exception(oss.str().c_str());
434 }
435}
436
437unsigned long Lut1DOpData::GetLutIdealSize(BitDepth incomingBitDepth)
438{

Callers 1

BuildLut1DOpFunction · 0.45

Calls 2

InterpolationToStringFunction · 0.85
getLengthMethod · 0.45

Tested by

no test coverage detected