]> git.sesse.net Git - ffmpeg/log
ffmpeg
7 years agoaarch64: vp9: Add NEON optimizations of VP9 MC functions
Martin Storsjö [Thu, 10 Nov 2016 09:06:26 +0000 (11:06 +0200)]
aarch64: vp9: Add NEON optimizations of VP9 MC functions

This work is sponsored by, and copyright, Google.

These are ported from the ARM version; it is essentially a 1:1
port with no extra added features, but with some hand tuning
(especially for the plain copy/avg functions). The ARM version
isn't very register starved to begin with, so there's not much
to be gained from having more spare registers here - we only
avoid having to clobber callee-saved registers.

Examples of runtimes vs the 32 bit version, on a Cortex A53:
                                     ARM   AArch64
vp9_avg4_neon:                      27.2      23.7
vp9_avg8_neon:                      56.5      54.7
vp9_avg16_neon:                    169.9     167.4
vp9_avg32_neon:                    585.8     585.2
vp9_avg64_neon:                   2460.3    2294.7
vp9_avg_8tap_smooth_4h_neon:       132.7     125.2
vp9_avg_8tap_smooth_4hv_neon:      478.8     442.0
vp9_avg_8tap_smooth_4v_neon:       126.0      93.7
vp9_avg_8tap_smooth_8h_neon:       241.7     234.2
vp9_avg_8tap_smooth_8hv_neon:      690.9     646.5
vp9_avg_8tap_smooth_8v_neon:       245.0     205.5
vp9_avg_8tap_smooth_64h_neon:    11273.2   11280.1
vp9_avg_8tap_smooth_64hv_neon:   22980.6   22184.1
vp9_avg_8tap_smooth_64v_neon:    11549.7   10781.1
vp9_put4_neon:                      18.0      17.2
vp9_put8_neon:                      40.2      37.7
vp9_put16_neon:                     97.4      99.5
vp9_put32_neon/armv8:              346.0     307.4
vp9_put64_neon/armv8:             1319.0    1107.5
vp9_put_8tap_smooth_4h_neon:       126.7     118.2
vp9_put_8tap_smooth_4hv_neon:      465.7     434.0
vp9_put_8tap_smooth_4v_neon:       113.0      86.5
vp9_put_8tap_smooth_8h_neon:       229.7     221.6
vp9_put_8tap_smooth_8hv_neon:      658.9     621.3
vp9_put_8tap_smooth_8v_neon:       215.0     187.5
vp9_put_8tap_smooth_64h_neon:    10636.7   10627.8
vp9_put_8tap_smooth_64hv_neon:   21076.8   21026.9
vp9_put_8tap_smooth_64v_neon:     9635.0    9632.4

These are generally about as fast as the corresponding ARM
routines on the same CPU (at least on the A53), in most cases
marginally faster.

The speedup vs C code is pretty much the same as for the 32 bit
case; on the A53 it's around 6-13x for ther larger 8tap filters.
The exact speedup varies a little, since the C versions generally
don't end up exactly as slow/fast as on 32 bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoaarch64: Add an offset parameter to the movrel macro
Martin Storsjö [Wed, 9 Nov 2016 09:47:57 +0000 (11:47 +0200)]
aarch64: Add an offset parameter to the movrel macro

With apple tools, the linker fails with errors like these, if the
offset is negative:

ld: in section __TEXT,__text reloc 8: symbol index out of range for architecture arm64

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agovp9: Make the subpel filters non-static
Martin Storsjö [Sat, 5 Nov 2016 11:18:53 +0000 (13:18 +0200)]
vp9: Make the subpel filters non-static

Make them aligned, to allow efficient access to them from simd.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomatroskaenc: write updated STREAMINFO metadata for FLAC streams if available
James Almer [Wed, 9 Nov 2016 21:38:24 +0000 (18:38 -0300)]
matroskaenc: write updated STREAMINFO metadata for FLAC streams if available

FLAC streams originating from the FLAC encoder send updated and more
complete STREAMINFO metadata as part of the last packet, so write that
to CodecPrivate instead of the incomplete one available in extradata
during init.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agomatroskaenc: fix muxing AAC streams when using aac_adtstoasc bsf
James Almer [Wed, 9 Nov 2016 21:38:23 +0000 (18:38 -0300)]
matroskaenc: fix muxing AAC streams when using aac_adtstoasc bsf

aac_adtstoasc makes the aac extradata available only after the first packet
is filtered, and as packet side data.

Assume extradata will be available as part of the first packet if
avpriv_mpeg4audio_get_config() fails the first time due to missing extradata
and reserve space for the OutputSampleRate element in the Tracks master.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agopthread_frame: properly propagate the hw frame context across frame threads
Anton Khirnov [Mon, 7 Nov 2016 13:21:18 +0000 (14:21 +0100)]
pthread_frame: properly propagate the hw frame context across frame threads

7 years agompegaudiodsp: aarch64: Adjust function prototype after 2caa93b813adc5dbb7771dfe615da8...
Diego Biurrun [Tue, 8 Nov 2016 17:10:04 +0000 (18:10 +0100)]
mpegaudiodsp: aarch64: Adjust function prototype after 2caa93b813adc5dbb7771dfe615da826a2947d18

7 years agoconfigure: Move license checks directly after command line parsing
Diego Biurrun [Wed, 27 Mar 2013 17:21:10 +0000 (18:21 +0100)]
configure: Move license checks directly after command line parsing

This will allow to error out immediately if incompatible options are
passed on the command line instead of running time-consuming tests.

7 years agoconfigure: Log name and parameters of all helper functions where it makes sense
Diego Biurrun [Tue, 8 Nov 2016 19:04:18 +0000 (20:04 +0100)]
configure: Log name and parameters of all helper functions where it makes sense

7 years agoconfigure: Use check_cpp in CPP flags tests
Diego Biurrun [Mon, 8 Aug 2016 18:27:43 +0000 (20:27 +0200)]
configure: Use check_cpp in CPP flags tests

7 years agoconfigure: Log correct test name and use correct filter when testing objective C...
Diego Biurrun [Mon, 6 Jun 2016 17:06:30 +0000 (19:06 +0200)]
configure: Log correct test name and use correct filter when testing objective C flags

7 years agoconfigure: Do not unconditionally check for (and enable) xlib
Diego Biurrun [Mon, 7 Nov 2016 19:22:14 +0000 (20:22 +0100)]
configure: Do not unconditionally check for (and enable) xlib

This avoids unnecessarily linking against xlib.

7 years agoconfigure: Print list of enabled programs
Diego Biurrun [Mon, 7 Nov 2016 21:12:23 +0000 (22:12 +0100)]
configure: Print list of enabled programs

Also drop a related and now redundant informative output line.

7 years agoconfigure: Improve output wording
Diego Biurrun [Tue, 25 Oct 2016 20:47:00 +0000 (22:47 +0200)]
configure: Improve output wording

Also drop a redundant output line.

7 years agoavconv: Drop stray leftover debug output
Diego Biurrun [Tue, 8 Nov 2016 16:48:50 +0000 (17:48 +0100)]
avconv: Drop stray leftover debug output

7 years agoUse avpriv_report_missing_feature() where appropriate
Diego Biurrun [Wed, 16 Dec 2015 17:01:34 +0000 (18:01 +0100)]
Use avpriv_report_missing_feature() where appropriate

7 years agoconfigure: Add --quiet command line parameter to suppress informative output
Diego Biurrun [Sun, 6 Nov 2016 17:33:05 +0000 (18:33 +0100)]
configure: Add --quiet command line parameter to suppress informative output

7 years agofate: checkasm: Split monolithic test into individual components
Diego Biurrun [Thu, 3 Nov 2016 22:32:45 +0000 (23:32 +0100)]
fate: checkasm: Split monolithic test into individual components

7 years agocheckasm: Add --test parameter to check only specific components
Diego Biurrun [Thu, 3 Nov 2016 22:40:26 +0000 (23:40 +0100)]
checkasm: Add --test parameter to check only specific components

Inspired by a patch from Martin Storsjö <martin@martin.st>.

7 years agomov: Read multiple stsd from DV
Vittorio Giovara [Tue, 8 Nov 2016 03:30:22 +0000 (22:30 -0500)]
mov: Read multiple stsd from DV

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agohevc: Support extradata changes from multiple stsd
Vittorio Giovara [Wed, 2 Nov 2016 16:03:18 +0000 (12:03 -0400)]
hevc: Support extradata changes from multiple stsd

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agohevc: Allow parsing external extradata buffers
Vittorio Giovara [Mon, 7 Nov 2016 22:36:20 +0000 (17:36 -0500)]
hevc: Allow parsing external extradata buffers

7 years agohevc: Move hevc_decode_extradata before frame decoding
Vittorio Giovara [Wed, 2 Nov 2016 16:03:17 +0000 (12:03 -0400)]
hevc: Move hevc_decode_extradata before frame decoding

Avoids a forward-declaration in the following commit.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agolavc: Add hevc main10 profile to avconv cli
Vittorio Giovara [Wed, 2 Nov 2016 16:15:16 +0000 (12:15 -0400)]
lavc: Add hevc main10 profile to avconv cli

7 years agolavu: Rename ycgco color space appropriately
Vittorio Giovara [Mon, 31 Oct 2016 18:50:59 +0000 (14:50 -0400)]
lavu: Rename ycgco color space appropriately

Planes are ordered as the name suggests now.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agoh264_qpel: x86: Move function with only one instance out of template macro
Diego Biurrun [Sun, 3 Jan 2016 21:45:47 +0000 (22:45 +0100)]
h264_qpel: x86: Move function with only one instance out of template macro

libavcodec/x86/h264_qpel.c:392:785: warning: unused function 'ff_avg_h264_qpel8or16_hv1_lowpass_mmxext' [-Wunused-function]

7 years agoavplay: Correct function pointer assignments in options array
Diego Biurrun [Mon, 9 Nov 2015 11:55:37 +0000 (12:55 +0100)]
avplay: Correct function pointer assignments in options array

avplay.c:2928:5: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]

7 years agoavconv: Correct function pointer assignments in options array
Diego Biurrun [Mon, 9 Nov 2015 11:54:53 +0000 (12:54 +0100)]
avconv: Correct function pointer assignments in options array

Fixes several warnings of the type
avconv_opt.c:2356:5: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]

7 years agolzf: update pointer p after realloc
Andreas Cadhalpun [Fri, 4 Nov 2016 22:33:02 +0000 (23:33 +0100)]
lzf: update pointer p after realloc

This fixes heap-use-after-free detected by AddressSanitizer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years agoswscale: Add GRAY12
Luca Barbato [Thu, 3 Nov 2016 15:10:03 +0000 (16:10 +0100)]
swscale: Add GRAY12

7 years agopixfmt: Add GRAY12
Luca Barbato [Thu, 3 Nov 2016 15:03:54 +0000 (16:03 +0100)]
pixfmt: Add GRAY12

7 years agoqsv{enc,dec}: extend the internal frame allocator
Anton Khirnov [Wed, 10 Aug 2016 07:38:21 +0000 (09:38 +0200)]
qsv{enc,dec}: extend the internal frame allocator

Handle the internal frame requests, which is required by the HEVC
encoding plugin.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agoqsv{dec,enc}: use a struct as a memory id with internal memory allocator
Anton Khirnov [Wed, 10 Aug 2016 06:29:23 +0000 (08:29 +0200)]
qsv{dec,enc}: use a struct as a memory id with internal memory allocator

This will allow implementing the allocator more fully, which is needed
by the HEVC encoder plugin with video memory input.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agoqsv{dec,enc}: always use an internal mfxFrameSurface1
Anton Khirnov [Tue, 9 Aug 2016 10:05:49 +0000 (12:05 +0200)]
qsv{dec,enc}: always use an internal mfxFrameSurface1

For encoding, this avoids modifying the input surface, which we are not
allowed to do.
This will also be useful in the following commits.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_qsv: support frame mapping
Anton Khirnov [Thu, 6 Oct 2016 09:33:15 +0000 (11:33 +0200)]
hwcontext_qsv: support frame mapping

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_qsv: transfer data through the child context when VPP fails
Anton Khirnov [Wed, 10 Aug 2016 12:58:08 +0000 (14:58 +0200)]
hwcontext_qsv: transfer data through the child context when VPP fails

Uploading/downloading data through VPP may not work for some formats, in
that case we can still try to call av_hwframe_transfer_data() on the
child context.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_qsv: do not fail when download/upload VPP session creation fails
Anton Khirnov [Wed, 10 Aug 2016 10:54:31 +0000 (12:54 +0200)]
hwcontext_qsv: do not fail when download/upload VPP session creation fails

Certain pixel formats (e.g. P8) might not be supported for
download/upload through VPP operations, but can still be used otherwise.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_qsv: add support for the P8 format
Anton Khirnov [Wed, 10 Aug 2016 11:01:55 +0000 (13:01 +0200)]
hwcontext_qsv: add support for the P8 format

When using GPU surfaces with QSV, one needs to supply a frame allocator,
which will be invoked to pass surface pools to libmfx.
For encoding, this allocator gets invoked not only for the pool of input
frames, but also for a separate pool of (apparently) reconstructed frames
and another pool of MFX_FOURCC_P8, which on Windows needs to return
D3DFMT_P8 D3D surfaces. Those are probably used to store the encoded
bitstream on the GPU.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_dxva2: add support for the P8 format
Anton Khirnov [Wed, 10 Aug 2016 11:01:55 +0000 (13:01 +0200)]
hwcontext_dxva2: add support for the P8 format

This format is used internally by the QSV encoder to store the encoded
bitstream.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agohwcontext_dxva2: frame mapping support
Anton Khirnov [Wed, 5 Oct 2016 11:39:44 +0000 (13:39 +0200)]
hwcontext_dxva2: frame mapping support

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
7 years agodxva2: fix surface selection when compiled with both d3d11va and dxva2
Hendrik Leppkes [Mon, 7 Nov 2016 08:59:28 +0000 (09:59 +0100)]
dxva2: fix surface selection when compiled with both d3d11va and dxva2

Fixes a regression introduced in
be630b1e08ebe8f766b1798accd6b8e5e096f5aa

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolibx265: Add option to force IDR frames
Derek Buitenhuis [Sun, 6 Nov 2016 14:09:37 +0000 (14:09 +0000)]
libx265: Add option to force IDR frames

This is in the same the same vein as 380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agox86: Drop stray semicolons after function definitions
Diego Biurrun [Fri, 30 Oct 2015 13:04:08 +0000 (14:04 +0100)]
x86: Drop stray semicolons after function definitions

libavcodec/x86/rv40dsp_init.c:97:2: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
libavcodec/x86/vp9dsp_init.c:94:40: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]

7 years agoconfigure: Silence lld-link when getting the version number
Martin Storsjö [Thu, 3 Nov 2016 12:14:12 +0000 (14:14 +0200)]
configure: Silence lld-link when getting the version number

In recent lld-link versions, this command prints the version to
stdout, but also prints an error to stderr:

$ lld-link -flavor gnu --version
LLD 4.0.0 (trunk 285641)
lld-link: error: no input files
lld-link: error: target emulation unknown: -m or at least one .o file required

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoarm: vp9mc: Insert a literal pool at the middle of the file
Martin Storsjö [Fri, 4 Nov 2016 07:16:22 +0000 (09:16 +0200)]
arm: vp9mc: Insert a literal pool at the middle of the file

This fixes errors like this when building non-pic binaries with armv6
as baseline:

Error: invalid literal constant: pool needs to be closer

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agohwcontext_vaapi: Frame mapping support
Mark Thompson [Tue, 25 Oct 2016 19:43:08 +0000 (20:43 +0100)]
hwcontext_vaapi: Frame mapping support

Can map to any supported software format (using a GPU copy if it
doesn't actually match the surface format underneath).

7 years agolavfi: Hardware map filter
Mark Thompson [Tue, 25 Oct 2016 19:40:17 +0000 (20:40 +0100)]
lavfi: Hardware map filter

Takes a frame associated with a hardware context as input and maps it
to something else (another hardware frame or normal memory) for other
processing.  If the frame to map was originally in the target format
(but mapped to something else), the original frame is output.

Also supports mapping backwards, where only the output has a hardware
context.  The link immediately before will be supplied with mapped
hardware frames which it can write directly into, and this filter
then unmaps them back to the actual hardware frames.

7 years agohwcontext: Hardware frame mapping
Mark Thompson [Tue, 25 Oct 2016 19:38:47 +0000 (20:38 +0100)]
hwcontext: Hardware frame mapping

Adds the new av_hwframe_map() function, which allows mapping between
hardware frames and normal memory, along with internal support for
implementing it.

Also adds av_hwframe_ctx_create_derived(), for creating a hardware
frames context associated with one device using frames mapped from
another by some hardware-specific means.

7 years agoDrop unreachable break and return statements
Diego Biurrun [Thu, 12 Mar 2015 23:39:31 +0000 (00:39 +0100)]
Drop unreachable break and return statements

7 years agofloat_dsp: Have implementation match function pointer prototype
Diego Biurrun [Mon, 31 Oct 2016 23:33:05 +0000 (00:33 +0100)]
float_dsp: Have implementation match function pointer prototype

libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 1 different from declaration
libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 2 different from declaration

7 years agodnxhdenc: Have function pointer prototype match implementation
Diego Biurrun [Mon, 31 Oct 2016 23:30:33 +0000 (00:30 +0100)]
dnxhdenc: Have function pointer prototype match implementation

libavcodec/dnxhdenc.c(326) : warning C4028: formal parameter 1 different from declaration
libavcodec/dnxhdenc.c(329) : warning C4028: formal parameter 1 different from declaration

7 years agopixblockdsp: Have function pointer prototype match implementation
Diego Biurrun [Mon, 31 Oct 2016 22:12:20 +0000 (23:12 +0100)]
pixblockdsp: Have function pointer prototype match implementation

libavcodec/pixblockdsp.c(58) : warning C4028: formal parameter 1 different from declaration
libavcodec/pixblockdsp.c(63) : warning C4028: formal parameter 1 different from declaration
libavcodec/pixblockdsp.c(66) : warning C4028: formal parameter 1 different from declaration

7 years agoituh263dec: Have function signature match across declaration and definition
Diego Biurrun [Mon, 31 Oct 2016 22:06:54 +0000 (23:06 +0100)]
ituh263dec: Have function signature match across declaration and definition

libavcodec/ituh263dec.c(215) : warning C4028: formal parameter 1 different from declaration
libavcodec/ituh263dec.c(215) : warning C4028: formal parameter 2 different from declaration

7 years agovf_hwupload_cuda: Fix build error
Mark Thompson [Thu, 3 Nov 2016 16:33:25 +0000 (16:33 +0000)]
vf_hwupload_cuda: Fix build error

Broken by e3fb74f7f9a8f1895381355f40c92cac3c1023d9.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agosvq3: Drop unused function dctcoef_get()
Diego Biurrun [Mon, 31 Oct 2016 22:49:12 +0000 (23:49 +0100)]
svq3: Drop unused function dctcoef_get()

libavcodec/svq3.c:627:29: warning: unused function 'dctcoef_get' [-Wunused-function]

7 years agointrax8: Have function signature match across declaration and definition
Diego Biurrun [Tue, 20 Sep 2016 14:00:15 +0000 (16:00 +0200)]
intrax8: Have function signature match across declaration and definition

libavcodec/intrax8.c(776) : warning C4028: formal parameter 1 different from declaration

7 years agooptions_table: Remove a now unnecessary include of config.h
Martin Storsjö [Thu, 3 Nov 2016 08:39:24 +0000 (10:39 +0200)]
options_table: Remove a now unnecessary include of config.h

The include of config.h was added in 2012 in 1d9c2dc8, due to
the use of CONFIG_SNOW_ENCODER ifdefs within options_table.h.
When the snow codec was dropped later (in a0c5917f8 in 2013),
this include no longer served any purpose.

options_table.h is included in builds for the host as well, when
building documentation. config.h should not be included in code
that is built for the host, since it can contain workarounds
for the target compiler/environment, like adding a missing define
of restrict, defining getenv(x) to NULL for environments that lack
getenv.

The seemingly innocent include reordering in 2025d37871 broke
builds that have getenv(x) defined to NULL in config.h (Windows CE
and Windows Phone/RT), since libavcodec/options_table.h include
config.h, while libavformat/options_table.h end up bringing in
more system headers, and those system headers can contain a proper
definition of getenv, which clash with the getenv define in config.h.
This was avoided earlier as long as libavformat/options_table.h (or
avformat.h) was included before libavcodec/options_table.h.

This fixes builds for Windows Phone/RT and CE.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoarm: vp9: Add NEON optimizations of VP9 MC functions
Martin Storsjö [Thu, 3 Nov 2016 07:12:08 +0000 (09:12 +0200)]
arm: vp9: Add NEON optimizations of VP9 MC functions

This work is sponsored by, and copyright, Google.

The filter coefficients are signed values, where the product of the
multiplication with one individual filter coefficient doesn't
overflow a 16 bit signed value (the largest filter coefficient is
127). But when the products are accumulated, the resulting sum can
overflow the 16 bit signed range. Instead of accumulating in 32 bit,
we accumulate the largest product (either index 3 or 4) last with a
saturated addition.

(The VP8 MC asm does something similar, but slightly simpler, by
accumulating each half of the filter separately. In the VP9 MC
filters, each half of the filter can also overflow though, so the
largest component has to be handled individually.)

Examples of relative speedup compared to the C version, from checkasm:
                       Cortex      A7     A8     A9    A53
vp9_avg4_neon:                   1.71   1.15   1.42   1.49
vp9_avg8_neon:                   2.51   3.63   3.14   2.58
vp9_avg16_neon:                  2.95   6.76   3.01   2.84
vp9_avg32_neon:                  3.29   6.64   2.85   3.00
vp9_avg64_neon:                  3.47   6.67   3.14   2.80
vp9_avg_8tap_smooth_4h_neon:     3.22   4.73   2.76   4.67
vp9_avg_8tap_smooth_4hv_neon:    3.67   4.76   3.28   4.71
vp9_avg_8tap_smooth_4v_neon:     5.52   7.60   4.60   6.31
vp9_avg_8tap_smooth_8h_neon:     6.22   9.04   5.12   9.32
vp9_avg_8tap_smooth_8hv_neon:    6.38   8.21   5.72   8.17
vp9_avg_8tap_smooth_8v_neon:     9.22  12.66   8.15  11.10
vp9_avg_8tap_smooth_64h_neon:    7.02  10.23   5.54  11.58
vp9_avg_8tap_smooth_64hv_neon:   6.76   9.46   5.93   9.40
vp9_avg_8tap_smooth_64v_neon:   10.76  14.13   9.46  13.37
vp9_put4_neon:                   1.11   1.47   1.00   1.21
vp9_put8_neon:                   1.23   2.17   1.94   1.48
vp9_put16_neon:                  1.63   4.02   1.73   1.97
vp9_put32_neon:                  1.56   4.92   2.00   1.96
vp9_put64_neon:                  2.10   5.28   2.03   2.35
vp9_put_8tap_smooth_4h_neon:     3.11   4.35   2.63   4.35
vp9_put_8tap_smooth_4hv_neon:    3.67   4.69   3.25   4.71
vp9_put_8tap_smooth_4v_neon:     5.45   7.27   4.49   6.52
vp9_put_8tap_smooth_8h_neon:     5.97   8.18   4.81   8.56
vp9_put_8tap_smooth_8hv_neon:    6.39   7.90   5.64   8.15
vp9_put_8tap_smooth_8v_neon:     9.03  11.84   8.07  11.51
vp9_put_8tap_smooth_64h_neon:    6.78   9.48   4.88  10.89
vp9_put_8tap_smooth_64hv_neon:   6.99   8.87   5.94   9.56
vp9_put_8tap_smooth_64v_neon:   10.69  13.30   9.43  14.34

For the larger 8tap filters, the speedup vs C code is around 5-14x.

This is significantly faster than libvpx's implementation of the same
functions, at least when comparing the put_8tap_smooth_64 functions
(compared to vpx_convolve8_horiz_neon and vpx_convolve8_vert_neon from
libvpx).

Absolute runtimes from checkasm:
                          Cortex      A7        A8        A9       A53
vp9_put_8tap_smooth_64h_neon:    20150.3   14489.4   19733.6   10863.7
libvpx vpx_convolve8_horiz_neon: 52623.3   19736.4   21907.7   25027.7

vp9_put_8tap_smooth_64v_neon:    14455.0   12303.9   13746.4    9628.9
libvpx vpx_convolve8_vert_neon:  42090.0   17706.2   17659.9   16941.2

Thus, on the A9, the horizontal filter is only marginally faster than
libvpx, while our version is significantly faster on the other cores,
and the vertical filter is significantly faster on all cores. The
difference is especially large on the A7.

The libvpx implementation does the accumulation in 32 bit, which
probably explains most of the differences.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agovp9: Flip the order of arguments in MC functions
Martin Storsjö [Thu, 3 Nov 2016 07:12:02 +0000 (09:12 +0200)]
vp9: Flip the order of arguments in MC functions

This makes it match the pattern already used for VP8 MC functions.

This also makes the signature match ffmpeg's version of these
functions, easing porting of code in both directions.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavfi: Always propagate hw_frames_ctx through links
Mark Thompson [Tue, 25 Oct 2016 19:42:27 +0000 (20:42 +0100)]
lavfi: Always propagate hw_frames_ctx through links

Also adds a new flag to mark filters which are aware of hwframes and
will perform this task themselves, and marks all appropriate filters
with this flag.

This is required to allow software-mapped hardware frames to work,
because we need to have the frames context available for any later
mapping operation in the filter graph.

The output from the filter graph should only propagate further to an
encoder if the hardware format actually matches the visible format
(mapped frames are valid here and have an hw_frames_ctx, but this
should not be given to the encoder as its hardware context).

7 years agolavfi: Use ff_get_video_buffer in all filters using hwframes
Mark Thompson [Mon, 31 Oct 2016 22:14:10 +0000 (22:14 +0000)]
lavfi: Use ff_get_video_buffer in all filters using hwframes

7 years agolavfi: Make default get_video_buffer work with hardware frames
Mark Thompson [Mon, 31 Oct 2016 22:14:04 +0000 (22:14 +0000)]
lavfi: Make default get_video_buffer work with hardware frames

7 years agodoc: Turn off noisy deprecation warnings in the option printer
Diego Biurrun [Fri, 4 Dec 2015 11:43:10 +0000 (12:43 +0100)]
doc: Turn off noisy deprecation warnings in the option printer

7 years agortmpproto: Restructure zlib code to avoid unreachable code warning
Diego Biurrun [Thu, 29 Oct 2015 12:39:49 +0000 (13:39 +0100)]
rtmpproto: Restructure zlib code to avoid unreachable code warning

libavformat\rtmpproto.c(1165) : warning C4702: unreachable code

7 years agobink: Have function pointer prototype match implementation
Diego Biurrun [Thu, 12 Mar 2015 23:38:57 +0000 (00:38 +0100)]
bink: Have function pointer prototype match implementation

libavcodec/binkdsp.c(156) : warning C4028: formal parameter 1 different from declaration

7 years agoidct: Have function pointer prototype match implementation
Diego Biurrun [Thu, 12 Mar 2015 23:35:37 +0000 (00:35 +0100)]
idct: Have function pointer prototype match implementation

libavcodec/idctdsp.c(175) : warning C4028: formal parameter 2 different from declaration

7 years agoaactab: Move extern keyword to the front of array declarations
Diego Biurrun [Mon, 9 Nov 2015 12:25:55 +0000 (13:25 +0100)]
aactab: Move extern keyword to the front of array declarations

libavcodec/aactab.h:49:1: warning: ‘extern’ is not at beginning of declaration [-Wold-style-declaration]

7 years agovf_drawtext: Move static keyword to beginning of variable declaration
Diego Biurrun [Fri, 30 Oct 2015 14:02:04 +0000 (15:02 +0100)]
vf_drawtext: Move static keyword to beginning of variable declaration

libavfilter/vf_drawtext.c:226:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]

7 years agoexamples/decode_video: remove a stray unrelated comment
Anton Khirnov [Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)]
examples/decode_video: remove a stray unrelated comment

7 years agoexamples/decode_video: constify the AVCodec instance
Anton Khirnov [Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)]
examples/decode_video: constify the AVCodec instance

7 years agoexamples/encode_video: use the AVFrame API for allocating the frame
Anton Khirnov [Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)]
examples/encode_video: use the AVFrame API for allocating the frame

It is more efficient and so preferred over allocating the buffers
manually.

7 years agoexamples/encode_video: set the framerate
Anton Khirnov [Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)]
examples/encode_video: set the framerate

7 years agoexamples/encode_video: constify the AVCodec instance
Anton Khirnov [Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)]
examples/encode_video: constify the AVCodec instance

7 years agoexamples/avcodec: split the remaining two examples into separate files
Anton Khirnov [Wed, 19 Oct 2016 19:05:22 +0000 (21:05 +0200)]
examples/avcodec: split the remaining two examples into separate files

7 years agoexamples/decode_audio: constify the AVCodec instance
Anton Khirnov [Wed, 19 Oct 2016 19:56:22 +0000 (21:56 +0200)]
examples/decode_audio: constify the AVCodec instance

7 years agoexamples/avcodec: split audio decoding into a separate example
Anton Khirnov [Wed, 19 Oct 2016 19:05:22 +0000 (21:05 +0200)]
examples/avcodec: split audio decoding into a separate example

The four examples (audio/video encoding/decoding) are completely
independent so it makes little sense to have them all in one file.

7 years agoexamples/encode_audio: use the AVFrame API for allocating the data
Anton Khirnov [Wed, 19 Oct 2016 19:21:08 +0000 (21:21 +0200)]
examples/encode_audio: use the AVFrame API for allocating the data

It is simpler and more efficient.

7 years agoexamples/encode_audio: constify AVCodec instances
Anton Khirnov [Wed, 19 Oct 2016 19:07:43 +0000 (21:07 +0200)]
examples/encode_audio: constify AVCodec instances

7 years agoexamples/avcodec: split audio encoding into a separate example
Anton Khirnov [Wed, 19 Oct 2016 19:05:22 +0000 (21:05 +0200)]
examples/avcodec: split audio encoding into a separate example

The four examples (audio/video encoding/decoding) are completely
independent so it makes little sense to have them all in one file.

7 years agoavconv: support parsing bitstream filter options
James Almer [Sat, 29 Oct 2016 00:44:51 +0000 (21:44 -0300)]
avconv: support parsing bitstream filter options

Example usage:

avconv -i INPUT -bsf filter[=opt1=val1:opt2=val2] OUTPUT

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agomov: Evaluate the movie display matrix
Vittorio Giovara [Mon, 24 Oct 2016 21:46:47 +0000 (17:46 -0400)]
mov: Evaluate the movie display matrix

This matrix needs to be applied after all others have (currently only
display matrix from trak), but cannot be handled in movie box, since
streams are not allocated yet. So store it in main context, and apply
it when appropriate, that is after parsing the tkhd one.

Fate tests are updated accordingly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agofate: Add tests for mov display matrix
Vittorio Giovara [Mon, 24 Oct 2016 21:22:55 +0000 (17:22 -0400)]
fate: Add tests for mov display matrix

Rotation, sample/display aspect ratio and pure matrix export.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agoavprobe: Add -show_stream_entry to get a single stream property
Vittorio Giovara [Mon, 24 Oct 2016 21:22:54 +0000 (17:22 -0400)]
avprobe: Add -show_stream_entry to get a single stream property

This is needed for improved fate testing and it is modeled after
-show_format_entry. The main behavioral difference is that when a print
function is called with an empty key, rather than discarding it, the
closes key in the hierarchy is used instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
7 years agoopenssl: Allow newer TLS versions than TLSv1
Mark Thompson [Sun, 30 Oct 2016 14:57:30 +0000 (14:57 +0000)]
openssl: Allow newer TLS versions than TLSv1

The use of TLSv1_*_method() disallows newer protocol versions; instead
use SSLv23_*_method() and then explicitly disable the deprecated
protocol versions which should not be supported.

7 years agoxcb: Add all the libraries to the link line explicitly
Luca Barbato [Sun, 30 Oct 2016 16:44:49 +0000 (17:44 +0100)]
xcb: Add all the libraries to the link line explicitly

Avoid an underlink issue on recent distributions.

CC: libav-stable@libav.org
7 years agoRevert "rtmpproto: Don't include a client version in the unencrypted C1 handshake"
Luca Barbato [Sun, 30 Oct 2016 13:52:45 +0000 (14:52 +0100)]
Revert "rtmpproto: Don't include a client version in the unencrypted C1 handshake"

This reverts commit 7d8d726be7dc46343ab1c98c339c1ed44bcb07c1.

7 years agoqsv: Be informative when reporting that no data has been consumed
Luca Barbato [Sat, 29 Oct 2016 15:00:20 +0000 (17:00 +0200)]
qsv: Be informative when reporting that no data has been consumed

7 years agoUse avpriv_request_sample() where appropriate
Diego Biurrun [Wed, 16 Dec 2015 17:02:04 +0000 (18:02 +0100)]
Use avpriv_request_sample() where appropriate

7 years agodash: Use correct ISO C scanf conversion specifier
Diego Biurrun [Sun, 3 Jan 2016 19:31:13 +0000 (20:31 +0100)]
dash: Use correct ISO C scanf conversion specifier

7 years agosrt: Adjust signedness of sscanf format strings
Diego Biurrun [Wed, 11 Nov 2015 16:40:27 +0000 (17:40 +0100)]
srt: Adjust signedness of sscanf format strings

Fixes several warnings from -Wformat.

7 years agodxtory: Drop nonsense ISO C printf conversion specifiers for standard types
Diego Biurrun [Mon, 11 Jan 2016 14:46:46 +0000 (15:46 +0100)]
dxtory: Drop nonsense ISO C printf conversion specifiers for standard types

7 years agoUse ISO C printf conversion specifiers where appropriate
Diego Biurrun [Fri, 11 Dec 2015 16:29:11 +0000 (17:29 +0100)]
Use ISO C printf conversion specifiers where appropriate

7 years agohap: Adjust printf length modifiers to match variable types
Diego Biurrun [Tue, 8 Dec 2015 14:57:04 +0000 (15:57 +0100)]
hap: Adjust printf length modifiers to match variable types

libavcodec/hapenc.c:121:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t {aka unsigned int}’ [-Wformat=]
libavcodec/hapenc.c:121:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t {aka unsigned int}’ [-Wformat=]

7 years agoAdjust printf conversion specifiers to match variable signedness
Diego Biurrun [Tue, 15 Dec 2015 09:50:18 +0000 (10:50 +0100)]
Adjust printf conversion specifiers to match variable signedness

7 years agoRemove some pointless TRACE level debug code
Diego Biurrun [Sun, 3 Jan 2016 19:27:59 +0000 (20:27 +0100)]
Remove some pointless TRACE level debug code

This also kills some warnings with certain compiler options.

7 years agonut: Drop pointless TRACE level debug code
Diego Biurrun [Fri, 11 Dec 2015 17:58:12 +0000 (18:58 +0100)]
nut: Drop pointless TRACE level debug code

The code has little usefulness and uses the __PRETTY_FUNCTION__ GNU extension.

7 years agonsv: Drop unnecessary TRACE level debug code
Diego Biurrun [Sun, 6 Dec 2015 14:13:44 +0000 (15:13 +0100)]
nsv: Drop unnecessary TRACE level debug code

The output is rather silly and the code uses non-standard __FUNCTION__.

7 years agodnxhdenc: Drop pointless, commented-out debug output
Diego Biurrun [Mon, 11 Jan 2016 14:40:20 +0000 (15:40 +0100)]
dnxhdenc: Drop pointless, commented-out debug output

7 years agoaudio_fifo: Drop write-only variable
Diego Biurrun [Thu, 12 Mar 2015 23:38:07 +0000 (00:38 +0100)]
audio_fifo: Drop write-only variable

7 years agoh264_loopfilter: Do not print value of uninitialized variable
Diego Biurrun [Sun, 3 Jan 2016 19:46:51 +0000 (20:46 +0100)]
h264_loopfilter: Do not print value of uninitialized variable

libavcodec/h264_loopfilter.c:531:111: warning: variable 'edge' is uninitialized when used here [-Wuninitialized]