]> granicus.if.org Git - libvpx/commitdiff
Use ACMRandom for all tests
authorJohann <johannkoenig@google.com>
Mon, 23 Jul 2012 22:09:51 +0000 (15:09 -0700)
committerJohann <johannkoenig@google.com>
Mon, 23 Jul 2012 23:21:29 +0000 (16:21 -0700)
Change-Id: I3bfa40cbc04828fd1d6b61f138c92a2159a67570

test/intrapred_test.cc

index 0e07b09a34273d0a00362003c5ec7ae1be89d054..d741353907ac703c465b5bd613cbe4d211ba6c87 100644 (file)
@@ -10,6 +10,7 @@
 
 
 #include <string.h>
+#include "test/acm_random.h"
 #include "third_party/googletest/src/include/gtest/gtest.h"
 extern "C" {
 #include "vpx_config.h"
@@ -19,6 +20,8 @@ extern "C" {
 
 namespace {
 
+using libvpx_test::ACMRandom;
+
 class IntraPredBase {
  protected:
   void SetupMacroblock(uint8_t *data, int block_size, int stride,
@@ -38,11 +41,12 @@ class IntraPredBase {
 
   void FillRandom() {
     // Fill edges with random data
+    ACMRandom rnd(ACMRandom::DeterministicSeed());
     for (int p = 0; p < num_planes_; p++) {
       for (int x = -1 ; x <= block_size_; x++)
-        data_ptr_[p][x - stride_] = rand();
+        data_ptr_[p][x - stride_] = rnd.Rand8();
       for (int y = 0; y < block_size_; y++)
-        data_ptr_[p][y * stride_ - 1] = rand();
+        data_ptr_[p][y * stride_ - 1] = rnd.Rand8();
     }
   }