Add 2D-specific Neon horizontal convolution functions
authorJonathan Wright <jonathan.wright@arm.com>
Thu, 4 May 2023 15:33:38 +0000 (16:33 +0100)
committerJonathan Wright <jonathan.wright@arm.com>
Sat, 13 May 2023 19:43:20 +0000 (20:43 +0100)
commit3e1e38d1176c34f71a87f8402c07cdcc2e20083e
treef11c4c4b8acb0fad783e0cc37b47a6da0df482c4
parent8ecf58432118b672fe3f4a54725bc63caac262aa
Add 2D-specific Neon horizontal convolution functions

2D 8-tap convolution filtering is performed in two passes -
horizontal and vertical. The horizontal pass must produce enough
input data for the subsequent vertical pass - 3 rows above and 4 rows
below, in addition to the actual block height.

At present, all Neon horizontal convolution algorithms process 4 rows
at a time, but this means we end up doing at least 1 row too much
work in the 2D first pass case where we need h + 7, not h + 8 rows of
output.

This patch adds additional dot-product (SDOT and USDOT) Neon paths
that process h + 7 rows of data exactly, saving the work of the
unnecessary extra row. It is impractical to take a similar approach
for the Armv8.0 MLA paths since we have to transpose the data block
both before and after calling the convolution helper functions.

vpx_convolve_neon performance impact: we observe a speedup of ~9% for
smaller (and wider) blocks, and a speedup of 0-3% for larger blocks.
This is to be expected since the proportion of redundant work
decreases as the block height increases.

Change-Id: Ie77ad1848707d2d48bb8851345a469aae9d097e1
vpx_dsp/arm/mem_neon.h
vpx_dsp/arm/vpx_convolve8_neon.c
vpx_dsp/arm/vpx_convolve8_neon.h
vpx_dsp/arm/vpx_convolve_neon.c