ref: 9ec2552792638af8473d33be735f43c04605e1a6
parent: e3e63fbcbae81c1244b638e74bde4f895fb92c58
author: Johann <johannkoenig@google.com>
date: Mon Jul 23 11:06:12 EDT 2012
Allow specifying the seed Change-Id: Ie933998b08cd2b3f0e379b8fa7d394c95bd08cac
--- 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
--
⑨