summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2018-06-08 17:44:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-08 17:44:43 +0000
commit3ac2b57015000dde5731ceb9fc824e86747c5945 (patch)
tree5805fe2748b9bd713e5a8438bdeceb52b402e3a9
parent18fa715c897acd63d3008263197290e5423f5fe2 (diff)
parenta75bb974021d169702cb9c0ec7a4ef236af17a3b (diff)
downloadlibvpx-3ac2b57015000dde5731ceb9fc824e86747c5945.tar
libvpx-3ac2b57015000dde5731ceb9fc824e86747c5945.tar.gz
libvpx-3ac2b57015000dde5731ceb9fc824e86747c5945.tar.bz2
libvpx-3ac2b57015000dde5731ceb9fc824e86747c5945.zip
Merge "vp9_subtract_test,cosmetics: fix class order, casts"
-rw-r--r--test/vp9_subtract_test.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/vp9_subtract_test.cc b/test/vp9_subtract_test.cc
index 88d94f671..5a25a550a 100644
--- a/test/vp9_subtract_test.cc
+++ b/test/vp9_subtract_test.cc
@@ -33,12 +33,6 @@ class VP9SubtractBlockTest : public AbstractBench,
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
- int block_width_;
- int block_height_;
- int16_t *diff_;
- uint8_t *pred_;
- uint8_t *src_;
-
virtual void Run() {
GetParam()(block_height_, block_width_, diff_, block_width_, src_,
block_width_, pred_, block_width_);
@@ -54,6 +48,12 @@ class VP9SubtractBlockTest : public AbstractBench,
src_ = reinterpret_cast<uint8_t *>(
vpx_memalign(16, block_width_ * block_height_ * 2));
}
+
+ int block_width_;
+ int block_height_;
+ int16_t *diff_;
+ uint8_t *pred_;
+ uint8_t *src_;
};
using libvpx_test::ACMRandom;
@@ -82,7 +82,6 @@ TEST_P(VP9SubtractBlockTest, DISABLED_Speed) {
TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
- // FIXME(rbultje) split in its own file
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
SetupBlocks(bsize);
@@ -102,7 +101,8 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
for (int c = 0; c < block_width_; ++c) {
EXPECT_EQ(diff_[r * block_width_ + c],
(src_[r * block_width_ + c] - pred_[r * block_width_ + c]))
- << "r = " << r << ", c = " << c << ", bs = " << (int)bsize;
+ << "r = " << r << ", c = " << c
+ << ", bs = " << static_cast<int>(bsize);
}
}
@@ -114,7 +114,8 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
EXPECT_EQ(diff_[r * block_width_ * 2 + c],
(src_[r * block_width_ * 2 + c] -
pred_[r * block_width_ * 2 + c]))
- << "r = " << r << ", c = " << c << ", bs = " << (int)bsize;
+ << "r = " << r << ", c = " << c
+ << ", bs = " << static_cast<int>(bsize);
}
}
}