summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2012-07-24 09:35:37 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2012-07-24 09:35:37 -0700
commit310666b1cd1e8c6ab6088a4aee77c81480339ce0 (patch)
treee5a0446633931a4cfa00cd64daceb2d396a40e4e /test
parent9f89c4c2910f5beabcc8cf4f4acaff2a129e752f (diff)
parent9ec2552792638af8473d33be735f43c04605e1a6 (diff)
downloadlibvpx-310666b1cd1e8c6ab6088a4aee77c81480339ce0.tar
libvpx-310666b1cd1e8c6ab6088a4aee77c81480339ce0.tar.gz
libvpx-310666b1cd1e8c6ab6088a4aee77c81480339ce0.tar.bz2
libvpx-310666b1cd1e8c6ab6088a4aee77c81480339ce0.zip
Merge "Allow specifying the seed"
Diffstat (limited to 'test')
-rw-r--r--test/video_source.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/video_source.h b/test/video_source.h
index 7347c8dd0..688e185fd 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -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