ref: 0f0382af461874344bcacdacedc105326cc5714a
parent: 7ba600dc894543c04996f7692042026ae0db165b
parent: 202edb3d23f50609d0d4ee9d41a61b6c6a9a7df5
author: Dmitry Kovalev <[email protected]>
date: Thu Sep 4 10:27:04 EDT 2014
Merge "Actually resetting random generator for all variance test cases."
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -88,7 +88,7 @@
height_ = 1 << log2height_;
variance_ = get<2>(params);
- rnd(ACMRandom::DeterministicSeed());
+ rnd_.Reset(ACMRandom::DeterministicSeed());
block_size_ = width_ * height_;
src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
ref_ = new uint8_t[block_size_];
@@ -107,7 +107,7 @@
void RefTest();
void OneQuarterTest();
- ACMRandom rnd;
+ ACMRandom rnd_;
uint8_t* src_;
uint8_t* ref_;
int width_, log2width_;
@@ -135,8 +135,8 @@
void VarianceTest<VarianceFunctionType>::RefTest() {
for (int i = 0; i < 10; ++i) {
for (int j = 0; j < block_size_; j++) {
- src_[j] = rnd.Rand8();
- ref_[j] = rnd.Rand8();
+ src_[j] = rnd_.Rand8();
+ ref_[j] = rnd_.Rand8();
}
unsigned int sse1, sse2;
unsigned int var1;
@@ -206,7 +206,7 @@
height_ = 1 << log2height_;
subpel_variance_ = get<2>(params);
- rnd(ACMRandom::DeterministicSeed());
+ rnd_.Reset(ACMRandom::DeterministicSeed());
block_size_ = width_ * height_;
src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
@@ -226,7 +226,7 @@
protected:
void RefTest();
- ACMRandom rnd;
+ ACMRandom rnd_;
uint8_t *src_;
uint8_t *ref_;
uint8_t *sec_;
@@ -241,10 +241,10 @@
for (int x = 0; x < 16; ++x) {
for (int y = 0; y < 16; ++y) {
for (int j = 0; j < block_size_; j++) {
- src_[j] = rnd.Rand8();
+ src_[j] = rnd_.Rand8();
}
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
- ref_[j] = rnd.Rand8();
+ ref_[j] = rnd_.Rand8();
}
unsigned int sse1, sse2;
unsigned int var1;
@@ -263,11 +263,11 @@
for (int x = 0; x < 16; ++x) {
for (int y = 0; y < 16; ++y) {
for (int j = 0; j < block_size_; j++) {
- src_[j] = rnd.Rand8();
- sec_[j] = rnd.Rand8();
+ src_[j] = rnd_.Rand8();
+ sec_[j] = rnd_.Rand8();
}
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
- ref_[j] = rnd.Rand8();
+ ref_[j] = rnd_.Rand8();
}
unsigned int sse1, sse2;
unsigned int var1;