From: Loren Merritt Date: Mon, 6 Nov 2006 22:38:42 +0000 (+0000) Subject: checkasm: ignore insignificant differences in floating-point ssim X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eeb78f6a8bc0541ea68fb84ba41c456e56a2589;p=libx264 checkasm: ignore insignificant differences in floating-point ssim git-svn-id: svn://svn.videolan.org/x264/trunk@599 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/tools/checkasm.c b/tools/checkasm.c index cc22f8b1..7e49a915 100644 --- a/tools/checkasm.c +++ b/tools/checkasm.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "common/common.h" #include "common/cpu.h" @@ -139,7 +140,7 @@ static int check_pixel( int cpu_ref, int cpu_new ) x264_cpu_restore( cpu_new ); res_c = x264_pixel_ssim_wxh( &pixel_c, buf1+2, 32, buf2+2, 32, 32, 28 ); res_a = x264_pixel_ssim_wxh( &pixel_asm, buf1+2, 32, buf2+2, 32, 32, 28 ); - if( res_c != res_a ) + if( fabs(res_c - res_a) > 1e-8 ) { ok = 0; fprintf( stderr, "ssim: %.7f != %.7f [FAILED]\n", res_c, res_a );