5 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>
5 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]

5 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>
5 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>
5 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).

5 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.

5 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.

5 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

5 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

5 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

5 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

5 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

5 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>
5 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]

5 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

5 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

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>
5 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

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>
5 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>
5 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).

5 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

5 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

5 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

5 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

5 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

5 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

5 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]

5 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]

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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.

5 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.

5 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

5 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.

5 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>
5 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>
5 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>
5 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>
5 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.

5 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
5 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.

5 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

5 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

5 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

5 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.

5 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

5 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

5 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=]

5 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

5 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.

5 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.

5 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__.

5 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

5 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

5 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]

5 years agompegaudio: Do not print value of uninitialized variable
Diego Biurrun [Sun, 3 Jan 2016 19:45:48 +0000 (20:45 +0100)]
mpegaudio: Do not print value of uninitialized variable

libavcodec/mpegaudiodec_template.c:885:97: warning: variable 'x' is uninitialized when used here [-Wuninitialized]

5 years agobuild: Hardcode avversion.h dependency
Diego Biurrun [Sun, 16 Oct 2016 06:49:40 +0000 (08:49 +0200)]
build: Hardcode avversion.h dependency

Since avversion.h is a generated header it must be created before
dependencies can be determined as a side effect of compilation.
Otherwise Make stops and restarts the build process to generate
avversion.h and produces related error messages.

5 years agoopenssl: Avoid double semicolons after the GET_BIO_DATA macro
Martin Storsjö [Tue, 25 Oct 2016 18:33:34 +0000 (21:33 +0300)]
openssl: Avoid double semicolons after the GET_BIO_DATA macro

When the macro is expanded with a semicolon following it and the
macro itself contains a semicolon, we ended up in double semicolons,
which is treated as a statement that disallows further declarations.

This avoids errors about mixed declarations and statements on gcc,
after ee050797664c.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoaviocat: Support avio options
Luca Barbato [Tue, 18 Oct 2016 12:50:45 +0000 (14:50 +0200)]
aviocat: Support avio options

Useful to test protocols that require options to be used.

5 years agoscale_npp: fix passthrough mode
Yogender Gupta [Mon, 24 Oct 2016 12:56:41 +0000 (18:26 +0530)]
scale_npp: fix passthrough mode

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agovaapi_decode: Remove vestigial unmap code
Mark Thompson [Wed, 19 Oct 2016 22:47:55 +0000 (23:47 +0100)]
vaapi_decode: Remove vestigial unmap code

The buffer map/unmap code was in an early version of this before it
was committed, but the unmap was never removed.  While wrong, this
was harmless (and therefore unnoticed) because the buffers can't be
mapped at this point - all drivers just did nothing with the call.

5 years agovaapi_decode: Clear parameter buffers to fix picture reuse
Mark Thompson [Wed, 19 Oct 2016 22:45:46 +0000 (23:45 +0100)]
vaapi_decode: Clear parameter buffers to fix picture reuse

When decoding interlaced pictures, the structure is reused to render
to the same surface twice.  The parameter buffers were not being
cleared, which caused the i965 driver to error out.

5 years agovaapi_h264: fix RefPicList[] field flags.
Gwenole Beauchesne [Wed, 19 Oct 2016 22:42:53 +0000 (23:42 +0100)]
vaapi_h264: fix RefPicList[] field flags.

Use new H264Ref.reference field to track field picture flags. The
H264Picture.reference flag in DPB is now irrelevant here.

This is a regression from git commit a12d3188, and that affected
multiple interlaced video streams.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
5 years agoopenssl: Support version 1.1.0.
Matt Oliver [Sun, 9 Oct 2016 19:49:54 +0000 (06:49 +1100)]
openssl: Support version 1.1.0.

Further simplifications by Martin Storsjö, to minimize the

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agortmpdh: Don't use the OpenSSL DH struct
Martin Storsjö [Fri, 21 Oct 2016 09:40:05 +0000 (12:40 +0300)]
rtmpdh: Don't use the OpenSSL DH struct

Instead use our own struct, which we already use when using
gcrypt and gnutls.

In OpenSSL 1.1, the DH struct has been made opaque.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agobktr: Use memset(0) instead of zero initialization for struct sigaction
Diego Biurrun [Fri, 21 Oct 2016 12:17:07 +0000 (14:17 +0200)]
bktr: Use memset(0) instead of zero initialization for struct sigaction

sigaction is not defined in standards as a struct starting with another
struct. Some *BSD variants do however, resulting in a warning from the
zero initialization, which this change eliminates.

This partially reverts a92be9b856bd11b081041c43c25d442028fe9a63.

5 years agocheckasm: Add a test for HEVC add_residual
Alexandra Hájková [Tue, 11 Oct 2016 08:44:19 +0000 (10:44 +0200)]
checkasm: Add a test for HEVC add_residual

5 years agohevc: x86: Add add_residual() SIMD optimizations
Pierre Edouard Lepere [Mon, 18 Aug 2014 08:01:09 +0000 (10:01 +0200)]
hevc: x86: Add add_residual() SIMD optimizations

Initially written by Pierre Edouard Lepere <Pierre-Edouard.Lepere@insa-rennes.fr>,
extended by James Almer <jamrial@gmail.com>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
5 years agoReplace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v
Diego Biurrun [Fri, 21 Oct 2016 11:48:20 +0000 (13:48 +0200)]
Replace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v

5 years agomov: Update colr values
Vittorio Giovara [Tue, 18 Oct 2016 22:21:31 +0000 (18:21 -0400)]
mov: Update colr values

For 'nclx', the latest edition of the standard switched from JPEG XR
to 23001-8, which matches the current order of our entries. Bounds
are preserved as a sanity check.

For 'nclc', qtff edition 2016-09-13 introduced a few new entries.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agolavu: Add JEDEC P22 color primaries
Vittorio Giovara [Tue, 18 Oct 2016 22:16:29 +0000 (18:16 -0400)]
lavu: Add JEDEC P22 color primaries

5 years agoMakefile: fix checking whether reconfiguring is required
Anton Khirnov [Wed, 19 Oct 2016 05:28:06 +0000 (07:28 +0200)]
Makefile: fix checking whether reconfiguring is required

It didn't take into account the new pattern used for bitstream filters
and protocols.

5 years agohevc: factor out a repeated condition
Anton Khirnov [Tue, 18 Oct 2016 19:22:22 +0000 (21:22 +0200)]
hevc: factor out a repeated condition

5 years agohevc: move the SliceType enum to hevc.h
Anton Khirnov [Tue, 18 Oct 2016 19:14:18 +0000 (21:14 +0200)]
hevc: move the SliceType enum to hevc.h

Those values are decoder-independent and are also use by the VA-API

5 years agolavf: check that the codec is supported by extract_extradata
Anton Khirnov [Tue, 18 Oct 2016 18:50:03 +0000 (20:50 +0200)]
lavf: check that the codec is supported by extract_extradata

Avoids superfluous error message spam after

5 years agoaudiodsp: x86: Remove pointless header file
Diego Biurrun [Wed, 28 Sep 2016 17:14:28 +0000 (19:14 +0200)]
audiodsp: x86: Remove pointless header file

Its single forward declaration can be moved to the only place
it is used, like is done for all other dsp init files.

5 years agoconfigure: Print warnings after all other output
Diego Biurrun [Sat, 15 Oct 2016 00:50:45 +0000 (02:50 +0200)]
configure: Print warnings after all other output

5 years agox86: videodsp: Add parentheses to expression to work around warning
Diego Biurrun [Thu, 17 Mar 2016 10:35:13 +0000 (11:35 +0100)]
x86: videodsp: Add parentheses to expression to work around warning

libavcodec/x86/videodsp.asm:128: warning: signed dword value exceeds bounds

5 years agofate: Update filter-pixfmts-scale gbrap12le hash missing from be9dba5c8a
Luca Barbato [Tue, 18 Oct 2016 13:00:38 +0000 (15:00 +0200)]
fate: Update filter-pixfmts-scale gbrap12le hash missing from be9dba5c8a

Signed-off-by: Diego Biurrun <diego@biurrun.de>
5 years agocheckasm: aarch64: Don't clobber x29 in checkasm_stack_clobber
Martin Storsjö [Tue, 18 Oct 2016 10:48:56 +0000 (13:48 +0300)]
checkasm: aarch64: Don't clobber x29 in checkasm_stack_clobber

x29 (FP) is a callee saved register and should be restored on
return. Instead of backing up x29 and restoring it here, back up
sp in a register that we are allowed to overwrite.

This fixes crashes in checkasm on aarch64 since f1b3e1313851.
For some reason, gcc builds didn't crash, but clang builds do.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoemms: Give apriv_emms_yasm() a more general name
Diego Biurrun [Sat, 8 Oct 2016 15:58:02 +0000 (17:58 +0200)]
emms: Give apriv_emms_yasm() a more general name

5 years agoswscale: Properly load alpha for planar rgb
Michael Niedermayer [Fri, 14 Oct 2016 21:25:55 +0000 (17:25 -0400)]
swscale: Properly load alpha for planar rgb

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agobuild: Add VSX-OBJS to SUBDIR_VARS
Diego Biurrun [Sat, 8 Oct 2016 15:43:37 +0000 (17:43 +0200)]

The variable needs to be reset for each subdirectory.

5 years agoppc: avcodec: Drop silly "_ppc" suffixes from files in ppc subdirectories
Diego Biurrun [Sun, 12 Aug 2012 15:54:30 +0000 (17:54 +0200)]
ppc: avcodec: Drop silly "_ppc" suffixes from files in ppc subdirectories

5 years agovaapi_encode: Write sequence header as extradata
Mark Thompson [Sun, 2 Oct 2016 07:48:34 +0000 (08:48 +0100)]
vaapi_encode: Write sequence header as extradata

Only works if packed headers are supported, where we can know the
output before generating the first frame.

5 years agovaapi_h265: Include header for slice types
Mark Thompson [Sun, 16 Oct 2016 22:55:24 +0000 (23:55 +0100)]
vaapi_h265: Include header for slice types

The include was changed correctly in 4abe3b049d987420eb891f74a35af2cebbf52144
but then mistakenly changed back by c359d624d3efc3fd1d83210d78c4152bd329b765
(it's not just the NAL unit types which are used).

5 years agox86: Add missing colons after assembly labels
Diego Biurrun [Thu, 17 Mar 2016 09:16:13 +0000 (10:16 +0100)]
x86: Add missing colons after assembly labels

This fixes many warnings of the sort
warning: label alone on a line without a colon might be in error

5 years agobuild: Drop arch-specific checkasm Makefiles
Diego Biurrun [Thu, 13 Oct 2016 23:24:36 +0000 (01:24 +0200)]
build: Drop arch-specific checkasm Makefiles

They only contain one line and will never contain more.

5 years agobuild: Drop duplicate asm recipe
Diego Biurrun [Sat, 8 Oct 2016 14:48:29 +0000 (16:48 +0200)]
build: Drop duplicate asm recipe

And move the asm recipe to the top-level Makefile next to the other
local pattern rules for .o files.

5 years agocheckasm: aarch64: Add filler args to make sure all parameters are passed on the...
Martin Storsjö [Fri, 30 Sep 2016 09:06:49 +0000 (12:06 +0300)]
checkasm: aarch64: Add filler args to make sure all parameters are passed on the stack

This, combined with clobbering the stack space prior to the call,
increases the chances of finding cases where 32 bit parameters
are erroneously treated as 64 bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agocheckasm: aarch64: Clobber the stack before calling functions
Martin Storsjö [Fri, 30 Sep 2016 08:39:22 +0000 (11:39 +0300)]
checkasm: aarch64: Clobber the stack before calling functions

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agocheckasm: arm/aarch64: Fix the amount of space reserved for stack parameters
Martin Storsjö [Fri, 30 Sep 2016 08:49:47 +0000 (11:49 +0300)]
checkasm: arm/aarch64: Fix the amount of space reserved for stack parameters

Even if MAX_ARGS - 2 (for arm) or MAX_ARGS - 7 (for aarch64) parameters
are passed on the stack to checkasm_checked_call, we actually only
need to store MAX_ARGS - 4 (for arm) or MAX_ARGS - 8 (for aarch64)
parameters on the stack when calling the tested function.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agolavf: use the new bitstream filter for extracting extradata
Anton Khirnov [Thu, 22 Sep 2016 13:24:34 +0000 (15:24 +0200)]
lavf: use the new bitstream filter for extracting extradata

This also fixes a minor bug introduced in the codecpar conversion, where
the termination condition for extracting the extradata does not match
the actual extradata setting code. As a result, the packet durations
made up by lavf go back to their values before the codecpar conversion.
That is of little consequence since that code should eventually be
dropped completely.

5 years agolavc: add a bitstream filter for extracting extradata from packets
Anton Khirnov [Sun, 21 Aug 2016 15:08:34 +0000 (17:08 +0200)]
lavc: add a bitstream filter for extracting extradata from packets

This is intended as a replacement for the 'split' function exported by
some parsers.

5 years agohevcdec: move parameter set parsing into a separate header
Anton Khirnov [Sun, 21 Aug 2016 16:02:02 +0000 (18:02 +0200)]
hevcdec: move parameter set parsing into a separate header

This code is independent from the decoder, so it makes more sense for it
to to have its own header.

5 years agohevcdec: split ff_hevc_diag_scan* declarations into a separate header
Anton Khirnov [Wed, 12 Oct 2016 08:21:35 +0000 (10:21 +0200)]
hevcdec: split ff_hevc_diag_scan* declarations into a separate header

This will be useful in the following commits.