Perceptual Color
5#include "interlacingpass.h"
26InterlacingPass::InterlacingPass(
const int passCount)
28 if (!isOdd(passCount)) {
35 const int floorOfHalfCoundown = qFloor(passCount / 2.0);
36 const int baseSize = qRound(qPow(2, floorOfHalfCoundown));
38 countdown = passCount;
39 rectangleSize.setWidth(baseSize);
40 rectangleSize.setHeight(baseSize);
41 columnFrequency = baseSize;
43 lineFrequency = baseSize;
51void InterlacingPass::switchToNextPass()
59 const int floorOfHalfCoundown = qFloor(countdown / 2.0);
60 const int baseSize = qRound(qPow(2, floorOfHalfCoundown));
62 if (isOdd(countdown)) {
63 rectangleSize.setWidth(baseSize);
64 rectangleSize.setHeight(baseSize);
65 columnFrequency = baseSize;
67 lineFrequency = baseSize * 2;
68 lineOffset = baseSize;
70 const int halfBaseSize = baseSize / 2;
73 rectangleSize.setWidth(halfBaseSize);
74 rectangleSize.setHeight(baseSize);
75 columnFrequency = baseSize;
76 columnOffset = halfBaseSize;
77 lineFrequency = baseSize;
82static_assert(std::is_trivially_copyable_v<InterlacingPass>);
84static_assert(std::is_standard_layout_v<InterlacingPass>);
The namespace of this library.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:52:11 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.