shithub: libvpx

Download patch

ref: 310666b1cd1e8c6ab6088a4aee77c81480339ce0
parent: 9f89c4c2910f5beabcc8cf4f4acaff2a129e752f
parent: 9ec2552792638af8473d33be735f43c04605e1a6
author: Johann <johannkoenig@google.com>
date: Tue Jul 24 05:35:37 EDT 2012

Merge "Allow specifying the seed"

--- a/test/video_source.h
+++ b/test/video_source.h
@@ -102,13 +102,15 @@
 
 class RandomVideoSource : public DummyVideoSource {
  public:
-  RandomVideoSource() : rnd_(ACMRandom::DeterministicSeed()) {}
+  RandomVideoSource(int seed = ACMRandom::DeterministicSeed())
+      : rnd_(seed),
+        seed_(seed) { }
 
  protected:
   // Reset the RNG to get a matching stream for the second pass
   virtual void Begin() {
     frame_ = 0;
-    rnd_.Reset(ACMRandom::DeterministicSeed());
+    rnd_.Reset(seed_);
     FillFrame();
   }
 
@@ -123,6 +125,7 @@
   }
 
   ACMRandom rnd_;
+  int seed_;
 };
 
 }  // namespace libvpx_test