~4% improvement with a very rudimentary speed test
Showing the changes to test (1 of 2 files). Show all
Unified · Split
| @@ -13,9 +13,10 @@ · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | #include "third_party/googletest/src/include/gtest/gtest.h" | 14 | #include "third_party/googletest/src/include/gtest/gtest.h" |
| 15 | 15 | ||
| 16 | #include "./vpx_config.h" | ||
| 17 | #include "./vp8_rtcd.h" | 16 | #include "./vp8_rtcd.h" |
| 17 | #include "./vpx_config.h" | ||
| 18 | #include "test/acm_random.h" | 18 | #include "test/acm_random.h" |
| 19 | #include "test/bench.h" | ||
| 19 | #include "test/clear_system_state.h" | 20 | #include "test/clear_system_state.h" |
| 20 | #include "test/register_state_check.h" | 21 | #include "test/register_state_check.h" |
| 21 | #include "test/util.h" | 22 | #include "test/util.h" |
| @@ -117,7 +118,8 @@ class QuantizeTestBase { · 95 unmodified lines | |||
| 117 | }; | 118 | }; |
| 118 | 119 | ||
| 119 | class QuantizeTest : public QuantizeTestBase, | 120 | class QuantizeTest : public QuantizeTestBase, |
| 120 | public ::testing::TestWithParam<VP8QuantizeParam> { | 121 | public ::testing::TestWithParam<VP8QuantizeParam>, |
| 122 | public AbstractBench { | ||
| 121 | protected: | 123 | protected: |
| 122 | virtual void SetUp() { | 124 | virtual void SetUp() { |
| 123 | SetupCompressor(); | 125 | SetupCompressor(); |
| @@ -125,6 +127,10 @@ class QuantizeTest : public QuantizeTestBase, · 1 unmodified line | |||
| 125 | c_quant_ = GET_PARAM(1); | 127 | c_quant_ = GET_PARAM(1); |
| 126 | } | 128 | } |
| 127 | 129 | ||
| 130 | virtual void Run() { | ||
| 131 | asm_quant_(&vp8_comp_->mb.block[0], ¯oblockd_dst_->block[0]); | ||
| 132 | } | ||
| 133 | |||
| 128 | void RunComparison() { | 134 | void RunComparison() { |
| 129 | for (int i = 0; i < kNumBlocks; ++i) { | 135 | for (int i = 0; i < kNumBlocks; ++i) { |
| 130 | ASM_REGISTER_STATE_CHECK( | 136 | ASM_REGISTER_STATE_CHECK( |
| @@ -167,6 +173,13 @@ TEST_P(QuantizeTest, TestMultipleQ) { · 36 unmodified lines | |||
| 167 | } | 173 | } |
| 168 | } | 174 | } |
| 169 | 175 | ||
| 176 | TEST_P(QuantizeTest, DISABLED_Speed) { | ||
| 177 | FillCoeffRandom(); | ||
| 178 | |||
| 179 | RunNTimes(10000000); | ||
| 180 | PrintMedian("vp8 quantize"); | ||
| 181 | } | ||
| 182 | |||
| 170 | #if HAVE_SSE2 | 183 | #if HAVE_SSE2 |
| 171 | INSTANTIATE_TEST_CASE_P( | 184 | INSTANTIATE_TEST_CASE_P( |
| 172 | SSE2, QuantizeTest, | 185 | SSE2, QuantizeTest, |