Lines Matching refs:reference

44 void computeScaleAndBias (const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, tcu::Vec4& scale, tcu::Vec4& bias)
53 estimatePixelValueRange(reference, refMin, refMax);
91 static int findNumPositionDeviationFailingPixels (const PixelBufferAccess& errorMask, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const UVec4& threshold, const tcu::IVec3& maxPositionDeviation, bool acceptOutOfBoundsAsAnyValue)
95 const int width = reference.getWidth();
96 const int height = reference.getHeight();
97 const int depth = reference.getDepth();
119 const IVec4 refPix = reference.getPixelInt(x, y, z);
131 // Find matching pixels for both result and reference pixel
136 // Find deviated result pixel for reference
159 // Find deviated reference pixel for result
165 const IVec4 deviatedRefPix = reference.getPixelInt(sx, sy, sz);
211 * \param reference Reference image
217 bool fuzzyCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, float threshold, CompareLogMode logMode)
220 TextureLevel errorMask (TextureFormat(TextureFormat::RGB, TextureFormat::UNORM_INT8), reference.getWidth(), reference.getHeight());
221 float difference = fuzzyCompare(params, reference, result, errorMask.getAccess());
230 fuzzyCompare(params, reference, result, errorMask.getAccess());
232 if (result.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8) && reference.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8))
233 computeScaleAndBias(reference, result, pixelScale, pixelBias);
240 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
260 * This compare expects bit precision between result and reference image.
273 * \param reference Reference image
278 bool bitwiseCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, CompareLogMode logMode)
280 int width = reference.getWidth();
281 int height = reference.getHeight();
282 int depth = reference.getDepth();
286 TCU_CHECK_INTERNAL(reference.getFormat() == result.getFormat()); result.getPixelPitch();
300 const U64Vec4 refPix = reference.getPixelBitsAsUint64(x, y, z);
313 const auto refChannelClass = tcu::getTextureChannelClass(reference.getFormat().type);
316 const bool refIsUint8 = (reference.getFormat().type == TextureFormat::UNSIGNED_INT8);
325 computeScaleAndBias(reference, result, pixelScale, pixelBias);
326 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
335 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
375 * \param reference Reference image
381 bool fuzzyCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const Surface& reference, const Surface& result, float threshold, CompareLogMode logMode)
383 return fuzzyCompare(log, imageSetName, imageSetDesc, reference.getAccess(), result.getAccess(), threshold, logMode);
416 * Computes accuracy metric using per-pixel differences between reference
423 * \param reference Reference image
430 int measurePixelDiffAccuracy (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, int bestScoreDiff, int worstScoreDiff, CompareLogMode logMode)
432 TextureLevel diffMask (TextureFormat(TextureFormat::RGB, TextureFormat::UNORM_INT8), reference.getWidth(), reference.getHeight());
434 deInt64 squaredSum = computeSquaredDiffSum(reference, result, diffMask.getAccess(), diffFactor);
443 if (result.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8) && reference.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8))
444 computeScaleAndBias(reference, result, pixelScale, pixelBias);
448 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
472 * Computes accuracy metric using per-pixel differences between reference
479 * \param reference Reference image
486 int measurePixelDiffAccuracy (TestLog& log, const char* imageSetName, const char* imageSetDesc, const Surface& reference, const Surface& result, int bestScoreDiff, int worstScoreDiff, CompareLogMode logMode)
488 return measurePixelDiffAccuracy(log, imageSetName, imageSetDesc, reference.getAccess(), result.getAccess(), bestScoreDiff, worstScoreDiff, logMode);
563 * This compare computes per-pixel differences between result and reference
577 * \param reference Reference image
583 bool floatUlpThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const UVec4& threshold, CompareLogMode logMode)
585 int width = reference.getWidth();
586 int height = reference.getHeight();
587 int depth = reference.getDepth();
602 const Vec4 refPix = reference.getPixel(x, y, z);
619 if (tcu::getTextureChannelClass(reference.getFormat().type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT ||
622 computeScaleAndBias(reference, result, pixelScale, pixelBias);
623 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
631 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
651 * This compare computes per-pixel differences between result and reference
663 * \param reference Reference image
669 bool floatThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const Vec4& threshold, CompareLogMode logMode)
671 int width = reference.getWidth();
672 int height = reference.getHeight();
673 int depth = reference.getDepth();
688 Vec4 refPix = reference.getPixel(x, y, z);
706 if (tcu::getTextureChannelClass(reference.getFormat().type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT ||
709 computeScaleAndBias(reference, result, pixelScale, pixelBias);
710 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
718 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
738 * This compare computes per-pixel differences between result and reference
741 * Any pixels in reference that match the ignore key are ignored.
752 * \param reference Reference image
759 bool floatThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const Vec4& ignorekey, const Vec4& threshold, CompareLogMode logMode)
761 int width = reference.getWidth();
762 int height = reference.getHeight();
763 int depth = reference.getDepth();
778 Vec4 refPix = reference.getPixel(x, y, z);
800 if (tcu::getTextureChannelClass(reference.getFormat().type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT ||
803 computeScaleAndBias(reference, result, pixelScale, pixelBias);
804 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
812 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
832 * This compare computes per-pixel differences between result and reference
844 * \param reference Reference color
850 bool floatThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const Vec4& reference, const ConstPixelBufferAccess& result, const Vec4& threshold, CompareLogMode logMode)
869 const Vec4 diff = abs(reference - cmpPix);
894 log << TestLog::Message << "Image comparison failed: max difference = " << maxDiff << ", threshold = " << threshold << ", reference = " << reference << TestLog::EndMessage;
917 * This compare computes per-pixel differences between result and reference
929 * \param reference Reference image
936 bool intThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const UVec4& threshold, CompareLogMode logMode, bool use64Bits)
938 int width = reference.getWidth();
939 int height = reference.getHeight();
940 int depth = reference.getDepth();
959 I64Vec4 refPix = reference.getPixelInt64(x, y, z);
965 IVec4 refPix = reference.getPixelInt(x, y, z);
983 const auto refChannelClass = tcu::getTextureChannelClass(reference.getFormat().type);
986 const bool refIsUint8 = (reference.getFormat().type == TextureFormat::UNSIGNED_INT8);
995 computeScaleAndBias(reference, result, pixelScale, pixelBias);
996 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
1005 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
1025 * This compare computes per-pixel differences between result and reference
1037 * \param reference Reference image
1043 bool dsThresholdCompare(TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const float threshold, CompareLogMode logMode)
1045 int width = reference.getWidth();
1046 int height = reference.getHeight();
1047 int depth = reference.getDepth();
1067 float refDepth = reference.getPixDepth(x, y, z);
1077 deUint8 refStencil = (deUint8) reference.getPixStencil(x, y, z);
1105 // << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
1127 * This compare computes per-pixel differences between result and reference
1144 * \param reference Reference image
1153 bool intThresholdPositionDeviationCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const UVec4& threshold, const tcu::IVec3& maxPositionDeviation, bool acceptOutOfBoundsAsAnyValue, CompareLogMode logMode)
1155 const int width = reference.getWidth();
1156 const int height = reference.getHeight();
1157 const int depth = reference.getDepth();
1160 const int numFailingPixels = findNumPositionDeviationFailingPixels(errorMask, reference, result, threshold, maxPositionDeviation, acceptOutOfBoundsAsAnyValue);
1168 if (tcu::getTextureChannelClass(reference.getFormat().type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT ||
1171 computeScaleAndBias(reference, result, pixelScale, pixelBias);
1172 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
1184 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
1204 * This compare computes per-pixel differences between result and reference
1222 * \param reference Reference image
1232 bool intThresholdPositionDeviationErrorThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const UVec4& threshold, const tcu::IVec3& maxPositionDeviation, bool acceptOutOfBoundsAsAnyValue, int maxAllowedFailingPixels, CompareLogMode logMode)
1234 const int width = reference.getWidth();
1235 const int height = reference.getHeight();
1236 const int depth = reference.getDepth();
1239 const int numFailingPixels = findNumPositionDeviationFailingPixels(errorMask, reference, result, threshold, maxPositionDeviation, acceptOutOfBoundsAsAnyValue);
1247 if (tcu::getTextureChannelClass(reference.getFormat().type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT ||
1250 computeScaleAndBias(reference, result, pixelScale, pixelBias);
1251 log << TestLog::Message << "Result and reference images are normalized with formula p * " << pixelScale << " + " << pixelBias << TestLog::EndMessage;
1264 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)
1284 * This compare computes per-pixel differences between result and reference
1293 * \param reference Reference image
1299 bool pixelThresholdCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const Surface& reference, const Surface& result, const RGBA& threshold, CompareLogMode logMode)
1301 return intThresholdCompare(log, imageSetName, imageSetDesc, reference.getAccess(), result.getAccess(), threshold.toIVec().cast<deUint32>(), logMode);
1316 * \param reference Reference image
1322 bool bilinearCompare (TestLog& log, const char* imageSetName, const char* imageSetDesc, const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const RGBA threshold, CompareLogMode logMode)
1324 TextureLevel errorMask (TextureFormat(TextureFormat::RGB, TextureFormat::UNORM_INT8), reference.getWidth(), reference.getHeight());
1325 bool isOk = bilinearCompare(reference, result, errorMask, threshold);
1331 if (result.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8) && reference.getFormat() != TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8))
1332 computeScaleAndBias(reference, result, pixelScale, pixelBias);
1339 << TestLog::Image("Reference", "Reference", reference, pixelScale, pixelBias)