quantize: use aarch64 vmaxv
authorJohann <johann.koenig@duck.com>
Mon, 12 Nov 2018 19:30:03 +0000 (11:30 -0800)
committerJohann <johann.koenig@duck.com>
Mon, 12 Nov 2018 19:47:29 +0000 (11:47 -0800)
commit43a30d3a1a6b627fa05ba63f4c51414ced781ccb
treee320e59da20c1a3fecef24485de73cb9e03c980b
parent4a8c248744500f9caf00588ca312efce5659e45e
quantize: use aarch64 vmaxv

Simplify max value calculation on aarch64 by using vmaxv. Much
faster for 4x4 but diminishing returns as the block size grows.

Only the vp9 quantize has a speed test hooked up. Anticipate
similar results for the other quantize versions.

Before:
[ RUN      ] NEON/VP9QuantizeTest.DISABLED_Speed/2
[    BENCH ]      Bypass calculations       4x4  31.6 ms ( ±0.0 ms )
[    BENCH ]        Full calculations       4x4  31.6 ms ( ±0.0 ms )
[    BENCH ]      Bypass calculations       8x8  17.7 ms ( ±0.0 ms )
[    BENCH ]        Full calculations       8x8  17.7 ms ( ±0.0 ms )
[    BENCH ]      Bypass calculations     16x16  14.2 ms ( ±0.0 ms )
[    BENCH ]        Full calculations     16x16  14.2 ms ( ±0.0 ms )
[       OK ] NEON/VP9QuantizeTest.DISABLED_Speed/2 (1906 ms)
[ RUN      ] NEON/VP9QuantizeTest.DISABLED_Speed/3
[    BENCH ]      Bypass calculations     32x32  18.6 ms ( ±0.0 ms )
[    BENCH ]        Full calculations     32x32  18.6 ms ( ±0.0 ms )

After:
[ RUN      ] NEON/VP9QuantizeTest.DISABLED_Speed/2
[    BENCH ]      Bypass calculations       4x4  29.1 ms ( ±0.0 ms )
[    BENCH ]        Full calculations       4x4  29.1 ms ( ±0.0 ms )
[    BENCH ]      Bypass calculations       8x8  16.9 ms ( ±0.0 ms )
[    BENCH ]        Full calculations       8x8  16.9 ms ( ±0.0 ms )
[    BENCH ]      Bypass calculations     16x16  14.1 ms ( ±0.0 ms )
[    BENCH ]        Full calculations     16x16  14.1 ms ( ±0.0 ms )
[       OK ] NEON/VP9QuantizeTest.DISABLED_Speed/2 (1803 ms)
[ RUN      ] NEON/VP9QuantizeTest.DISABLED_Speed/3
[    BENCH ]      Bypass calculations     32x32  18.6 ms ( ±0.0 ms )
[    BENCH ]        Full calculations     32x32  18.6 ms ( ±0.0 ms )

Change-Id: Ic95812b3fdbd4e47b4dcb8ed46c68a9617de38d2
vp8/encoder/arm/neon/fastquantizeb_neon.c
vp9/encoder/arm/neon/vp9_quantize_neon.c
vpx_dsp/arm/quantize_neon.c