[opencv] 32/89: fix Core_MulSpectrum test on 64bit ARM + release mode * fix issue 6536 * increase threshold in particular tests due to the difference of fmsub and fsub

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sat May 13 09:57:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.

commit 3ea4f72e35c7bd7cd866c44b43461896f2ab7c65
Author: Tomoaki Teshima <tomoaki.teshima at gmail.com>
Date:   Fri May 20 18:17:22 2016 +0900

    fix Core_MulSpectrum test on 64bit ARM + release mode
      * fix issue 6536
      * increase threshold in particular tests due to the difference of fmsub and fsub
---
 modules/core/test/test_dxt.cpp | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/modules/core/test/test_dxt.cpp b/modules/core/test/test_dxt.cpp
index 33ddb02..2aaabbf 100644
--- a/modules/core/test/test_dxt.cpp
+++ b/modules/core/test/test_dxt.cpp
@@ -778,6 +778,9 @@ public:
 protected:
     void run_func();
     void prepare_to_validation( int test_case_idx );
+#if defined(__aarch64__) && defined(NDEBUG)
+    double get_success_error_level( int test_case_idx, int i, int j );
+#endif
 };
 
 
@@ -785,6 +788,31 @@ CxCore_MulSpectrumsTest::CxCore_MulSpectrumsTest() : CxCore_DXTBaseTest( true, t
 {
 }
 
+#if defined(__aarch64__) && defined(NDEBUG)
+double CxCore_MulSpectrumsTest::get_success_error_level( int test_case_idx, int i, int j )
+{
+    int elem_depth = CV_MAT_DEPTH(cvGetElemType(test_array[i][j]));
+    if( elem_depth <= CV_32F )
+    {
+        return ArrayTest::get_success_error_level( test_case_idx, i, j );
+    }
+    switch( test_case_idx )
+    {
+        //  Usual threshold is too strict for these test cases due to the difference of fmsub and fsub
+        case 399:
+        case 420:
+            return DBL_EPSILON * 20000;
+        case 65:
+        case 161:
+        case 287:
+        case 351:
+        case 458:
+            return DBL_EPSILON * 10000;
+        default:
+            return ArrayTest::get_success_error_level( test_case_idx, i, j );
+    }
+}
+#endif
 
 void CxCore_MulSpectrumsTest::run_func()
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list