]> git.videolan.org Git - x264.git/commitdiff
* tools/checkasm.c: print the random seed used for the test, to allow for
authorSam Hocevar <sam@videolan.org>
Wed, 8 Feb 2006 09:03:28 +0000 (09:03 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 8 Feb 2006 09:03:28 +0000 (09:03 +0000)
    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

index 07557e2dd7752fc60118f6422216d93f10d00541..5ac08704221619a26007b9fea838f0212422fbe5 100644 (file)
@@ -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++ )
     {