YCbCr: go through the correct location ranges when sampling
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 9 Feb 2018 15:20:25 +0000 (15:20 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 9 Feb 2018 16:21:09 +0000 (16:21 +0000)
Affects: dEQP-VK.ycbcr.conversion.*
Components: Vulkan
VK-GL-CTS issue: 1005

Change-Id: Ifac1026e82e1bb48195fc7ab5429951a15324042

external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp

index 163f69e..442320a 100644 (file)
@@ -1207,7 +1207,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (subsampledY ? calculateNearestIJRange(coordFormat, chromaV) : IVec2(j, j));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  srcColor[]      =
                                                                {
@@ -1231,7 +1231,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (subsampledY ? calculateLinearIJRange(coordFormat, chromaV) : IVec2(j, j));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  chromaA (calculateAB(subTexelPrecisionBits, chromaU, chromaI));
                                                                const Interval  chromaB (calculateAB(subTexelPrecisionBits, chromaV, chromaJ));
@@ -1396,7 +1396,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (calculateNearestIJRange(coordFormat, chromaV));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  srcColor[]      =
                                                                {
@@ -1419,7 +1419,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (calculateNearestIJRange(coordFormat, chromaV));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  chromaA         (calculateAB(subTexelPrecisionBits, chromaU, chromaI));
                                                                const Interval  chromaB         (calculateAB(subTexelPrecisionBits, chromaV, chromaJ));