Lines Matching refs:reference

114 bool comparePixelRGBA8 (const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const RGBA threshold, int x, int y)
118 // Step 1: Compare result pixel to 3x3 neighborhood pixels in reference.
122 const deUint32 x2 = (deUint32)de::min(x+1, reference.getWidth()-1);
125 const deUint32 y2 = (deUint32)de::min(y+1, reference.getHeight()-1);
127 if (compareThreshold(resPix, readRGBA8(reference, x1, y1), threshold) ||
128 compareThreshold(resPix, readRGBA8(reference, x0, y1), threshold) ||
129 compareThreshold(resPix, readRGBA8(reference, x2, y1), threshold) ||
130 compareThreshold(resPix, readRGBA8(reference, x0, y0), threshold) ||
131 compareThreshold(resPix, readRGBA8(reference, x1, y0), threshold) ||
132 compareThreshold(resPix, readRGBA8(reference, x2, y0), threshold) ||
133 compareThreshold(resPix, readRGBA8(reference, x0, y2), threshold) ||
134 compareThreshold(resPix, readRGBA8(reference, x1, y2), threshold) ||
135 compareThreshold(resPix, readRGBA8(reference, x2, y2), threshold))
179 if (!de::inBounds(u, 0, (reference.getWidth()-1)<<NUM_SUBPIXEL_BITS) ||
180 !de::inBounds(v, 0, (reference.getHeight()-1)<<NUM_SUBPIXEL_BITS))
183 if (compareThreshold(resPix, bilinearSampleRGBA8(reference, (deUint32)u, (deUint32)v), threshold))
191 bool bilinearCompareRGBA8 (const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const PixelBufferAccess& errorMask, const RGBA threshold)
193 DE_ASSERT(reference.getFormat() == TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8) &&
201 for (int y = 0; y < reference.getHeight(); y++)
203 for (int x = 0; x < reference.getWidth(); x++)
205 if (!comparePixelRGBA8(reference, result, threshold, x, y) &&
206 !comparePixelRGBA8(result, reference, threshold, x, y))
219 bool bilinearCompare (const ConstPixelBufferAccess& reference, const ConstPixelBufferAccess& result, const PixelBufferAccess& errorMask, const RGBA threshold)
221 DE_ASSERT(reference.getWidth() == result.getWidth() &&
222 reference.getHeight() == result.getHeight() &&
223 reference.getDepth() == result.getDepth() &&
224 reference.getFormat() == result.getFormat());
225 DE_ASSERT(reference.getWidth() == errorMask.getWidth() &&
226 reference.getHeight() == errorMask.getHeight() &&
227 reference.getDepth() == errorMask.getDepth());
229 if (reference.getFormat() == TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_INT8))
230 return bilinearCompareRGBA8(reference, result, errorMask, threshold);