History

vp8 quantize: use native abs/sign implementations

~4% improvement with a very rudimentary speed test

Johann committed 7 years ago

Commit e3f12b51 parent dff4d372 files · +23 −19Browse files

Showing the changes to test (1 of 2 files). Show all

Unified · Split

test/quantize_test.cc+15−2
@@ -13,9 +13,10 @@ · 12 unmodified lines
1313
1414 #include "third_party/googletest/src/include/gtest/gtest.h"
1515
16−#include "./vpx_config.h"
1716 #include "./vp8_rtcd.h"
17+#include "./vpx_config.h"
1818 #include "test/acm_random.h"
19+#include "test/bench.h"
1920 #include "test/clear_system_state.h"
2021 #include "test/register_state_check.h"
2122 #include "test/util.h"
@@ -117,7 +118,8 @@ class QuantizeTestBase { · 95 unmodified lines
117118 };
118119
119120 class QuantizeTest : public QuantizeTestBase,
120− public ::testing::TestWithParam<VP8QuantizeParam> {
121+ public ::testing::TestWithParam<VP8QuantizeParam>,
122+ public AbstractBench {
121123 protected:
122124 virtual void SetUp() {
123125 SetupCompressor();
@@ -125,6 +127,10 @@ class QuantizeTest : public QuantizeTestBase, · 1 unmodified line
125127 c_quant_ = GET_PARAM(1);
126128 }
127129
130+ virtual void Run() {
131+ asm_quant_(&vp8_comp_->mb.block[0], &macroblockd_dst_->block[0]);
132+ }
133+
128134 void RunComparison() {
129135 for (int i = 0; i < kNumBlocks; ++i) {
130136 ASM_REGISTER_STATE_CHECK(
@@ -167,6 +173,13 @@ TEST_P(QuantizeTest, TestMultipleQ) { · 36 unmodified lines
167173 }
168174 }
169175
176+TEST_P(QuantizeTest, DISABLED_Speed) {
177+ FillCoeffRandom();
178+
179+ RunNTimes(10000000);
180+ PrintMedian("vp8 quantize");
181+}
182+
170183 #if HAVE_SSE2
171184 INSTANTIATE_TEST_CASE_P(
172185 SSE2, QuantizeTest,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t