From ac9da5dbb4447c64bf9b82e849f4ae233c4413d3 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 8 Feb 2006 09:03:28 +0000 Subject: [PATCH] * tools/checkasm.c: print the random seed used for the test, to allow for replays. It looks like dequant_4x4 fails 1 time out of 600, with the following seeds for instance: 1423 1957 2149 2455 3385 3403 3724 4095. git-svn-id: svn://svn.videolan.org/x264/trunk@421 df754926-b1dd-0310-bc7b-ec298dee348c --- tools/checkasm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/checkasm.c b/tools/checkasm.c index 07557e2d..5ac08704 100644 --- a/tools/checkasm.c +++ b/tools/checkasm.c @@ -14,7 +14,7 @@ #include "common/ppc/mc.h" #endif -/* buf1, buf2: initialised to randome data and shouldn't write into them */ +/* buf1, buf2: initialised to random data and shouldn't write into them */ uint8_t * buf1, * buf2; /* buf3, buf4: used to store output */ uint8_t * buf3, * buf4; @@ -526,7 +526,7 @@ int check_all( int cpu_ref, int cpu_new ) + check_quant( cpu_ref, cpu_new ); } -int main() +int main(int argc, char *argv[]) { int ret = 0; int i; @@ -537,7 +537,9 @@ int main() buf4 = x264_malloc( 1024 ); buf5 = x264_malloc( 1024 ); - srand( x264_mdate() ); + i = ( argc > 1 ) ? atoi(argv[1]) : x264_mdate(); + fprintf( stderr, "x264: using random seed %u\n", i ); + srand( i ); for( i = 0; i < 1024; i++ ) { -- 2.47.3