]> git.sesse.net Git - ffmpeg/blobdiff - tests/checkasm/checkasm.c
Merge commit 'ea8ae27a5e112d06fd5625f640e40849e6313f0c'
[ffmpeg] / tests / checkasm / checkasm.c
index 20ce56932fe5de4f5cde1ec3ddedf12497f837e6..721a0912fba0b4491ad855bfd7d7defd7c46fab5 100644 (file)
@@ -159,6 +159,9 @@ static const struct {
     #if CONFIG_HFLIP_FILTER
         { "vf_hflip", checkasm_check_vf_hflip },
     #endif
+    #if CONFIG_NLMEANS_FILTER
+        { "vf_nlmeans", checkasm_check_nlmeans },
+    #endif
     #if CONFIG_THRESHOLD_FILTER
         { "vf_threshold", checkasm_check_vf_threshold },
     #endif
@@ -294,8 +297,12 @@ int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp,
 int float_near_abs_eps(float a, float b, float eps)
 {
     float abs_diff = fabsf(a - b);
+    if (abs_diff < eps)
+        return 1;
 
-    return abs_diff < eps;
+    fprintf(stderr, "test failed comparing %g with %g (abs diff=%g with EPS=%g)\n", a, b, abs_diff, eps);
+
+    return 0;
 }
 
 int float_near_abs_eps_array(const float *a, const float *b, float eps,