Skip to content
Snippets Groups Projects
Commit 5215c8f0 authored by Johann Koenig's avatar Johann Koenig Committed by Gerrit Code Review
Browse files

Merge "Use ACMRandom for all tests"

parents 310666b1 fe8b1e51
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
#include <string.h>
#include "test/acm_random.h"
#include "third_party/googletest/src/include/gtest/gtest.h"
extern "C" {
#include "vpx_config.h"
......@@ -19,6 +20,8 @@ extern "C" {
namespace {
using libvpx_test::ACMRandom;
class IntraPredBase {
protected:
void SetupMacroblock(uint8_t *data, int block_size, int stride,
......@@ -38,11 +41,12 @@ class IntraPredBase {
void FillRandom() {
// Fill edges with random data
ACMRandom rnd(ACMRandom::DeterministicSeed());
for (int p = 0; p < num_planes_; p++) {
for (int x = -1 ; x <= block_size_; x++)
data_ptr_[p][x - stride_] = rand();
data_ptr_[p][x - stride_] = rnd.Rand8();
for (int y = 0; y < block_size_; y++)
data_ptr_[p][y * stride_ - 1] = rand();
data_ptr_[p][y * stride_ - 1] = rnd.Rand8();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment