libav.git
13 months agocbs: Add test dependencies
Mark Thompson [Mon, 16 Oct 2017 22:02:24 +0000 (23:02 +0100)]
cbs: Add test dependencies

Fixes the MPEG-2 failure with --disable-error-resilience.

13 months agomss1: Add missing macro parameters to ARITH_GET_* macros
Diego Biurrun [Wed, 11 Oct 2017 03:57:59 +0000 (05:57 +0200)]
mss1: Add missing macro parameters to ARITH_GET_* macros

It is wrong to pass no arguments to a macro that expects one argument
and some compilers complain.

13 months agoqsv: Expose idr_interval for hevc as well
Luca Barbato [Fri, 13 Oct 2017 23:22:13 +0000 (23:22 +0000)]
qsv: Expose idr_interval for hevc as well

13 months agoRemove dv1394 input device
Josh de Kock [Tue, 26 Sep 2017 14:49:18 +0000 (15:49 +0100)]
Remove dv1394 input device

Support for this device has been removed in the Linux kernel since v2.6.37.
dv1394 has been superseded by libiec61883 which is functionally equivalent.

Signed-off-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 months agoavfoundation: Drop silly _dec suffix from filename
Diego Biurrun [Wed, 27 Sep 2017 13:28:33 +0000 (15:28 +0200)]
avfoundation: Drop silly _dec suffix from filename

13 months agoalsa: Coalesce source files after outdev removal
Diego Biurrun [Wed, 27 Sep 2017 13:24:58 +0000 (15:24 +0200)]
alsa: Coalesce source files after outdev removal

13 months agooss: Coalesce source files after outdev removal
Diego Biurrun [Wed, 27 Sep 2017 13:18:58 +0000 (15:18 +0200)]
oss: Coalesce source files after outdev removal

13 months agosndio: Coalesce source files after outdev removal
Diego Biurrun [Wed, 27 Sep 2017 13:12:41 +0000 (15:12 +0200)]
sndio: Coalesce source files after outdev removal

13 months agoRemove all output devices
Diego Biurrun [Sat, 23 Sep 2017 14:26:28 +0000 (16:26 +0200)]
Remove all output devices

The libavformat API is not suitable for exporting output devices as muxers.
Some practical problems are e.g. lack of timing/synchronization mechanisms
or interaction with output-specific features.

14 months agopictor: Correctly check frame dimensions
Michael Niedermayer [Tue, 7 Feb 2017 14:49:09 +0000 (15:49 +0100)]
pictor: Correctly check frame dimensions

Fixes: 559/clusterfuzz-testcase-6424225917173760
Bug-Id: CVE-2017-7862
CC: libav-stable@libav.org
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8c2ea3030af7b40a3c4275696fb5c76cdb80950a)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 months agomakedef: Add support for identifying the ARM64 machine type
Martin Storsjö [Wed, 13 Sep 2017 20:05:50 +0000 (23:05 +0300)]
makedef: Add support for identifying the ARM64 machine type

Since this machine type is 5 chars while the existing ones only
were 3 (which the regexp assumed), the regexp has to be extended
a little.

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agoconfigure: Add a comment about why we don't try to enable pic on arm on target_os...
Martin Storsjö [Thu, 12 Oct 2017 08:08:32 +0000 (11:08 +0300)]
configure: Add a comment about why we don't try to enable pic on arm on target_os=win32

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agoconfigure: Don't add -fPIC to asflags when targeting windows
Martin Storsjö [Thu, 12 Oct 2017 08:04:53 +0000 (11:04 +0300)]
configure: Don't add -fPIC to asflags when targeting windows

On X86 windows, asflags weren't actually ever used for anything,
since assembling used x86asflags instead, and that flags list
had -DPIC already.

This fixes building shared libraries with clang for arm/aarch64
windows. (This wasn't an issue when in msvc mode before, since
we don't try to enable pic at all there, since the msvc armasm
assembler fails on our pic constructs there.)

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agoconfigure: Don't add -fPIC to cflags for target_os=win32
Martin Storsjö [Thu, 12 Oct 2017 08:03:08 +0000 (11:03 +0300)]
configure: Don't add -fPIC to cflags for target_os=win32

We skipped adding it to cflags for mingw/cygwin configurations
where the compiler either complains loudly or even errors out;
do the same for target_os=win32, for the case when building with
clang in msvc mode.

This wasn't needed for the actual msvc before, since msvc uses
msvc_common_flags to filter out this flag from cflags.
When building with clang in msvc mode, no such filter is used.

This fixes building shared libraries with clang in msvc mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agobuild: CryptGenRandom --> wincrypt, it is a better name
Diego Biurrun [Tue, 26 Sep 2017 16:24:24 +0000 (18:24 +0200)]
build: CryptGenRandom --> wincrypt, it is a better name

14 months agobuild: Rename stdatomic_h variable to stdatomic
Diego Biurrun [Sun, 24 Sep 2017 18:10:02 +0000 (20:10 +0200)]
build: Rename stdatomic_h variable to stdatomic

It does not represent a header but a complete system capability.

14 months agoconfigure: Extend check_header() to allow checking for multiple headers
Diego Biurrun [Wed, 4 Oct 2017 00:03:53 +0000 (02:03 +0200)]
configure: Extend check_header() to allow checking for multiple headers

Also use that new capability to simplify bktr header checks.

14 months agobuild: Merge mach/mach_time.h and mach_absolute_time() checks
Diego Biurrun [Sat, 7 Oct 2017 01:16:11 +0000 (03:16 +0200)]
build: Merge mach/mach_time.h and mach_absolute_time() checks

14 months agoconfigure: Merge separate parts of GnuTLS test
Diego Biurrun [Sat, 23 Sep 2017 15:07:50 +0000 (17:07 +0200)]
configure: Merge separate parts of GnuTLS test

14 months agoconfigure: Simplify nvenc check (and move it to the correct spot)
Diego Biurrun [Sat, 23 Sep 2017 15:05:00 +0000 (17:05 +0200)]
configure: Simplify nvenc check (and move it to the correct spot)

14 months agoconfigure: Drop fallback for deprecated avserver command line options
Diego Biurrun [Thu, 5 Oct 2017 23:57:40 +0000 (01:57 +0200)]
configure: Drop fallback for deprecated avserver command line options

14 months agoconfigure: Drop feature for randomly disabling/enabling components
Diego Biurrun [Thu, 5 Oct 2017 23:52:45 +0000 (01:52 +0200)]
configure: Drop feature for randomly disabling/enabling components

This feature was never used for anything.

14 months agoconfigure: Fix stupid typo in gsm.h header name
Diego Biurrun [Wed, 11 Oct 2017 16:58:00 +0000 (18:58 +0200)]
configure: Fix stupid typo in gsm.h header name

14 months agoconfigure: Remove pointless empty *_COMPONENTS variables
Diego Biurrun [Thu, 5 Oct 2017 21:16:25 +0000 (23:16 +0200)]
configure: Remove pointless empty *_COMPONENTS variables

14 months agoconfigure: Drop stray extralibs for libspeex
Diego Biurrun [Wed, 4 Oct 2017 18:07:47 +0000 (20:07 +0200)]
configure: Drop stray extralibs for libspeex

These extralibs are set by pkg-config already.

14 months agoconfigure: Drop unused attribute checks
Diego Biurrun [Tue, 26 Sep 2017 16:14:41 +0000 (18:14 +0200)]
configure: Drop unused attribute checks

14 months agoconfigure: Drop test for fork()
Diego Biurrun [Tue, 26 Sep 2017 15:22:43 +0000 (17:22 +0200)]
configure: Drop test for fork()

fork() is never used conditionally.

14 months agobuild: Drop redundant check for soundcard.h
Diego Biurrun [Tue, 26 Sep 2017 14:57:17 +0000 (16:57 +0200)]
build: Drop redundant check for soundcard.h

It should be sys/soundcard.h nowadays.

14 months agobuild: Remove check for gsm/gsm.h for libgsm
Diego Biurrun [Tue, 26 Sep 2017 10:13:07 +0000 (12:13 +0200)]
build: Remove check for gsm/gsm.h for libgsm

libgsm never installed more than a single header, the headers installed into
the gsm/ subdirectory by some distros are private. Who started this nonsense
is a mystery, but it got cargo-culted around ever since.

14 months agobuild: Drop check for sys/mman.h in favor of mmap() check
Diego Biurrun [Sun, 24 Sep 2017 18:13:40 +0000 (20:13 +0200)]
build: Drop check for sys/mman.h in favor of mmap() check

We already rely on just mmap() in other places.

14 months agoconfigure: Drop redundant header check for d3d11.h
Diego Biurrun [Sun, 24 Sep 2017 17:55:25 +0000 (19:55 +0200)]
configure: Drop redundant header check for d3d11.h

It is detected as a part of the ID3D11VideoDecoder check.

14 months agobuild: Drop explicit check for dlfcn.h
Diego Biurrun [Sun, 24 Sep 2017 17:39:29 +0000 (19:39 +0200)]
build: Drop explicit check for dlfcn.h

It is detected as a part of the libdl check.

14 months agoconfigure: Drop unused or internally-used entries from variable lists
Diego Biurrun [Sun, 24 Sep 2017 17:47:08 +0000 (19:47 +0200)]
configure: Drop unused or internally-used entries from variable lists

The variable lists are for variables whose values end up in output files.

14 months agobuild: Drop support for Tru64 Unix (OSF/1)
Diego Biurrun [Sun, 24 Sep 2017 10:21:17 +0000 (12:21 +0200)]
build: Drop support for Tru64 Unix (OSF/1)

This proprietary Unix flavor dropped from the face of the earth more
than a decade ago. Nothing of value was lost.

14 months agoconfigure: rename hevc_ps to hevcparse
James Almer [Tue, 10 Oct 2017 16:56:46 +0000 (13:56 -0300)]
configure: rename hevc_ps to hevcparse

Build h2645_parse.o with it, as every hevc_ps dependency also needs it.
This is more in line with h264's h264parse module.

Signed-off-by: James Almer <jamrial@gmail.com>
14 months agoextract_extradata: return an error when buffer allocation fails
James Almer [Wed, 13 Sep 2017 20:07:19 +0000 (17:07 -0300)]
extract_extradata: return an error when buffer allocation fails

ret is 0 by default.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 months agocpu: split flag checks per arch in av_cpu_max_align()
James Almer [Thu, 14 Sep 2017 19:51:26 +0000 (16:51 -0300)]
cpu: split flag checks per arch in av_cpu_max_align()

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 months agoconfigure: Use test_pkg_config() for the SDL check
James Almer [Sat, 30 Sep 2017 01:56:09 +0000 (22:56 -0300)]
configure: Use test_pkg_config() for the SDL check

Removes the extra code to preserve global CFLAGS.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 months agoconfigure: Add test_pkg_config()
James Almer [Sat, 30 Sep 2017 01:56:08 +0000 (22:56 -0300)]
configure: Add test_pkg_config()

This helper is split off check_pkg_config(), setting only the pkg CFLAGS
and extralibs. This is useful for checks that do not require or do not
benefit from setting global CFLAGS.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 months agocinepakenc: Move declaration out of for initialisation statement
Mark Thompson [Wed, 27 Sep 2017 00:48:37 +0000 (01:48 +0100)]
cinepakenc: Move declaration out of for initialisation statement

14 months agohapdec: Delete include for nonexistent file
Mark Thompson [Wed, 27 Sep 2017 00:47:24 +0000 (01:47 +0100)]
hapdec: Delete include for nonexistent file

It exists as an alias for string.h in most C libraries, so usually this
line is harmless.

14 months agohevc: Fix aligned array declarations
Mark Thompson [Wed, 27 Sep 2017 00:44:21 +0000 (01:44 +0100)]
hevc: Fix aligned array declarations

14 months agoqsv: Join the derived session to the parent
Luca Barbato [Sun, 24 Sep 2017 13:54:28 +0000 (13:54 +0000)]
qsv: Join the derived session to the parent

Should improve the performance on multiple transcoding from a single
source.

14 months agoqsv: Make sure the session is set with the latest version
Luca Barbato [Mon, 25 Sep 2017 09:57:30 +0000 (09:57 +0000)]
qsv: Make sure the session is set with the latest version

It is needed to have the calls to MFXJoinSession succeed.

14 months agocheckasm: Test more h264 idct variants
Martin Storsjö [Tue, 29 Aug 2017 20:23:12 +0000 (23:23 +0300)]
checkasm: Test more h264 idct variants

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agocbs: Add some read/write tests
Mark Thompson [Tue, 15 Aug 2017 17:14:32 +0000 (18:14 +0100)]
cbs: Add some read/write tests

Use the appropriate metadata filter for each codec - in the absence of any
options to modify the stream, the output bitstream should be identical to
the input (though the output file may differ in padding).

All tests use conformance bitstreams, the MPEG-2 streams are newly added
from the conformance test streams
<http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_13818-4_2004_Conformance_Testing/Video/>

14 months agohttp: Reset compressed header flag when starting to read a request
Jacek Jendrzej [Thu, 20 Jul 2017 11:46:46 +0000 (13:46 +0200)]
http: Reset compressed header flag when starting to read a request

This fixes redirects, where the original redirect response indicated
support for compression, while the actual redirected content didn't.

Signed-off-by: Martin Storsjö <martin@martin.st>
14 months agocbs_h264: Fix writing streams with auxiliary pictures
Mark Thompson [Sat, 23 Sep 2017 15:46:11 +0000 (16:46 +0100)]
cbs_h264: Fix writing streams with auxiliary pictures

Tested with the alphaconformanceG sample.

14 months agosmacker: fix integer overflow with pts_inc
Michael Niedermayer [Sun, 24 Sep 2017 10:58:42 +0000 (12:58 +0200)]
smacker: fix integer overflow with pts_inc

Bug-Id: 1073

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
14 months agosmacker: return meaningful error codes on failure
Sean McGovern [Sun, 24 Sep 2017 10:57:54 +0000 (12:57 +0200)]
smacker: return meaningful error codes on failure

14 months agopixdesc: Add API to map color property names to enum values
Vittorio Giovara [Thu, 21 Sep 2017 11:23:21 +0000 (13:23 +0200)]
pixdesc: Add API to map color property names to enum values

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
14 months agolibavfilter/overlay_qsv: Add QSV overlay vpp filter
Huang, Zhengxu [Fri, 18 Aug 2017 01:40:47 +0000 (09:40 +0800)]
libavfilter/overlay_qsv: Add QSV overlay vpp filter

The filter supports two inputs and (implicitly) scaling the second input
during composition, unlike the software overlay.

The code has been separated into common interface and qsv overlay
implementation. The common part mainly creates the qsv session and
manages the surface which is nearly the same for all qsv filters.
So the qsvvpp.c/qsvvpp.h API can be used by other QSV vpp filters
to reduce code redundancy.

Usage:
 -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
 -i in.h264 -filter_complex
 "overlay_qsv=eof_action=repeat:x=(W-w)/2:y=(H-h)/2"  -b 2M -maxrate 3M
 -c:v h264_qsv -y out.h264

Two inputs should have different sizes otherwise one will be completely
covered or you need to scale the second input as follows:
  -hwaccel qsv -c:v mpeg2_qsv -r 25 -i in.m2v -hwaccel qsv -c:v h264_qsv
  -i in.h264 -filter_complex
  "overlay_qsv=w=720:h=576:x=(W-w)/2:y=(H-h)/2" -b 2M -maxrate 3M -c:v
  h264_qsv -y out.h264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
  Change-Id: I5c381febb0af6e2f9622c54ba00490ab99d48297
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
14 months agolibavfilter/vf_vpp: Add common filters of the qsv vpp
Huang, Zhengxu [Thu, 24 Aug 2017 02:16:28 +0000 (10:16 +0800)]
libavfilter/vf_vpp: Add common filters of the qsv vpp

Add common filters of the qsv vpp features including scale,denosie,
deinterlace,frc,crop and procAmp.

Performance will be significantly reduced in the test if using cascade
mode just like qsv framerate + qsv scale + qsv deinterlace + qsv denoise in
separated way no matter in system or video memmory cases.
And the code is so redundant because so much the same just as session and
surface's creation and management.
So we add a common qsv filter.

Usage:
-hwaccel qsv -c:v h264_qsv -r 25 -i in -vf
vpp_qsv=w=iw/2:h=400:deinterlace=1:framerate=60:detail=50:denoise=50
-b 2M -maxrate 3M -c:v h264_qsv -y out.h264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com>
Change-Id: I130392ce722138c209ab658c5f03f0009b6e8024
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
14 months agoavio: update avio_alloc_context() doxy
James Almer [Fri, 1 Sep 2017 15:32:45 +0000 (12:32 -0300)]
avio: update avio_alloc_context() doxy

It must be freed using avio_context_free() starting with commit
99684f3ae752fc8bfb44a2dd1482f8d7a3d8536d.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agovaapi_mpeg2: Convert to use coded bitstream infrastructure
Mark Thompson [Fri, 23 Jun 2017 23:29:32 +0000 (00:29 +0100)]
vaapi_mpeg2: Convert to use coded bitstream infrastructure

15 months agompeg12: Move finding the best frame rate to common code
Mark Thompson [Tue, 12 Sep 2017 21:11:56 +0000 (22:11 +0100)]
mpeg12: Move finding the best frame rate to common code

Previously in the mpeg2_metadata filter.  Also adds a test.

15 months agocbs_mpeg2: Add support for picture display extension
Mark Thompson [Sat, 9 Sep 2017 22:30:32 +0000 (23:30 +0100)]
cbs_mpeg2: Add support for picture display extension

15 months agocbs_h265: Fix ranges of prediction weight offsets
Mark Thompson [Mon, 28 Aug 2017 16:07:01 +0000 (17:07 +0100)]
cbs_h265: Fix ranges of prediction weight offsets

The bracketing was wrong - '-' binds before '<<'.  This would
previously incorrectly reject the streams in the WP_A and WP_B
conformance tests.

15 months agocbs_h265: Fix reading of unknown parameter set extension data
Mark Thompson [Mon, 28 Aug 2017 16:06:14 +0000 (17:06 +0100)]
cbs_h265: Fix reading of unknown parameter set extension data

15 months agovaapi_h264: Fix CPB/DPB delays
Mark Thompson [Sat, 9 Sep 2017 21:49:14 +0000 (22:49 +0100)]
vaapi_h264: Fix CPB/DPB delays

This should be ticks, not time_scale steps - it was wrong for all
framerates not a multiple of 1/2.

15 months agoRevert "vaapi_h265: Reduce the amount of padding in the stream"
Mark Thompson [Tue, 12 Sep 2017 21:11:52 +0000 (22:11 +0100)]
Revert "vaapi_h265: Reduce the amount of padding in the stream"

This reverts commit a14a12ca137bf1526452b97bedfc9f7b301d4e04.

The CTU size is always 32x32; the surface size is what actually sets
the desired property, and it is already correct.

15 months agoh264_metadata: Fix double-free
Mark Thompson [Sun, 20 Aug 2017 21:46:17 +0000 (22:46 +0100)]
h264_metadata: Fix double-free

Whether the udu string should be freed depends on whether the SEI it
gets added to was created internally by cbs or externally by the bsf.
The current code frees it twice in the former case.

15 months agocbs: Add buffer padding when splitting fragments
Mark Thompson [Tue, 12 Sep 2017 21:11:47 +0000 (22:11 +0100)]
cbs: Add buffer padding when splitting fragments

Remove any trailing zeroes from H.26[45] NAL units at the same time.

15 months agocbs: Always check for bitstream end before reading
Mark Thompson [Tue, 12 Sep 2017 21:11:41 +0000 (22:11 +0100)]
cbs: Always check for bitstream end before reading

15 months agoqsv: Load the hw hevc plugin by default on Linux
Luca Barbato [Wed, 6 Sep 2017 13:07:40 +0000 (13:07 +0000)]
qsv: Load the hw hevc plugin by default on Linux

Only on Windows the software plugin is available.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agoaviocat: Check for output write errors
Martin Storsjö [Sat, 2 Sep 2017 21:02:54 +0000 (00:02 +0300)]
aviocat: Check for output write errors

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoflvdec: Check the avio_seek return value after reading a metadata packet
Martin Storsjö [Sat, 2 Sep 2017 20:20:26 +0000 (23:20 +0300)]
flvdec: Check the avio_seek return value after reading a metadata packet

If the metadata packet is corrupted, flv_read_metabody can accidentally
read past the start of the next packet. If the start of the next packet
had been flushed out of the IO buffer, we would be unable to seek to
the right position (on a nonseekable stream).

Prefer to clearly error out instead of silently trying to read from a
desynced stream which will only be interpreted as garbage.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoRevert "checkasm: Test more h264 idct variants"
Martin Storsjö [Sat, 2 Sep 2017 19:22:59 +0000 (22:22 +0300)]
Revert "checkasm: Test more h264 idct variants"

This reverts commit 547db1eaecd597031165a2bf637acaaacde52788.

This commit wasn't supposed to be pushed (yet) since it hasn't
been reviewed.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoarm: Fix SIGBUS on ARM when compiled with binutils 2.29
Martin Storsjö [Thu, 31 Aug 2017 09:06:44 +0000 (12:06 +0300)]
arm: Fix SIGBUS on ARM when compiled with binutils 2.29

In binutils 2.29, the behavior of the ADR instruction changed so that 1 is
added to the address of a Thumb function (previously nothing was added). This
allows the loaded address to be passed to a BLX instruction and the correct
mode change will occur.

See: https://sourceware.org/bugzilla/show_bug.cgi?id=21458

By using adr with a label that isn't annotated as a thumb function,
we avoid the new behaviour in binutils 2.29 and get the same behaviour
as in prior releases, and as in other assemblers (ms armasm.exe,
clang's built in assembler) - an idea that Janne Grunau came up with.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agocheckasm: Test more h264 idct variants
Martin Storsjö [Tue, 29 Aug 2017 20:23:12 +0000 (23:23 +0300)]
checkasm: Test more h264 idct variants

15 months agoRevert "fate: Skip the checkasm test if CONFIG_STATIC is disabled"
Martin Storsjö [Fri, 25 Aug 2017 06:42:15 +0000 (09:42 +0300)]
Revert "fate: Skip the checkasm test if CONFIG_STATIC is disabled"

When we use dllexport properly for shared libraries on windows,
there's no longer any issue with linking the object files for
e.g. libavcodec statically into checkasm. (It's still not possible
to link the built object files for e.g. libavformat statically to
libavcodec though, since libavformat exepcts to load av_export_*
symbols from a DLL.)

This reverts commit 4e62b57ee03928c12a3119dcaf78ffa1f4d6985f.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoconfigure: Use dllexport/dllimport for data symbols across DLLs with mingw
Martin Storsjö [Thu, 24 Aug 2017 20:27:16 +0000 (23:27 +0300)]
configure: Use dllexport/dllimport for data symbols across DLLs with mingw

This avoids having to use pseudo relocations.

The version script used for exporting functions is skipped as soon
as the set of object files contains symbols marked with dllexport,
therefore we need to use makedef to produce the full list of symbols
to be exported.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agomakedef: Extend the script for use with mingw tools as well
Martin Storsjö [Thu, 24 Aug 2017 20:05:21 +0000 (23:05 +0300)]
makedef: Extend the script for use with mingw tools as well

This is invoked by setting the NM and AR variables to the names of
those specific tools. The ARCH variable also needs to be provided,
to choose the symbol prefix (nm doesn't provide any option that
dumps the architecture easily).

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agomakedef: Fold as much text transformations as possible into the initial dump
Martin Storsjö [Thu, 24 Aug 2017 20:04:38 +0000 (23:04 +0300)]
makedef: Fold as much text transformations as possible into the initial dump

This avoids redoing them for each expression in the list.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agomsvc: Properly specify dllexport for data symbols shared across dll boundaries
Martin Storsjö [Thu, 24 Aug 2017 19:07:04 +0000 (22:07 +0300)]
msvc: Properly specify dllexport for data symbols shared across dll boundaries

We currently only have exported data symbols within libavcodec, but
the concept is easy to extend to other libraries if necessary.
The attribute declaration needs to be in a private header though,
since we can't use CONFIG_SHARED in public installed headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoRemove support for building for mingw32ce (Windows CE)
Martin Storsjö [Wed, 30 Aug 2017 19:04:30 +0000 (22:04 +0300)]
Remove support for building for mingw32ce (Windows CE)

The toolchain for this target is unmaintained since many years.

While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).

So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agolavf: make avio_read_partial() public
wm4 [Thu, 17 Aug 2017 13:01:44 +0000 (15:01 +0200)]
lavf: make avio_read_partial() public

Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agoswscale: Do not expand a macro with 'defined' in it
Derek Buitenhuis [Thu, 24 Aug 2017 20:04:13 +0000 (21:04 +0100)]
swscale: Do not expand a macro with 'defined' in it

Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agoconfigure: Include d3d11va_extralibs in libavutil
Martin Storsjö [Thu, 24 Aug 2017 19:17:16 +0000 (22:17 +0300)]
configure: Include d3d11va_extralibs in libavutil

This fixes shared WinRT/UWP builds with d3d11va enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agoyadif: Account for the buffer alignment while processing the frame edges
Michael Niedermayer [Mon, 21 Aug 2017 07:55:48 +0000 (09:55 +0200)]
yadif: Account for the buffer alignment while processing the frame edges

Avoid out of bound reads.

Bug-Id: 1031
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
15 months agoaarch64: Fix negative movrel offsets for windows
Martin Storsjö [Sun, 9 Jul 2017 20:52:10 +0000 (23:52 +0300)]
aarch64: Fix negative movrel offsets for windows

On windows, the offset for the relocation doesn't get stored in
the relocation itself, but as an unsigned immediate in the opcode.
Therefore, negative offsets has to be handled via a separate sub
instruction, just as on MachO.

Signed-off-by: Martin Storsjö <martin@martin.st>
15 months agopng: Support RGBA64 pixel format
Luca Barbato [Sun, 16 Jul 2017 12:35:40 +0000 (14:35 +0200)]
png: Support RGBA64 pixel format

15 months agopng: Report more details regarding unsupported pixel formats
Luca Barbato [Sun, 16 Jul 2017 11:46:16 +0000 (13:46 +0200)]
png: Report more details regarding unsupported pixel formats

15 months agompeg2enc: Don't mark all streams as component video
Mark Thompson [Sat, 12 Aug 2017 21:16:13 +0000 (22:16 +0100)]
mpeg2enc: Don't mark all streams as component video

Since there is no information about the source format, "unspecified"
is the correct value to write here.

All tests using the MPEG-2 encoder are updated, as this changes the
header on all outputs.

15 months agolavc: Add mpeg2_metadata bitstream filter
Mark Thompson [Tue, 1 Aug 2017 14:35:14 +0000 (15:35 +0100)]
lavc: Add mpeg2_metadata bitstream filter

15 months agolavc: Add coded bitstream read/write support for MPEG-2
Mark Thompson [Thu, 4 May 2017 22:03:03 +0000 (23:03 +0100)]
lavc: Add coded bitstream read/write support for MPEG-2

Also enable MPEG-2 support in the trace_headers filter.

15 months agocbs_h2645: Return error if writing fails
Mark Thompson [Mon, 14 Aug 2017 15:46:32 +0000 (16:46 +0100)]
cbs_h2645: Return error if writing fails

15 months agoh264dec: use a large enough field for reference list modification values
Anton Khirnov [Thu, 17 Aug 2017 10:15:58 +0000 (12:15 +0200)]
h264dec: use a large enough field for reference list modification values

pic_num can be at most 17-bit, so uint8_t is not sufficient.

Found-By: Bradley Sepos <bradley@bradleysepos.com>
CC: libav-stable@libav.org
15 months agoxwddec: support 8bpp grayscale
Piotr Bandurski [Sun, 24 Jun 2012 11:34:02 +0000 (11:34 +0000)]
xwddec: support 8bpp grayscale

(cherry picked from commit b9c94e826e7551027754ecfa60e3e487e0c28fcb)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
15 months agodfa: Disallow odd width/height and add proper bounds check for DDS1 chunks
Diego Biurrun [Fri, 11 Aug 2017 17:15:20 +0000 (19:15 +0200)]
dfa: Disallow odd width/height and add proper bounds check for DDS1 chunks

DDS1 chunks are decoded in 2x2 blocks, odd chunk width or height is not
allowed in that case. Also ensure that the decode buffer is big enough
for all blocks being processed.

Bug-Id: CVE-2017-9992
CC: libav-stable@libav.org
15 months agovaapi_h265: Reduce the amount of padding in the stream
Mark Thompson [Sat, 12 Aug 2017 20:32:29 +0000 (21:32 +0100)]
vaapi_h265: Reduce the amount of padding in the stream

It is not necessary to pad to the CTU size.  The CB size of 8x8 should be
sufficient, but due to constraints in the Intel driver (the one usable
implementation of this) it has to be padded to 16x16 like in H.264.

15 months agovaapi_h265: Add support for AUD NAL units
Mark Thompson [Sun, 23 Jul 2017 22:22:54 +0000 (23:22 +0100)]
vaapi_h265: Add support for AUD NAL units

Matching the H.264 encoder.

15 months agovaapi_h265: Convert to use coded bitstream infrastructure
Mark Thompson [Sun, 14 May 2017 20:36:24 +0000 (21:36 +0100)]
vaapi_h265: Convert to use coded bitstream infrastructure

Also improves the metadata and generally makes the configuration
a bit cleaner.

15 months agovaapi_h264: Add support for SEI recovery points
Mark Thompson [Sun, 7 May 2017 22:02:09 +0000 (23:02 +0100)]
vaapi_h264: Add support for SEI recovery points

Included by default with non-IDR intra frames.

15 months agovaapi_h264: Add support for AUD NAL units
Mark Thompson [Sun, 7 May 2017 21:58:56 +0000 (22:58 +0100)]
vaapi_h264: Add support for AUD NAL units

Adds a new private option to enable them (off by default).

15 months agovaapi_h264: Convert to use coded bitstream infrastructure
Mark Thompson [Sun, 7 May 2017 14:01:42 +0000 (15:01 +0100)]
vaapi_h264: Convert to use coded bitstream infrastructure

15 months agolavc: Add hevc_metadata bitstream filter
Mark Thompson [Sun, 23 Jul 2017 15:23:51 +0000 (16:23 +0100)]
lavc: Add hevc_metadata bitstream filter

This is able to modify some header metadata found in the VPS/SPS/VUI,
and can also add/remove AUDs.

15 months agolavc: Add h264_redundant_pps bitstream filter
Mark Thompson [Thu, 4 May 2017 22:10:19 +0000 (23:10 +0100)]
lavc: Add h264_redundant_pps bitstream filter

This applies a specific fixup to some Bluray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.

A new single global PPS is created, and all of the redundant PPSs
within the stream are removed.

15 months agolavc: Add h264_metadata bitstream filter
Mark Thompson [Thu, 4 May 2017 22:09:02 +0000 (23:09 +0100)]
lavc: Add h264_metadata bitstream filter

This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.

16 months agolavc: Add trace_headers bitstream filter
Mark Thompson [Thu, 4 May 2017 22:06:20 +0000 (23:06 +0100)]
lavc: Add trace_headers bitstream filter

Supports all streams that the coded bitstream infrastructure does
(currently H.264 and H.265).