@@ -787,41 +787,27 @@ class CxCore_MulSpectrumsTest : public CxCore_DXTBaseTest
787
787
protected:
788
788
void run_func ();
789
789
void prepare_to_validation ( int test_case_idx );
790
- #if defined(__aarch64__) && defined(NDEBUG)
791
790
double get_success_error_level ( int test_case_idx, int i, int j );
792
- #endif
793
791
};
794
792
795
793
796
794
CxCore_MulSpectrumsTest::CxCore_MulSpectrumsTest () : CxCore_DXTBaseTest( true , true , true )
797
795
{
798
796
}
799
797
800
- #if defined(__aarch64__) && defined(NDEBUG)
801
798
double CxCore_MulSpectrumsTest::get_success_error_level ( int test_case_idx, int i, int j )
802
799
{
800
+ (void )test_case_idx;
801
+ CV_Assert (i == OUTPUT);
802
+ CV_Assert (j == 0 );
803
803
int elem_depth = CV_MAT_DEPTH (cvGetElemType (test_array[i][j]));
804
- if ( elem_depth <= CV_32F )
805
- {
806
- return ArrayTest::get_success_error_level ( test_case_idx, i, j );
807
- }
808
- switch ( test_case_idx )
809
- {
810
- // Usual threshold is too strict for these test cases due to the difference of fmsub and fsub
811
- case 399 :
812
- case 420 :
813
- return DBL_EPSILON * 20000 ;
814
- case 65 :
815
- case 161 :
816
- case 287 :
817
- case 351 :
818
- case 458 :
819
- return DBL_EPSILON * 10000 ;
820
- default :
821
- return ArrayTest::get_success_error_level ( test_case_idx, i, j );
822
- }
804
+ CV_Assert (elem_depth == CV_32F || elem_depth == CV_64F);
805
+
806
+ element_wise_relative_error = false ;
807
+ double maxInputValue = 1000 ; // ArrayTest::get_minmax_bounds
808
+ double err = 8 * maxInputValue; // result = A*B + C*D
809
+ return (elem_depth == CV_32F ? FLT_EPSILON : DBL_EPSILON) * err;
823
810
}
824
- #endif
825
811
826
812
void CxCore_MulSpectrumsTest::run_func ()
827
813
{
0 commit comments