MCPcopy Create free account
hub / github.com/NatronGitHub/openfx-misc / buildTimesSlit

Function buildTimesSlit

SlitScan/SlitScan.cpp:474–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474void
475buildTimesSlit(double time,
476 double a,
477 double b,
478 double retimeGain,
479 double retimeOffset,
480 bool retimeAbsolute,
481 FilterEnum filter,
482 std::set<double> *sourceImagesTimes)
483{
484 a = a * retimeGain + retimeOffset;
485 b = b * retimeGain + retimeOffset;
486 if (!retimeAbsolute) {
487 a += time;
488 b += time;
489 }
490 if (a > b) {
491 std::swap(a, b);
492 }
493 int tmin, tmax;
494 switch (filter) {
495 case eFilterNearest: {
496 tmin = (int)std::floor(a + 0.5);
497 tmax = (int)std::floor(b + 0.5);
498 break;
499 }
500 case eFilterLinear: {
501 tmin = (int)std::floor(a);
502 tmax = (int)std::ceil(b);
503 break;
504 }
505 }
506 for (int t = tmin; t <= tmax; ++t) {
507 sourceImagesTimes->insert(t);
508 }
509}
510
511class SlitScanProcessorBase
512 : public PixelProcessor

Callers 1

setupAndProcessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected