summaryrefslogtreecommitdiff
path: root/test/fdct4x4_test.cc
diff options
context:
space:
mode:
authorDaniel Kang <ddkang@google.com>2012-06-28 16:26:31 -0700
committerDaniel Kang <ddkang@google.com>2012-06-29 12:07:18 -0700
commit26641c74d725066ccfd0ba39a0200420d684daff (patch)
treef1a3d3263938ea21a142ad3d8ea7d5b5b4af6f7f /test/fdct4x4_test.cc
parent0e734a63e87c9f87a5ed3dc8c2c698f0cdb1dad7 (diff)
downloadlibvpx-26641c74d725066ccfd0ba39a0200420d684daff.tar
libvpx-26641c74d725066ccfd0ba39a0200420d684daff.tar.gz
libvpx-26641c74d725066ccfd0ba39a0200420d684daff.tar.bz2
libvpx-26641c74d725066ccfd0ba39a0200420d684daff.zip
Add 8x8 fDCT unit test.
Also factorize ACMRandom to acm_random.h. Change-Id: I3b6eeb36fcbf7ae6dd3d2892bc40348f5c17982b
Diffstat (limited to 'test/fdct4x4_test.cc')
-rw-r--r--test/fdct4x4_test.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index c4ecbdf43..d88ed8df6 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -19,24 +19,12 @@ extern "C" {
#include "vp8/encoder/dct.h"
}
+#include "acm_random.h"
#include "vpx/vpx_integer.h"
-namespace {
-
-class ACMRandom {
- public:
- explicit ACMRandom(int seed) { Reset(seed); }
-
- void Reset(int seed) { srand(seed); }
-
- uint8_t Rand8(void) { return (rand() >> 8) & 0xff; }
+using libvpx_test::ACMRandom;
- int PseudoUniform(int range) { return (rand() >> 8) % range; }
-
- int operator()(int n) { return PseudoUniform(n); }
-
- static int DeterministicSeed(void) { return 0xbaba; }
-};
+namespace {
TEST(Vp8FdctTest, SignBiasCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());