1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Go to file
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
compat compat/w32dlfcn.h: Add safe win32 dlopen/dlclose/dlsym functions. 2016-11-05 18:08:32 +11:00
doc doc/filters: add metadata information for blackframe 2016-11-14 11:59:52 -09:00
libavcodec arm: vp9: Add NEON loop filters 2016-11-15 15:10:03 -05:00
libavdevice lavd/xcbgrab: do not try to create refcounted packets. 2016-11-03 21:23:55 +01:00
libavfilter lavfi/ebur128: use ff_ prefix 2016-11-13 19:11:07 -06:00
libavformat lavf/Makefile: Fix rule for the data muxer. 2016-11-14 13:33:22 +01:00
libavresample Bump minor versions after 3.2 branchpoint to seperate release 2016-10-26 20:52:42 +02:00
libavutil arm: Clear the gp register alias at the end of functions 2016-11-15 15:10:03 -05:00
libpostproc Bump minor versions after 3.2 branchpoint to seperate release 2016-10-26 20:52:42 +02:00
libswresample Bump minor versions after 3.2 branchpoint to seperate release 2016-10-26 20:52:42 +02:00
libswscale lsws: Add GRAY10 conversion. 2016-11-14 10:35:06 +01:00
presets
tests Merge commit 'f8d17d53957056c053a46f9320fa7ae6fe1479a5' 2016-11-14 15:29:08 +01:00
tools tools: add loudnorm script example to use loudnorm 2016-11-11 19:22:52 +01:00
.gitattributes
.gitignore Merge commit '6641819feedb086ebba3d2be89b8d33980f367e1' 2016-06-26 15:43:05 +02:00
.travis.yml Merge commit 'eda183287489b2c705843aa373a19c4e46fb2fec' 2015-11-22 17:12:24 +00:00
arch.mak mips: rename mipsdspr1 to mipsdsp 2015-12-04 02:35:42 +01:00
Changelog avformat: Add Pro-MPEG CoP #3-R2 FEC protocol 2016-11-13 11:38:15 +01:00
cmdutils_common_opts.h cmdutils: add show_demuxers and show_muxers 2016-11-08 01:56:31 +01:00
cmdutils_opencl.c all: use FFDIFFSIGN to resolve possible undefined behavior in comparators 2015-11-03 16:28:30 -05:00
cmdutils.c cmdutils: add show_demuxers and show_muxers 2016-11-08 01:56:31 +01:00
cmdutils.h cmdutils: add show_demuxers and show_muxers 2016-11-08 01:56:31 +01:00
common.mak Merge commit 'c5fd4b50610f62cbb3baa4f4108139363128dea1' 2016-06-27 19:39:46 +02:00
configure Merge commit '8c929037ec75fbe9f367e0a31ee34839e92de481' 2016-11-14 10:09:44 +01:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_cuvid.c doc: fix spelling errors 2016-10-21 23:58:47 +02:00
ffmpeg_dxva2.c Merge commit '18c506e9e6e8df8b1d496d093077b8240ea68c28' 2016-06-26 15:34:01 +02:00
ffmpeg_filter.c Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5' 2016-11-13 15:33:39 +01:00
ffmpeg_opt.c Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5' 2016-11-13 15:33:39 +01:00
ffmpeg_qsv.c ffmpeg_qsv: Fix hwaccel transcoding 2016-11-13 17:49:48 +00:00
ffmpeg_vaapi.c ffmpeg_vaapi: fix choice of decoder_format 2016-09-29 01:23:52 +02:00
ffmpeg_vdpau.c Merge commit 'f72db3f2f3a8c83a4f5dede8fa03434b2bf676c6' 2016-06-26 15:29:39 +02:00
ffmpeg_videotoolbox.c ffmpeg/videotoolbox: protect UTGetOSTypeFromString on both VDA and VT 2015-10-15 10:22:31 +02:00
ffmpeg.c Merge commit 'b55566db4c51d920a6496455bb30a608e5a50a41' 2016-11-14 14:56:52 +01:00
ffmpeg.h Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5' 2016-11-13 15:33:39 +01:00
ffplay.c Merge commit 'beb62dac629603eb074a44c44389c230b5caac7c' 2016-10-07 13:16:36 +02:00
ffprobe.c lavf: add AV_DISPOSITION_TIMED_THUMBNAILS 2016-10-24 05:47:05 -05:00
ffserver_config.c ffserver: Throw ffm.h out its not used except for a constant that is part of the format 2016-11-07 19:27:40 +01:00
ffserver_config.h ffserver: Throw ffm.h out its not used except for a constant that is part of the format 2016-11-07 19:27:40 +01:00
ffserver.c ffserver: use AVStream.codecpar in open_input_stream() 2016-11-08 12:12:19 +01:00
INSTALL.md
library.mak Merge commit 'c5fd4b50610f62cbb3baa4f4108139363128dea1' 2016-06-27 19:39:46 +02:00
LICENSE.md lavc: remove libfaac wrapper 2016-10-01 19:58:04 +01:00
MAINTAINERS MAINTAINERS: Add myself to flvenc 2016-11-09 17:49:19 +01:00
Makefile Merge commit '6641819feedb086ebba3d2be89b8d33980f367e1' 2016-06-26 15:43:05 +02:00
README.md Add CONTRIBUTING.md 2016-09-18 10:02:13 +01:00
RELEASE RELEASE: Update for past 3.2 branch 2016-10-26 20:52:43 +02:00
version.sh version.sh: Fix spurious rebuilds. 2016-03-10 09:53:10 +01:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • ffserver is a multimedia streaming server for live broadcasts.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.