libav.git
2 years agoconfigure: Simplify some library checks via check_lib()
Diego Biurrun [Thu, 8 Dec 2016 09:33:58 +0000 (10:33 +0100)]
configure: Simplify some library checks via check_lib()

2 years agobuild: Fix dependencies for alsa/jack/sndio support
Diego Biurrun [Thu, 8 Dec 2016 10:49:34 +0000 (11:49 +0100)]
build: Fix dependencies for alsa/jack/sndio support

These components should depend on the availability of the respective
libraries, not just on the availability of the respective headers.

2 years agoconfigure: Drop redundant and partly bogus vaapi/vdpau header checks
Diego Biurrun [Thu, 8 Dec 2016 10:52:32 +0000 (11:52 +0100)]
configure: Drop redundant and partly bogus vaapi/vdpau header checks

These are taken care of more correctly by the library checks.

2 years agovdpau: Do not #include vdpau_x11.h from the main vdpau header
Diego Biurrun [Thu, 8 Dec 2016 18:58:12 +0000 (19:58 +0100)]
vdpau: Do not #include vdpau_x11.h from the main vdpau header

That header should only be included in the special bits that use X11 code.

2 years agodxva2: Adjust multiple inclusion guard names to follow convention
Diego Biurrun [Wed, 7 Dec 2016 19:36:41 +0000 (20:36 +0100)]
dxva2: Adjust multiple inclusion guard names to follow convention

2 years agovf_hwupload_cuda: Add min/max limits for device option
Ruta Gadkari [Thu, 8 Dec 2016 09:34:46 +0000 (15:04 +0530)]
vf_hwupload_cuda: Add min/max limits for device option

2 years agoAPIChanges: Mention where release 12 was cut
Vittorio Giovara [Mon, 5 Dec 2016 22:45:06 +0000 (17:45 -0500)]
APIChanges: Mention where release 12 was cut

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agoavio: Keep track of the amount of data written
Luca Barbato [Tue, 6 Dec 2016 01:56:24 +0000 (02:56 +0100)]
avio: Keep track of the amount of data written

Make avio_size() work with any write AVIOContext.

2 years agolibopusdec: fix out-of-bounds read
Andreas Cadhalpun [Thu, 24 Nov 2016 00:06:35 +0000 (01:06 +0100)]
libopusdec: fix out-of-bounds read

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolibschroedingerdec: fix leaking of framewithpts
Andreas Cadhalpun [Fri, 2 Dec 2016 21:52:44 +0000 (22:52 +0100)]
libschroedingerdec: fix leaking of framewithpts

Also preserve the return value from ff_get_buffer().

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolibschroedingerdec: don't produce empty frames
Andreas Cadhalpun [Sun, 13 Nov 2016 22:24:45 +0000 (23:24 +0100)]
libschroedingerdec: don't produce empty frames

They are not valid and can cause problems/crashes for API users.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoomx: Fix allocation check
Timothy Gu [Mon, 5 Dec 2016 17:29:12 +0000 (09:29 -0800)]
omx: Fix allocation check

Also use av_mallocz_array().

Bug-Id: CID 1396839
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agoqsvdec: Fix memory leak on error
Timothy Gu [Mon, 5 Dec 2016 18:21:11 +0000 (10:21 -0800)]
qsvdec: Fix memory leak on error

Bug-Id: CID 1396851
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agocompat/atomics: add typecasts in atomic_compare_exchange_strong()
Wan-Teh Chang [Sat, 3 Dec 2016 00:56:16 +0000 (16:56 -0800)]
compat/atomics: add typecasts in atomic_compare_exchange_strong()

The Solaris and Windows emulations of atomic_compare_exchange_strong()
need typecasts to avoid compiler warnings, because the functions they
call expect a void* pointer but an intptr_t integer is passed.

Note that the emulations of atomic_compare_exchange_strong() (except
the gcc version) only work for atomic_intptr_t because of the type of
the second argument (|expected|). See
http://en.cppreference.com/w/c/atomic:

_Bool atomic_compare_exchange_strong( volatile A* obj,
                                      C* expected, C desired );

The types of the first argument and second argument are different
(|A| and |C|, respectively). |C| is the non-atomic type corresponding
to |A|. In the emulations of atomic_compare_exchange_strong(), |C| is
intptr_t. This implies |A| can only be sig_intptr_t.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
2 years agoavutil: fix data race in av_get_cpu_flags()
Wan-Teh Chang [Thu, 8 Dec 2016 00:16:02 +0000 (16:16 -0800)]
avutil: fix data race in av_get_cpu_flags()

Make the one-time initialization in av_get_cpu_flags() thread-safe. The
static variables |flags|, |cpuflags_mask|, and |checked| in
libavutil/cpu.c are read and written using normal load and store
operations. These are considered as data races. The fix is to use atomic
load and store operations.

Remove the |checked| variable because the invalid value of -1 for
|flags| can be used to indicate the same condition. Rename |flags| to
|cpu_flags| and move it to file scope.

The fix can be verified by running the libavutil/tests/cpu_init.c test
program under ThreadSanitizer:
    ./configure --toolchain=clang-tsan
    make libavutil/tests/cpu_init
    libavutil/tests/cpu_init

There should be no warnings from ThreadSanitizer.

Co-author: Dmitry Vyukov of Google, who suggested the data race fix.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
2 years agolibkvazaar: Add missing header #includes
Diego Biurrun [Tue, 6 Dec 2016 22:25:58 +0000 (23:25 +0100)]
libkvazaar: Add missing header #includes

This fixes compilation after the next version bump.

2 years agoconfigure: Fail if cuda was enabled and is not available
Diego Biurrun [Wed, 7 Dec 2016 18:43:57 +0000 (19:43 +0100)]
configure: Fail if cuda was enabled and is not available

This is the standard behavior for external libraries.

2 years agobuild: Drop stray golomb dependencies
Diego Biurrun [Wed, 7 Dec 2016 11:48:31 +0000 (12:48 +0100)]
build: Drop stray golomb dependencies

2 years agobuild: Add an internal component for hevc_ps code
Diego Biurrun [Sat, 3 Dec 2016 14:26:40 +0000 (15:26 +0100)]
build: Add an internal component for hevc_ps code

This allows expressing dependencies in a more correct way.

2 years agoAdd missing #includes for standalone spherical-information-related headers
Diego Biurrun [Thu, 8 Dec 2016 18:47:58 +0000 (19:47 +0100)]
Add missing #includes for standalone spherical-information-related headers

2 years agofate: Add spherical and stereo3d mov tests
Vittorio Giovara [Wed, 30 Nov 2016 22:53:38 +0000 (17:53 -0500)]
fate: Add spherical and stereo3d mov tests

2 years agoavprobe: Allow specifying multiple stream entries to be shown
Vittorio Giovara [Thu, 1 Dec 2016 17:38:18 +0000 (12:38 -0500)]
avprobe: Allow specifying multiple stream entries to be shown

2 years agomov: Export spherical information
Vittorio Giovara [Wed, 2 Nov 2016 15:29:15 +0000 (11:29 -0400)]
mov: Export spherical information

This implements Spherical Video V1 and V2, as described in the
spatial-media collection by Google.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolavc: Add spherical packet side data API
Vittorio Giovara [Wed, 2 Nov 2016 15:28:54 +0000 (11:28 -0400)]
lavc: Add spherical packet side data API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolavu: Add AVSphericalMapping type and frame side data
Vittorio Giovara [Mon, 7 Nov 2016 18:09:03 +0000 (13:09 -0500)]
lavu: Add AVSphericalMapping type and frame side data

While no decoder currently exports spherical information, this type
represents a frame property that has to be passed through from container
to frames.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolavu: Add a video section to Doxygen documentation
Vittorio Giovara [Thu, 10 Nov 2016 19:26:18 +0000 (14:26 -0500)]
lavu: Add a video section to Doxygen documentation

Fill it with AVStereo3D and AVDisplayMatrix documentation.
Apply the necessary changes to make verbatim code look good in doxygen.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agobuild: Add missing Makefile entries and ifdefs for QSV hwaccels
Diego Biurrun [Sat, 3 Dec 2016 15:55:21 +0000 (15:55 +0000)]
build: Add missing Makefile entries and ifdefs for QSV hwaccels

2 years agobuild: Ensure that the "all" target appears before all Makefile includes
Diego Biurrun [Wed, 7 Dec 2016 14:27:37 +0000 (15:27 +0100)]
build: Ensure that the "all" target appears before all Makefile includes

Otherwise builds without explicit target result in silent no-ops.

2 years agobuild: Have old H.264/HEVC nvenc encoders select their new counterparts
Diego Biurrun [Sat, 3 Dec 2016 14:36:32 +0000 (15:36 +0100)]
build: Have old H.264/HEVC nvenc encoders select their new counterparts

This makes sense and takes care of missing build dependencies.

2 years agobuild: Move entries related to building TOOLS to a subdirectory Makefile
Diego Biurrun [Mon, 5 Dec 2016 17:38:53 +0000 (18:38 +0100)]
build: Move entries related to building TOOLS to a subdirectory Makefile

2 years agobuild: Warn that reconfiguration is necessary if version.h files changed
Diego Biurrun [Sun, 4 Dec 2016 21:01:50 +0000 (22:01 +0100)]
build: Warn that reconfiguration is necessary if version.h files changed

The library versions are stored in the config.mak file and are used
to derive shared library names.

2 years agoconfigure: add -fPIE instead of -pie to C flags for ThreadSanitizer
Wan-Teh Chang [Fri, 2 Dec 2016 19:27:17 +0000 (11:27 -0800)]
configure: add -fPIE instead of -pie to C flags for ThreadSanitizer

-pie was added to C flags for ThreadSanitizer in commit
19f251a2882a8d0779b432e63bf282e4d9c443bb. Under clang 3.8.0, the -pie
flag causes a compiler warning and a linker error when running configure
--toolchain=clang-tsan. Here is an excerpt from config.log:

clang ... -fsanitize=thread -pie -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.A8SsaoCF.o /tmp/ffconf.JdpujQlD.c
clang: warning: argument unused during compilation: '-pie'
clang -fsanitize=thread -pie -Wl,--as-needed -o /tmp/ffconf.2iYA4bsw /tmp/ffconf.A8SsaoCF.o -lm -lm -lbz2 -lz -pthread
/usr/bin/ld: /tmp/ffconf.A8SsaoCF.o: relocation R_X86_64_PC32 against undefined symbol `atan2f@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)

To be conservative, I changed -pie to -fPIE. But the documentation seems
to imply just -fsanitize=thread is enough:

http://clang.llvm.org/docs/ThreadSanitizer.html
https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2 years agoconfigure: Pass CFLAGS_HEADERS through the right CFLAGS filter
Diego Biurrun [Sun, 4 Dec 2016 10:06:47 +0000 (11:06 +0100)]
configure: Pass CFLAGS_HEADERS through the right CFLAGS filter

The generic parameter names used for CFLAGS in configure must be filtered
for each compiler and replaced by the equivalent flag for that compiler.

2 years agobuild: Separate avisynth and avxsynth support
Diego Biurrun [Mon, 14 Nov 2016 16:22:51 +0000 (17:22 +0100)]
build: Separate avisynth and avxsynth support

This simplifies the code.

2 years agoconfigure: Simplify OMX check
Diego Biurrun [Fri, 2 Dec 2016 11:33:50 +0000 (12:33 +0100)]
configure: Simplify OMX check

2 years agoconfigure: Move COMPONENT_LIST to the bottom of CONFIG_LIST
Diego Biurrun [Mon, 5 Dec 2016 16:09:50 +0000 (17:09 +0100)]
configure: Move COMPONENT_LIST to the bottom of CONFIG_LIST

This ensures that dependencies are resolved correctly. COMPONENT_LIST
can contain parts that depend on previous entries of CONFIG_LIST.

2 years agoconfigure: Simplify and fix avfoundation indev handling
Diego Biurrun [Mon, 28 Nov 2016 07:55:31 +0000 (08:55 +0100)]
configure: Simplify and fix avfoundation indev handling

Handle extralibs in the standard way, add missing pthreads dependency.
Also globally check for -fobj-arc with Objective-C compilers since
that option is useful for other Objective-C code as well.

2 years agobuild: Add EXTRALIBS to TOOLS linker command
Diego Biurrun [Tue, 22 Nov 2016 15:20:31 +0000 (16:20 +0100)]
build: Add EXTRALIBS to TOOLS linker command

EXTRALIBS contains general and platform-specific extra libraries
that should be part of all linker commands.

2 years agoconfigure: Separate package name and version requirements in helper functions
Diego Biurrun [Wed, 16 Nov 2016 17:10:35 +0000 (18:10 +0100)]
configure: Separate package name and version requirements in helper functions

The unadorned package name is needed to derive package-related variable names.

2 years agoconfigure: Simplify MMAL check
Diego Biurrun [Sun, 4 Dec 2016 12:40:13 +0000 (13:40 +0100)]
configure: Simplify MMAL check

2 years agobuild: Add missing audio_frame_queue dependency for libwavpack encoder
Diego Biurrun [Sat, 3 Dec 2016 10:56:37 +0000 (11:56 +0100)]
build: Add missing audio_frame_queue dependency for libwavpack encoder

2 years agobuild: Create a component for MPEG audio header decoding
Diego Biurrun [Sat, 3 Dec 2016 10:25:02 +0000 (11:25 +0100)]
build: Create a component for MPEG audio header decoding

Fixes standalone compilation of the libmp3lame encoder.

2 years agobuild: Add missing hevc_ps dependency for QSV HEVC encoder
Diego Biurrun [Sun, 4 Dec 2016 13:13:19 +0000 (13:13 +0000)]
build: Add missing hevc_ps dependency for QSV HEVC encoder

2 years agomimic: Convert to the new bitstream reader
Alexandra Hájková [Sun, 10 Apr 2016 18:20:10 +0000 (20:20 +0200)]
mimic: Convert to the new bitstream reader

2 years agometasound: Convert to the new bitstream reader
Alexandra Hájková [Sun, 10 Apr 2016 18:16:42 +0000 (20:16 +0200)]
metasound: Convert to the new bitstream reader

2 years agolagarith: Convert to the new bitstream reader
Alexandra Hájková [Sun, 10 Apr 2016 18:05:32 +0000 (20:05 +0200)]
lagarith: Convert to the new bitstream reader

2 years agoindeo: Convert to the new bitstream reader
Alexandra Hájková [Mon, 18 Apr 2016 08:49:08 +0000 (10:49 +0200)]
indeo: Convert to the new bitstream reader

2 years agoimc: Convert to the new bitstream reader
Alexandra Hájková [Sun, 10 Apr 2016 10:24:42 +0000 (12:24 +0200)]
imc: Convert to the new bitstream reader

2 years agowebp: Convert to the new bitstream reader
Alexandra Hájková [Wed, 6 Apr 2016 18:26:48 +0000 (20:26 +0200)]
webp: Convert to the new bitstream reader

2 years agoconfigure: Add misssing qpeldsp dependency to mss2 decoder
Diego Biurrun [Fri, 2 Dec 2016 12:06:02 +0000 (13:06 +0100)]
configure: Add misssing qpeldsp dependency to mss2 decoder

2 years agobuild: Drop support for configuring library name suffixes
Diego Biurrun [Mon, 25 Mar 2013 13:59:50 +0000 (14:59 +0100)]
build: Drop support for configuring library name suffixes

It is of doubtful utility, adds complexity and no known users exist.

2 years agoconfigure: Drop bogus xcb_event variables
Diego Biurrun [Tue, 29 Nov 2016 16:34:15 +0000 (17:34 +0100)]
configure: Drop bogus xcb_event variables

2 years agoRemove Plan 9 support
Diego Biurrun [Tue, 29 Nov 2016 14:09:35 +0000 (15:09 +0100)]
Remove Plan 9 support

Supporting the system was a nice joke for the 9 release, but it has
run its course. Nowadays Plan 9 receives no testing and has no
practical usefulness.

2 years agobuild: Drop support for old versions of libdc1394
Diego Biurrun [Tue, 29 Nov 2016 11:44:23 +0000 (12:44 +0100)]
build: Drop support for old versions of libdc1394

The libdc1394 API transition was finished close to a decade ago.

2 years agobuild: Add separate flags for checkheaders targets
Diego Biurrun [Wed, 9 Mar 2016 14:39:29 +0000 (15:39 +0100)]
build: Add separate flags for checkheaders targets

This allows filtering out some warning noise.

2 years agobuild: Add -Wpedantic and -Wextra to extra warning flags
Diego Biurrun [Mon, 16 Mar 2015 18:21:14 +0000 (19:21 +0100)]
build: Add -Wpedantic and -Wextra to extra warning flags

Also drop -Winline from set of warning flags as it only produces noise.

2 years agompeg4audio: correctly propagate meaningful error values
James Almer [Wed, 30 Nov 2016 14:12:40 +0000 (11:12 -0300)]
mpeg4audio: correctly propagate meaningful error values

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agommaldec: initialize refcount using atomic_init()
Wan-Teh Chang [Wed, 30 Nov 2016 19:52:41 +0000 (11:52 -0800)]
mmaldec: initialize refcount using atomic_init()

This is how we initialize refcount in libavutil/buffer.c.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agoconfigure: Be more helpful when requiring options set
Luca Barbato [Fri, 2 Dec 2016 12:11:43 +0000 (13:11 +0100)]
configure: Be more helpful when requiring options set

Be explicit about which options should be set.

2 years agoexamples: fix a typo in an error message
Aleksandr Slobodeniuk [Fri, 2 Dec 2016 12:21:12 +0000 (15:21 +0300)]
examples: fix a typo in an error message

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolavu: Document the color properties enumeration values origin
Vittorio Giovara [Thu, 1 Dec 2016 20:17:27 +0000 (15:17 -0500)]
lavu: Document the color properties enumeration values origin

2 years agooptions_table: Do not rely on enum size as option bound
Vittorio Giovara [Wed, 30 Nov 2016 22:09:34 +0000 (17:09 -0500)]
options_table: Do not rely on enum size as option bound

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agolavc: Use a stricter check for the color properties values
Vittorio Giovara [Wed, 30 Nov 2016 22:09:33 +0000 (17:09 -0500)]
lavc: Use a stricter check for the color properties values

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2 years agocabac: x86: Give optimizations header a more meaningful name
Diego Biurrun [Wed, 9 Mar 2016 09:27:12 +0000 (10:27 +0100)]
cabac: x86: Give optimizations header a more meaningful name

2 years agoaarch64: vp9itxfm: Skip empty slices in the first pass of idct_idct 16x16 and 32x32
Martin Storsjö [Fri, 18 Nov 2016 10:26:04 +0000 (12:26 +0200)]
aarch64: vp9itxfm: Skip empty slices in the first pass of idct_idct 16x16 and 32x32

This work is sponsored by, and copyright, Google.

Previously all subpartitions except the eob=1 (DC) case ran with
the same runtime:

vp9_inv_dct_dct_16x16_sub16_add_neon:   1373.2
vp9_inv_dct_dct_32x32_sub32_add_neon:   8089.0

By skipping individual 8x16 or 8x32 pixel slices in the first pass,
we reduce the runtime of these functions like this:

vp9_inv_dct_dct_16x16_sub1_add_neon:     235.3
vp9_inv_dct_dct_16x16_sub2_add_neon:    1036.7
vp9_inv_dct_dct_16x16_sub4_add_neon:    1036.7
vp9_inv_dct_dct_16x16_sub8_add_neon:    1036.7
vp9_inv_dct_dct_16x16_sub12_add_neon:   1372.1
vp9_inv_dct_dct_16x16_sub16_add_neon:   1372.1
vp9_inv_dct_dct_32x32_sub1_add_neon:     555.1
vp9_inv_dct_dct_32x32_sub2_add_neon:    5190.2
vp9_inv_dct_dct_32x32_sub4_add_neon:    5180.0
vp9_inv_dct_dct_32x32_sub8_add_neon:    5183.1
vp9_inv_dct_dct_32x32_sub12_add_neon:   6161.5
vp9_inv_dct_dct_32x32_sub16_add_neon:   6155.5
vp9_inv_dct_dct_32x32_sub20_add_neon:   7136.3
vp9_inv_dct_dct_32x32_sub24_add_neon:   7128.4
vp9_inv_dct_dct_32x32_sub28_add_neon:   8098.9
vp9_inv_dct_dct_32x32_sub32_add_neon:   8098.8

I.e. in general a very minor overhead for the full subpartition case due
to the additional cmps, but a significant speedup for the cases when we
only need to process a small part of the actual input data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agoarm: vp9itxfm: Skip empty slices in the first pass of idct_idct 16x16 and 32x32
Martin Storsjö [Fri, 18 Nov 2016 09:37:16 +0000 (11:37 +0200)]
arm: vp9itxfm: Skip empty slices in the first pass of idct_idct 16x16 and 32x32

This work is sponsored by, and copyright, Google.

Previously all subpartitions except the eob=1 (DC) case ran with
the same runtime:

                                     Cortex A7       A8       A9      A53
vp9_inv_dct_dct_16x16_sub16_add_neon:   3188.1   2435.4   2499.0   1969.0
vp9_inv_dct_dct_32x32_sub32_add_neon:  18531.7  16582.3  14207.6  12000.3

By skipping individual 4x16 or 4x32 pixel slices in the first pass,
we reduce the runtime of these functions like this:

vp9_inv_dct_dct_16x16_sub1_add_neon:     274.6    189.5    211.7    235.8
vp9_inv_dct_dct_16x16_sub2_add_neon:    2064.0   1534.8   1719.4   1248.7
vp9_inv_dct_dct_16x16_sub4_add_neon:    2135.0   1477.2   1736.3   1249.5
vp9_inv_dct_dct_16x16_sub8_add_neon:    2446.7   1828.7   1993.6   1494.7
vp9_inv_dct_dct_16x16_sub12_add_neon:   2832.4   2118.3   2266.5   1735.1
vp9_inv_dct_dct_16x16_sub16_add_neon:   3211.7   2475.3   2523.5   1983.1
vp9_inv_dct_dct_32x32_sub1_add_neon:     756.2    456.7    862.0    553.9
vp9_inv_dct_dct_32x32_sub2_add_neon:   10682.2   8190.4   8539.2   6762.5
vp9_inv_dct_dct_32x32_sub4_add_neon:   10813.5   8014.9   8518.3   6762.8
vp9_inv_dct_dct_32x32_sub8_add_neon:   11859.6   9313.0   9347.4   7514.5
vp9_inv_dct_dct_32x32_sub12_add_neon:  12946.6  10752.4  10192.2   8280.2
vp9_inv_dct_dct_32x32_sub16_add_neon:  14074.6  11946.5  11001.4   9008.6
vp9_inv_dct_dct_32x32_sub20_add_neon:  15269.9  13662.7  11816.1   9762.6
vp9_inv_dct_dct_32x32_sub24_add_neon:  16327.9  14940.1  12626.7  10516.0
vp9_inv_dct_dct_32x32_sub28_add_neon:  17462.7  15776.1  13446.2  11264.7
vp9_inv_dct_dct_32x32_sub32_add_neon:  18575.5  17157.0  14249.3  12015.1

I.e. in general a very minor overhead for the full subpartition case due
to the additional loads and cmps, but a significant speedup for the cases
when we only need to process a small part of the actual input data.

In common VP9 content in a few inspected clips, 70-90% of the non-dc-only
16x16 and 32x32 IDCTs only have nonzero coefficients in the upper left
8x8 or 16x16 subpartitions respectively.

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agoarm: vp9itxfm: Only reload the idct coeffs for the iadst_idct combination
Martin Storsjö [Mon, 28 Nov 2016 09:05:18 +0000 (11:05 +0200)]
arm: vp9itxfm: Only reload the idct coeffs for the iadst_idct combination

This avoids reloading them if they haven't been clobbered, if the
first pass also was idct.

This is similar to what was done in the aarch64 version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agovp9dsp: add DC only versions for idct/idct.
Clément Bœsch [Fri, 22 Nov 2013 19:16:09 +0000 (20:16 +0100)]
vp9dsp: add DC only versions for idct/idct.

before:

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m11.125s
user    0m11.059s
sys     0m0.050s

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m10.944s
user    0m10.819s
sys     0m0.064s

after:

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m8.153s
user    0m8.034s
sys     0m0.050s

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m8.038s
user    0m7.980s
sys     0m0.039s

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agohevc: Eliminate pointless variable indirection
Diego Biurrun [Mon, 11 Jan 2016 14:36:12 +0000 (15:36 +0100)]
hevc: Eliminate pointless variable indirection

2 years agohevc: Drop pointless av_unused attribute
Diego Biurrun [Thu, 17 Nov 2016 19:41:33 +0000 (20:41 +0100)]
hevc: Drop pointless av_unused attribute

2 years agometasound: Drop unused tables
Diego Biurrun [Sun, 3 Jan 2016 21:45:19 +0000 (22:45 +0100)]
metasound: Drop unused tables

2 years agoconfigure: Integrate X11 checks into vaapi/vdpau checks
Diego Biurrun [Wed, 23 Nov 2016 11:15:00 +0000 (12:15 +0100)]
configure: Integrate X11 checks into vaapi/vdpau checks

2 years agoconfigure: Do not add newlines in filter()/filter_out() functions
Diego Biurrun [Wed, 9 Nov 2016 23:07:06 +0000 (00:07 +0100)]
configure: Do not add newlines in filter()/filter_out() functions

2 years agoconfigure: Move hardware-accelerated codec deps out of hwaccel section
Diego Biurrun [Wed, 16 Nov 2016 17:38:52 +0000 (18:38 +0100)]
configure: Move hardware-accelerated codec deps out of hwaccel section

2 years agoconfigure: MMAL-related decoders should depend on, not select, mmal
Diego Biurrun [Thu, 10 Nov 2016 10:20:29 +0000 (11:20 +0100)]
configure: MMAL-related decoders should depend on, not select, mmal

2 years agomjpegdec: Check return values of functions that may fail
Diego Biurrun [Wed, 11 May 2016 06:59:17 +0000 (08:59 +0200)]
mjpegdec: Check return values of functions that may fail

2 years agodxva2: Adjust printf length modifiers where appropriate
Diego Biurrun [Thu, 24 Nov 2016 11:46:31 +0000 (12:46 +0100)]
dxva2: Adjust printf length modifiers where appropriate

2 years agoavisynth: Cast to the right type when loading avisynth library functions
Diego Biurrun [Thu, 24 Nov 2016 11:46:30 +0000 (12:46 +0100)]
avisynth: Cast to the right type when loading avisynth library functions

Fixes a number of related warnings.

2 years agolavc: move decoding-related code from utils.c to a new file
Anton Khirnov [Wed, 26 Oct 2016 06:10:19 +0000 (08:10 +0200)]
lavc: move decoding-related code from utils.c to a new file

2 years agolavc: move encoding-related code from utils.c to a new file
Anton Khirnov [Wed, 26 Oct 2016 06:10:19 +0000 (08:10 +0200)]
lavc: move encoding-related code from utils.c to a new file

2 years agoaac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC
James Almer [Fri, 25 Nov 2016 00:10:47 +0000 (21:10 -0300)]
aac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC

Fixes AAC AudioSpecificConfig passthrough.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years agomss2: only use error correction for matching block counts
Andreas Cadhalpun [Thu, 24 Nov 2016 22:57:46 +0000 (23:57 +0100)]
mss2: only use error correction for matching block counts

This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2
with coded_width/coded_height larger than width/height.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2 years agoavconv: Fix the audio next dts computation
Luca Barbato [Mon, 28 Nov 2016 19:52:47 +0000 (20:52 +0100)]
avconv: Fix the audio next dts computation

Use the correct timebase.

CC: libav-stable@libav.org
2 years agoac3enc: Avoid unnecessary macro indirections
Diego Biurrun [Mon, 4 Jan 2016 10:59:38 +0000 (11:59 +0100)]
ac3enc: Avoid unnecessary macro indirections

2 years agoac3enc: Reshuffle functions to avoid forward declarations
Diego Biurrun [Mon, 4 Jan 2016 10:58:21 +0000 (11:58 +0100)]
ac3enc: Reshuffle functions to avoid forward declarations

2 years agoac3enc: Reshuffle some float/fixed-mode ifdefs to avoid a dummy function
Diego Biurrun [Mon, 4 Jan 2016 10:50:22 +0000 (11:50 +0100)]
ac3enc: Reshuffle some float/fixed-mode ifdefs to avoid a dummy function

2 years agohwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool
Mark Thompson [Fri, 25 Nov 2016 12:36:05 +0000 (12:36 +0000)]
hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool

2 years agotta: avoid undefined shifts
Anton Khirnov [Wed, 23 Nov 2016 12:02:53 +0000 (13:02 +0100)]
tta: avoid undefined shifts

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2 years agotta: use get_unary() instead of a custom implementation
Anton Khirnov [Wed, 23 Nov 2016 12:02:52 +0000 (13:02 +0100)]
tta: use get_unary() instead of a custom implementation

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2 years agobuild: Drop gcrypt support
Diego Biurrun [Wed, 23 Nov 2016 15:42:00 +0000 (16:42 +0100)]
build: Drop gcrypt support

GnuTLS in combination with gcrypt has been deprecated since 2010.

2 years agoconfigure: Use correct libm linker flag during math function checks
Diego Biurrun [Wed, 23 Nov 2016 08:27:28 +0000 (09:27 +0100)]
configure: Use correct libm linker flag during math function checks

2 years agoconfigure: Add missing asyncts filter, movie filter, and output example deps
Diego Biurrun [Tue, 22 Nov 2016 15:51:04 +0000 (16:51 +0100)]
configure: Add missing asyncts filter, movie filter, and output example deps

Also add a missing avcodec.h #include in the movie filter.

2 years agoconfigure: Use correct variable name in libsnappy test
Diego Biurrun [Wed, 23 Nov 2016 07:54:01 +0000 (08:54 +0100)]
configure: Use correct variable name in libsnappy test

2 years agoconfigure: Remove old avisynth support leftover
Diego Biurrun [Tue, 22 Nov 2016 07:11:59 +0000 (08:11 +0100)]
configure: Remove old avisynth support leftover

2 years agoarm: warn/error on movrelx usage problematic with PIC on ELF
Janne Grunau [Fri, 18 Nov 2016 20:06:40 +0000 (21:06 +0100)]
arm: warn/error on movrelx usage problematic with PIC on ELF

The warning has false positives but our asm does not trigger it. For
new code false positives can only be avoided by changing the register
allocation.

2 years agoconfigure: Disable warning C4703 with MSVC
Diego Biurrun [Tue, 22 Nov 2016 07:18:38 +0000 (08:18 +0100)]
configure: Disable warning C4703 with MSVC

This disables warnings about potentially uninitialized local pointer
variables.  Disabling the warning is in line with what we do for gcc.

2 years agow32pthreads: Fix function pointer casts
Diego Biurrun [Tue, 22 Nov 2016 07:46:07 +0000 (08:46 +0100)]
w32pthreads: Fix function pointer casts

This eliminates a handful of warnings at every inclusion of the header.

2 years agoqt-faststart: Do not try to use fancy 64-bit seeking functions on mingw32ce
Martin Storsjö [Thu, 13 Sep 2012 09:55:32 +0000 (12:55 +0300)]
qt-faststart: Do not try to use fancy 64-bit seeking functions on mingw32ce

These functions are not available on mingw32ce.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2 years agortmpdh: Do global initialization before running the test
Martin Storsjö [Wed, 23 Nov 2016 21:27:26 +0000 (23:27 +0200)]
rtmpdh: Do global initialization before running the test

The rtmpdh code can use crypto libraries which may require
a process global init. (gcrypt is one of the libraries
where the rtmpdh test code can fail if global init hasn't been
done, depending on gcrypt version.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agoaarch64: vp9itxfm: Don't repeatedly set x9 when nothing overwrites it
Martin Storsjö [Tue, 22 Nov 2016 13:47:17 +0000 (15:47 +0200)]
aarch64: vp9itxfm: Don't repeatedly set x9 when nothing overwrites it

Signed-off-by: Martin Storsjö <martin@martin.st>