Commit 6eeb78f6 authored by Loren Merritt's avatar Loren Merritt

checkasm: ignore insignificant differences in floating-point ssim


git-svn-id: svn://svn.videolan.org/x264/trunk@599 df754926-b1dd-0310-bc7b-ec298dee348c
parent 485172de
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h>
#include "common/common.h" #include "common/common.h"
#include "common/cpu.h" #include "common/cpu.h"
...@@ -139,7 +140,7 @@ static int check_pixel( int cpu_ref, int cpu_new ) ...@@ -139,7 +140,7 @@ static int check_pixel( int cpu_ref, int cpu_new )
x264_cpu_restore( cpu_new ); x264_cpu_restore( cpu_new );
res_c = x264_pixel_ssim_wxh( &pixel_c, buf1+2, 32, buf2+2, 32, 32, 28 ); 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 ); 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; ok = 0;
fprintf( stderr, "ssim: %.7f != %.7f [FAILED]\n", res_c, res_a ); fprintf( stderr, "ssim: %.7f != %.7f [FAILED]\n", res_c, res_a );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment