Home
Phabricator
Search
Log In
Paste
P359
Masterwork From Distant Lands
Active
Public
Actions
Authored by
dkazakov
on Apr 2 2019, 2:56 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/libs/image/kis_filter_weights_buffer.h b/libs/image/kis_filter_weights_buffer.h
index aea68b9..434b965 100644
--- a/libs/image/kis_filter_weights_buffer.h
+++ b/libs/image/kis_filter_weights_buffer.h
@@ -45,10 +45,10 @@ static bool checkForAsymmetricZeros = false;
if ((m_filterWeights[i].weight[j] && !m_filterWeights[i].weight[idx2]) || \
(!m_filterWeights[i].weight[j] && m_filterWeights[i].weight[idx2])) { \
\
- dbgKrita << "*******"; \
- dbgKrita << "Non-symmetric zero found:" << centerSrc; \
- dbgKrita << "Weight" << j << ":" << m_filterWeights[i].weight[j]; \
- dbgKrita << "Weight" << idx2 << ":" << m_filterWeights[i].weight[idx2]; \
+ qDebug() << "*******"; \
+ qDebug() << "Non-symmetric zero found:" << centerSrc; \
+ qDebug() << "Weight" << j << ":" << m_filterWeights[i].weight[j]; \
+ qDebug() << "Weight" << idx2 << ":" << m_filterWeights[i].weight[idx2]; \
qFatal("Non-symmetric zero -> fail"); \
} \
} \
@@ -66,22 +66,24 @@ static bool checkForAsymmetricZeros = false;
#define SANITY_CHECKSUM()
#endif
+#define DEBUG_ENABLED
+
#ifdef DEBUG_ENABLED
#define DEBUG_ALL() \
do { \
- dbgKrita << "************** i =" << i; \
- dbgKrita << ppVar(centerSrc); \
- dbgKrita << ppVar(centerIndex); \
- dbgKrita << ppVar(beginSrc) << ppVar(endSrc); \
- dbgKrita << ppVar(beginDst) << ppVar(endDst); \
- dbgKrita << ppVar(scaledIter) << ppVar(scaledInc); \
- dbgKrita << ppVar(span); \
- dbgKrita << "==="; \
+ qDebug() << "************** i =" << i; \
+ qDebug() << ppVar(centerSrc); \
+ qDebug() << ppVar(centerIndex); \
+ qDebug() << ppVar(beginSrc) << ppVar(endSrc); \
+ qDebug() << ppVar(beginDst) << ppVar(endDst); \
+ qDebug() << ppVar(scaledIter) << ppVar(scaledInc); \
+ qDebug() << ppVar(span); \
+ qDebug() << "==="; \
} while (0)
#define DEBUG_SAMPLE() \
do { \
- dbgKrita << ppVar(scaledIter) << ppVar(t); \
+ qDebug() << ppVar(scaledIter) << ppVar(t); \
} while (0)
#else
#define DEBUG_ALL() Q_UNUSED(beginDst); Q_UNUSED(endDst)
diff --git a/libs/image/tests/kis_filter_weights_applicator_test.cpp b/libs/image/tests/kis_filter_weights_applicator_test.cpp
index d142cb7..2030c39 100644
--- a/libs/image/tests/kis_filter_weights_applicator_test.cpp
+++ b/libs/image/tests/kis_filter_weights_applicator_test.cpp
@@ -67,6 +67,12 @@ void testSpan(qreal scale, qreal dx, int dst_l,
}
}
+void KisFilterWeightsApplicatorTest::testSpan_Scale_0_5_Aligned_NN()
+{
+ KisFilterStrategy *filter = new KisBoxFilterStrategy();
+ KisFilterWeightsBuffer buf(filter, 0.5);
+}
+
void KisFilterWeightsApplicatorTest::testSpan_Scale_2_0_Aligned()
{
testSpan(2.0, 0.0, 0, -1, 0.25, 1.0);
diff --git a/libs/image/tests/kis_filter_weights_applicator_test.h b/libs/image/tests/kis_filter_weights_applicator_test.h
index e9e2c25..5777cbf 100644
--- a/libs/image/tests/kis_filter_weights_applicator_test.h
+++ b/libs/image/tests/kis_filter_weights_applicator_test.h
@@ -25,6 +25,9 @@ class KisFilterWeightsApplicatorTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
+ void testSpan_Scale_0_5_Aligned_NN();
+
+
void testSpan_Scale_2_0_Aligned();
void testSpan_Scale_2_0_Shift_0_5();
void testSpan_Scale_2_0_Shift_0_75();
dkazakov
edited the content of this paste.
(Show Details)
Apr 2 2019, 2:56 PM
dkazakov
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment