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
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
119class QuantizeTest : public QuantizeTestBase,120class 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], &macroblockd_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
176TEST_P(QuantizeTest, DISABLED_Speed) {
177 FillCoeffRandom();
178
179 RunNTimes(10000000);
180 PrintMedian("vp8 quantize");
181}
182
170#if HAVE_SSE2183#if HAVE_SSE2
171INSTANTIATE_TEST_CASE_P(184INSTANTIATE_TEST_CASE_P(
172 SSE2, QuantizeTest,185 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