FFmpeg/libavcodec/arm
Martin Storsjö 6bec60a683 arm: vp9: Add NEON loop filters
This work is sponsored by, and copyright, Google.

The implementation tries to have smart handling of cases
where no pixels need the full filtering for the 8/16 width
filters, skipping both calculation and writeback of the
unmodified pixels in those cases. The actual effect of this
is hard to test with checkasm though, since it tests the
full filtering, and the benefit depends on how many filtered
blocks use the shortcut.

Examples of relative speedup compared to the C version, from checkasm:
                          Cortex       A7     A8     A9    A53
vp9_loop_filter_h_4_8_neon:          2.72   2.68   1.78   3.15
vp9_loop_filter_h_8_8_neon:          2.36   2.38   1.70   2.91
vp9_loop_filter_h_16_8_neon:         1.80   1.89   1.45   2.01
vp9_loop_filter_h_16_16_neon:        2.81   2.78   2.18   3.16
vp9_loop_filter_mix2_h_44_16_neon:   2.65   2.67   1.93   3.05
vp9_loop_filter_mix2_h_48_16_neon:   2.46   2.38   1.81   2.85
vp9_loop_filter_mix2_h_84_16_neon:   2.50   2.41   1.73   2.85
vp9_loop_filter_mix2_h_88_16_neon:   2.77   2.66   1.96   3.23
vp9_loop_filter_mix2_v_44_16_neon:   4.28   4.46   3.22   5.70
vp9_loop_filter_mix2_v_48_16_neon:   3.92   4.00   3.03   5.19
vp9_loop_filter_mix2_v_84_16_neon:   3.97   4.31   2.98   5.33
vp9_loop_filter_mix2_v_88_16_neon:   3.91   4.19   3.06   5.18
vp9_loop_filter_v_4_8_neon:          4.53   4.47   3.31   6.05
vp9_loop_filter_v_8_8_neon:          3.58   3.99   2.92   5.17
vp9_loop_filter_v_16_8_neon:         3.40   3.50   2.81   4.68
vp9_loop_filter_v_16_16_neon:        4.66   4.41   3.74   6.02

The speedup vs C code is around 2-6x. The numbers are quite
inconclusive though, since the checkasm test runs multiple filterings
on top of each other, so later rounds might end up with different
codepaths (different decisions on which filter to apply, based
on input pixel differences). Disabling the early-exit in the asm
doesn't give a fair comparison either though, since the C code
only does the necessary calcuations for each row.

Based on START_TIMER/STOP_TIMER wrapping around a few individual
functions, the speedup vs C code is around 4-9x.

This is pretty similar in runtime to the corresponding routines
in libvpx. (This is comparing vpx_lpf_vertical_16_neon,
vpx_lpf_horizontal_edge_8_neon and vpx_lpf_horizontal_edge_16_neon
to vp9_loop_filter_h_16_8_neon, vp9_loop_filter_v_16_8_neon
and vp9_loop_filter_v_16_16_neon - note that the naming of horizonal
and vertical is flipped between the libraries.)

In order to have stable, comparable numbers, the early exits in both
asm versions were disabled, forcing the full filtering codepath.

                           Cortex           A7      A8      A9     A53
vp9_loop_filter_h_16_8_neon:             597.2   472.0   482.4   415.0
libvpx vpx_lpf_vertical_16_neon:         626.0   464.5   470.7   445.0
vp9_loop_filter_v_16_8_neon:             500.2   422.5   429.7   295.0
libvpx vpx_lpf_horizontal_edge_8_neon:   586.5   414.5   415.6   383.2
vp9_loop_filter_v_16_16_neon:            905.0   784.7   791.5   546.0
libvpx vpx_lpf_horizontal_edge_16_neon: 1060.2   751.7   743.5   685.2

Our version is consistently faster on on A7 and A53, marginally slower on
A8, and sometimes faster, sometimes slower on A9 (marginally slower in all
three tests in this particular test run).

This is an adapted cherry-pick from libav commit
dd299a2d6d.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-15 15:10:03 -05:00
..
aac.h
aacpsdsp_init_arm.c
aacpsdsp_neon.S
ac3dsp_arm.S
ac3dsp_armv6.S
ac3dsp_init_arm.c
ac3dsp_neon.S
asm-offsets.h Merge commit '6a13505c06' 2014-04-30 00:23:01 +02:00
audiodsp_arm.h Merge commit '9a9e2f1c8a' 2014-06-22 17:58:28 +02:00
audiodsp_init_arm.c Merge commit '9a9e2f1c8a' 2014-06-22 17:58:28 +02:00
audiodsp_init_neon.c Merge commit '9a9e2f1c8a' 2014-06-22 17:58:28 +02:00
audiodsp_neon.S Merge commit '9a9e2f1c8a' 2014-06-22 17:58:28 +02:00
blockdsp_arm.h blockdsp: remove high bitdepth parameter 2015-10-02 04:38:40 +02:00
blockdsp_init_arm.c blockdsp: remove high bitdepth parameter 2015-10-02 04:38:40 +02:00
blockdsp_init_neon.c blockdsp: reindent after parameter removal 2015-10-03 23:34:56 +02:00
blockdsp_neon.S Merge commit 'e74433a8e6' 2014-06-19 04:54:38 +02:00
cabac.h avcodec/arm/cabac: fix inline cabac reader with the UNCHECKED bitstream reader 2014-03-15 01:08:45 +01:00
dca.h avcodec/dca: remove old decoder 2016-01-31 17:09:38 +01:00
fft_fixed_init_arm.c Merge commit '97aec6e75e' 2016-04-12 15:43:09 +01:00
fft_fixed_neon.S Merge commit 'f963f80399' 2014-12-09 11:58:13 +01:00
fft_init_arm.c Merge commit '4c297249ac' 2016-04-12 15:43:34 +01:00
fft_neon.S Merge commit 'f963f80399' 2014-12-09 11:58:13 +01:00
fft_vfp.S Merge commit 'f963f80399' 2014-12-09 11:58:13 +01:00
flacdsp_arm.S
flacdsp_init_arm.c lavc/flac: Fix encoding and decoding with high lpc. 2015-05-17 02:08:58 +02:00
fmtconvert_init_arm.c Merge commit '90b1b9350c' 2016-01-02 11:21:36 +01:00
fmtconvert_neon.S Merge commit '90b1b9350c' 2016-01-02 11:21:36 +01:00
fmtconvert_vfp.S
g722dsp_init_arm.c Merge commit '702458538d' 2015-02-16 02:16:29 +01:00
g722dsp_neon.S Merge commit '702458538d' 2015-02-16 02:16:29 +01:00
h264chroma_init_arm.c
h264cmc_neon.S avcodec: fix vc1dsp dependencies 2016-09-25 13:11:45 +02:00
h264dsp_init_arm.c lavc/arm: Use the neon vertical chroma loop filter also for H.264 4:2:2. 2015-01-31 10:05:24 +01:00
h264dsp_neon.S
h264idct_neon.S Merge commit '5bcbb516f2' 2014-02-08 00:48:26 +01:00
h264pred_init_arm.c Merge commit '256ef19844' 2015-07-18 02:13:22 +02:00
h264pred_neon.S
h264qpel_init_arm.c Merge commit '7fb993d338' 2014-07-25 13:05:08 +02:00
h264qpel_neon.S
hevcdsp_arm.h hevcdsp: fix compilation for arm and aarch64 2015-03-12 20:01:01 +01:00
hevcdsp_deblock_neon.S hevcdsp: HEVC deblocking ARM NEON register clobber fix 2015-02-16 13:27:41 +01:00
hevcdsp_idct_neon.S avcodec/arm/hevcdsp_idct_neon: drop ".code 32" 2015-02-25 02:30:35 +01:00
hevcdsp_init_arm.c hevcdsp: fix compilation for arm and aarch64 2015-03-12 20:01:01 +01:00
hevcdsp_init_neon.c hevcdsp: fix compilation for arm and aarch64 2015-03-12 20:01:01 +01:00
hevcdsp_qpel_neon.S avcodec/hevcdsp: ARM NEON optimized qpel functions 2015-02-25 18:39:51 +01:00
hpeldsp_arm.h Merge commit '7151c5d04a' 2014-01-14 14:38:10 +01:00
hpeldsp_arm.S Merge commit '831a118078' 2014-03-13 23:59:56 +01:00
hpeldsp_armv6.S Merge commit '61985ad72c' 2014-03-09 01:16:21 +01:00
hpeldsp_init_arm.c Merge commit '322a1dda97' 2014-03-22 22:53:33 +01:00
hpeldsp_init_armv6.c
hpeldsp_init_neon.c
hpeldsp_neon.S
idct.h Merge commit '4de8b60684' 2014-07-21 01:56:22 +02:00
idctdsp_arm.h Merge commit 'e3fcb14347' 2014-07-01 15:22:11 +02:00
idctdsp_arm.S avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size 2014-09-24 21:43:19 -03:00
idctdsp_armv6.S Merge commit 'e3fcb14347' 2014-07-01 15:22:11 +02:00
idctdsp_init_arm.c Merge commit '7c6eb0a1b7' 2015-07-27 22:10:35 +02:00
idctdsp_init_armv5te.c Merge commit '4de8b60684' 2014-07-21 01:56:22 +02:00
idctdsp_init_armv6.c Merge commit '7c6eb0a1b7' 2015-07-27 22:10:35 +02:00
idctdsp_init_neon.c avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size 2014-09-24 21:43:19 -03:00
idctdsp_neon.S Merge commit 'e3fcb14347' 2014-07-01 15:22:11 +02:00
int_neon.S Merge commit '054013a0fc' 2014-05-30 00:59:15 +02:00
jrevdct_arm.S
lossless_audiodsp_init_arm.c apedsp: move to llauddsp 2014-06-05 20:31:59 +02:00
lossless_audiodsp_neon.S apedsp: move to llauddsp 2014-06-05 20:31:59 +02:00
Makefile arm: vp9: Add NEON loop filters 2016-11-15 15:10:03 -05:00
mathops.h
mdct_fixed_neon.S
mdct_neon.S Merge commit '5bcbb516f2' 2014-02-08 00:48:26 +01:00
mdct_vfp.S armv6: Accelerate ff_imdct_half for general case (mdct_bits != 6) 2014-07-18 01:34:08 +03:00
me_cmp_armv6.S Merge commit '2d60444331' 2014-07-17 23:27:40 +02:00
me_cmp_init_arm.c Merge commit '9c12c6ff95' 2014-11-24 12:13:00 +01:00
mlpdsp_armv5te.S Merge commit '4c81613df4' 2014-12-10 00:51:26 +01:00
mlpdsp_armv6.S Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
mlpdsp_init_arm.c Merge remote-tracking branch 'qatar/master' 2014-03-26 21:23:09 +01:00
mpegaudiodsp_fixed_armv6.S
mpegaudiodsp_init_arm.c
mpegvideo_arm.c Merge commit '835f798c7d' 2014-08-15 20:11:56 +02:00
mpegvideo_arm.h Merge commit '835f798c7d' 2014-08-15 20:11:56 +02:00
mpegvideo_armv5te.c Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
mpegvideo_armv5te_s.S
mpegvideo_neon.S Merge commit '5bcbb516f2' 2014-02-08 00:48:26 +01:00
mpegvideoencdsp_armv6.S Merge commit 'c166148409' 2014-07-07 15:36:58 +02:00
mpegvideoencdsp_init_arm.c Merge commit 'c166148409' 2014-07-07 15:36:58 +02:00
neon.S
neontest.c avcodec: fix arguments on xmm/neon clobber test wrappers 2016-10-02 02:15:47 -03:00
pixblockdsp_armv6.S Merge commit 'f46bb608d9' 2014-07-10 01:22:14 +02:00
pixblockdsp_init_arm.c avcodec: Change get_pixels() to ptrdiff_t linesize 2014-08-06 15:50:54 +02:00
rdft_init_arm.c arm/rdft_init: fix license header 2016-04-12 15:01:19 -03:00
rdft_neon.S
rv34dsp_init_arm.c
rv34dsp_neon.S
rv40dsp_init_arm.c Merge commit '7fb993d338' 2014-07-25 13:05:08 +02:00
rv40dsp_neon.S
sbrdsp_init_arm.c
sbrdsp_neon.S
simple_idct_arm.S Merge commit '41ed7ab45f' 2016-06-21 21:55:34 +02:00
simple_idct_armv5te.S
simple_idct_armv6.S
simple_idct_neon.S
startcode.h Merge commit 'db7f1c7c5a' 2014-08-05 12:46:10 +02:00
startcode_armv6.S h264: Move start code search functions into separate source files. 2014-08-04 22:22:54 +02:00
synth_filter_init_arm.c avcodec/synth_filter: split off remaining code from dcadec files 2016-01-25 14:57:38 -03:00
synth_filter_neon.S
synth_filter_vfp.S Merge commit '7e18a727d2' 2014-07-18 13:17:29 +02:00
vc1dsp.h Merge commit '832e190632' 2013-12-20 23:12:16 +01:00
vc1dsp_init_arm.c Fix compile error on arm4/arm5 platform 2014-09-23 21:11:05 +02:00
vc1dsp_init_neon.c Merge commit '896a5bff64' 2014-06-03 18:19:21 +02:00
vc1dsp_neon.S Merge commit '896a5bff64' 2014-06-03 18:19:21 +02:00
videodsp_arm.h
videodsp_armv5te.S arm: use a local label instead of the function symbol in ff_prefetch_arm 2015-07-20 23:10:29 +02:00
videodsp_init_arm.c
videodsp_init_armv5te.c
vorbisdsp_init_arm.c
vorbisdsp_neon.S
vp3dsp_init_arm.c Merge commit '3dc6272bed' 2014-04-05 18:54:15 +02:00
vp3dsp_neon.S Merge remote-tracking branch 'qatar/master' 2014-01-08 05:44:56 +01:00
vp6dsp_init_arm.c
vp6dsp_neon.S
vp8.h arm: asm decode_block_coeffs_internal is vp8 specific 2014-04-04 10:39:29 +02:00
vp8_armv6.S
vp8dsp.h Merge commit 'ac4b32df71' 2014-04-04 14:46:10 +02:00
vp8dsp_armv6.S Merge commit 'e8b96a7701' 2016-11-14 15:21:49 +01:00
vp8dsp_init_arm.c Merge commit 'ac4b32df71' 2014-04-04 14:46:10 +02:00
vp8dsp_init_armv6.c Merge commit 'ac4b32df71' 2014-04-04 14:46:10 +02:00
vp8dsp_init_neon.c Merge commit 'ac4b32df71' 2014-04-04 14:46:10 +02:00
vp8dsp_neon.S Merge commit 'e8b96a7701' 2016-11-14 15:21:49 +01:00
vp9dsp_init_arm.c arm: vp9: Add NEON loop filters 2016-11-15 15:10:03 -05:00
vp9itxfm_neon.S arm: vp9: Add NEON itxfm routines 2016-11-15 15:10:03 -05:00
vp9lpf_neon.S arm: vp9: Add NEON loop filters 2016-11-15 15:10:03 -05:00
vp9mc_neon.S arm: vp9: Add NEON optimizations of VP9 MC functions 2016-11-15 15:10:03 -05:00
vp56_arith.h