Skip to content

Commit 7b13550

Browse files
committed
Merge pull request opencv#7697 from alalek:backport_6561
2 parents 62b2039 + 3ea4f72 commit 7b13550

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

modules/core/test/test_dxt.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,13 +778,41 @@ class CxCore_MulSpectrumsTest : public CxCore_DXTBaseTest
778778
protected:
779779
void run_func();
780780
void prepare_to_validation( int test_case_idx );
781+
#if defined(__aarch64__) && defined(NDEBUG)
782+
double get_success_error_level( int test_case_idx, int i, int j );
783+
#endif
781784
};
782785

783786

784787
CxCore_MulSpectrumsTest::CxCore_MulSpectrumsTest() : CxCore_DXTBaseTest( true, true, true )
785788
{
786789
}
787790

791+
#if defined(__aarch64__) && defined(NDEBUG)
792+
double CxCore_MulSpectrumsTest::get_success_error_level( int test_case_idx, int i, int j )
793+
{
794+
int elem_depth = CV_MAT_DEPTH(cvGetElemType(test_array[i][j]));
795+
if( elem_depth <= CV_32F )
796+
{
797+
return ArrayTest::get_success_error_level( test_case_idx, i, j );
798+
}
799+
switch( test_case_idx )
800+
{
801+
// Usual threshold is too strict for these test cases due to the difference of fmsub and fsub
802+
case 399:
803+
case 420:
804+
return DBL_EPSILON * 20000;
805+
case 65:
806+
case 161:
807+
case 287:
808+
case 351:
809+
case 458:
810+
return DBL_EPSILON * 10000;
811+
default:
812+
return ArrayTest::get_success_error_level( test_case_idx, i, j );
813+
}
814+
}
815+
#endif
788816

789817
void CxCore_MulSpectrumsTest::run_func()
790818
{

0 commit comments

Comments
 (0)