The luma (8-tap) and chroma (4-tap) interpolation primitives are only
called with non-zero values of coeffIdx. This patch alters the tests for
these primitives so that they do not check with a coeffIdx of zero, in
order to allow this unused path to be omitted from SIMD optimised
primitives without causing test failures.
---
 source/test/ipfilterharness.cpp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/source/test/ipfilterharness.cpp b/source/test/ipfilterharness.cpp
index bd33678b1..1cc91d671 100644
--- a/source/test/ipfilterharness.cpp
+++ b/source/test/ipfilterharness.cpp
@@ -67,7 +67,7 @@ bool 
IPFilterHarness::check_IPFilterChroma_primitive(filter_pp_t ref, filter_pp_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100 + 2;
             rand_dstStride = rand() % 100 + 64;
@@ -102,7 +102,7 @@ bool 
IPFilterHarness::check_IPFilterChroma_ps_primitive(filter_ps_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -144,7 +144,7 @@ bool 
IPFilterHarness::check_IPFilterChroma_hps_primitive(filter_hps_t ref, filte
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             // 0 : Interpolate W x H, 1 : Interpolate W x (H + 7)
             for (int isRowExt = 0; isRowExt < 2; isRowExt++)
@@ -185,7 +185,7 @@ bool 
IPFilterHarness::check_IPFilterChroma_sp_primitive(filter_sp_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -220,7 +220,7 @@ bool 
IPFilterHarness::check_IPFilterChroma_ss_primitive(filter_ss_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -255,7 +255,7 @@ bool 
IPFilterHarness::check_IPFilterLuma_primitive(filter_pp_t ref, filter_pp_t
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -290,7 +290,7 @@ bool 
IPFilterHarness::check_IPFilterLuma_ps_primitive(filter_ps_t ref, filter_ps
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -325,7 +325,7 @@ bool 
IPFilterHarness::check_IPFilterLuma_hps_primitive(filter_hps_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             // 0 : Interpolate W x H, 1 : Interpolate W x (H + 7)
             for (int isRowExt = 0; isRowExt < 2; isRowExt++)
@@ -366,7 +366,7 @@ bool 
IPFilterHarness::check_IPFilterLuma_sp_primitive(filter_sp_t ref, filter_sp
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -401,7 +401,7 @@ bool 
IPFilterHarness::check_IPFilterLuma_ss_primitive(filter_ss_t ref, filter_ss
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -436,9 +436,9 @@ bool 
IPFilterHarness::check_IPFilterLumaHV_primitive(filter_hv_pp_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdxX = 0; coeffIdxX < 4; coeffIdxX++)
+        for (int coeffIdxX = 1; coeffIdxX < 4; coeffIdxX++)
         {
-            for (int coeffIdxY = 0; coeffIdxY < 4; coeffIdxY++)
+            for (int coeffIdxY = 1; coeffIdxY < 4; coeffIdxY++)
             {
                 rand_srcStride = rand() % 100;
                 rand_dstStride = rand() % 100 + 64;
-- 
2.42.1

>From 443fd72810bfe0164df8f99129144471ff6128ce Mon Sep 17 00:00:00 2001
Message-ID: <443fd72810bfe0164df8f99129144471ff6128ce.1725045303.git.hari.lim...@arm.com>
In-Reply-To: <cover.1725045303.git.hari.lim...@arm.com>
References: <cover.1725045303.git.hari.lim...@arm.com>
From: Hari Limaye <hari.lim...@arm.com>
Date: Thu, 7 Mar 2024 16:26:23 +0000
Subject: [PATCH 01/12] Test: Remove check for unused coeffIdx in ipfilter
 tests

The luma (8-tap) and chroma (4-tap) interpolation primitives are only
called with non-zero values of coeffIdx. This patch alters the tests for
these primitives so that they do not check with a coeffIdx of zero, in
order to allow this unused path to be omitted from SIMD optimised
primitives without causing test failures.
---
 source/test/ipfilterharness.cpp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/source/test/ipfilterharness.cpp b/source/test/ipfilterharness.cpp
index bd33678b1..1cc91d671 100644
--- a/source/test/ipfilterharness.cpp
+++ b/source/test/ipfilterharness.cpp
@@ -67,7 +67,7 @@ bool IPFilterHarness::check_IPFilterChroma_primitive(filter_pp_t ref, filter_pp_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100 + 2;
             rand_dstStride = rand() % 100 + 64;
@@ -102,7 +102,7 @@ bool IPFilterHarness::check_IPFilterChroma_ps_primitive(filter_ps_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -144,7 +144,7 @@ bool IPFilterHarness::check_IPFilterChroma_hps_primitive(filter_hps_t ref, filte
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             // 0 : Interpolate W x H, 1 : Interpolate W x (H + 7)
             for (int isRowExt = 0; isRowExt < 2; isRowExt++)
@@ -185,7 +185,7 @@ bool IPFilterHarness::check_IPFilterChroma_sp_primitive(filter_sp_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -220,7 +220,7 @@ bool IPFilterHarness::check_IPFilterChroma_ss_primitive(filter_ss_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 8; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 8; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -255,7 +255,7 @@ bool IPFilterHarness::check_IPFilterLuma_primitive(filter_pp_t ref, filter_pp_t
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -290,7 +290,7 @@ bool IPFilterHarness::check_IPFilterLuma_ps_primitive(filter_ps_t ref, filter_ps
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -325,7 +325,7 @@ bool IPFilterHarness::check_IPFilterLuma_hps_primitive(filter_hps_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             // 0 : Interpolate W x H, 1 : Interpolate W x (H + 7)
             for (int isRowExt = 0; isRowExt < 2; isRowExt++)
@@ -366,7 +366,7 @@ bool IPFilterHarness::check_IPFilterLuma_sp_primitive(filter_sp_t ref, filter_sp
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -401,7 +401,7 @@ bool IPFilterHarness::check_IPFilterLuma_ss_primitive(filter_ss_t ref, filter_ss
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdx = 0; coeffIdx < 4; coeffIdx++)
+        for (int coeffIdx = 1; coeffIdx < 4; coeffIdx++)
         {
             rand_srcStride = rand() % 100;
             rand_dstStride = rand() % 100 + 64;
@@ -436,9 +436,9 @@ bool IPFilterHarness::check_IPFilterLumaHV_primitive(filter_hv_pp_t ref, filter_
     {
         int index = i % TEST_CASES;
 
-        for (int coeffIdxX = 0; coeffIdxX < 4; coeffIdxX++)
+        for (int coeffIdxX = 1; coeffIdxX < 4; coeffIdxX++)
         {
-            for (int coeffIdxY = 0; coeffIdxY < 4; coeffIdxY++)
+            for (int coeffIdxY = 1; coeffIdxY < 4; coeffIdxY++)
             {
                 rand_srcStride = rand() % 100;
                 rand_dstStride = rand() % 100 + 64;
-- 
2.42.1

_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to