Merge "Fix error double accounting in fuzzyCompare()" am: 0cf17c4bf8
authorAlexander Galazin <alexander.galazin@arm.com>
Wed, 16 Aug 2017 18:23:48 +0000 (18:23 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 16 Aug 2017 18:23:48 +0000 (18:23 +0000)
am: f64327185c

Change-Id: I5a42417bee0eab58fc2cae3a653e41e4624cb2eb

framework/common/tcuFuzzyImageCompare.cpp

index 596ab83..4e76476 100644 (file)
@@ -318,7 +318,7 @@ float fuzzyCompare (const FuzzyCompareParams& params, const ConstPixelBufferAcce
 
        for (int y = 1; y < height-1; y++)
        {
-               for (int x = 1; x < width-1; x += params.maxSampleSkip > 0 ? (int)rnd.getInt(0, params.maxSampleSkip) : 1)
+               for (int x = 1; x < width-1; x += 1 + (int)rnd.getInt(0, params.maxSampleSkip))
                {
                        const deUint32  minDist2RefToCmp        = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(refAccess, x, y), cmpAccess, x, y);
                        const deUint32  minDist2CmpToRef        = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(cmpAccess, x, y), refAccess, x, y);