Commit 9ec25527 authored by Johann's avatar Johann
Browse files

Allow specifying the seed

Change-Id: Ie933998b08cd2b3f0e379b8fa7d394c95bd08cac
parent e3e63fbc
......@@ -102,13 +102,15 @@ class DummyVideoSource : public VideoSource {
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 @@ class RandomVideoSource : public DummyVideoSource {
}
ACMRandom rnd_;
int seed_;
};
} // namespace libvpx_test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment