Commit Graph

44577 Commits

Author SHA1 Message Date
Diego Biurrun
307eb1a8ee x86: vp8dsp: port FILTER_BILINEAR macro to cpuflags 2017-03-14 17:23:32 +01:00
Diego Biurrun
994c4bc107 x86util: Port all macros to cpuflags
Also do some small cosmetic changes: Drop pointless _MMX suffix from ABSD2
macro name, drop pointless check for MMX support, we always assume MMX is
available in our SIMD code, fix spelling.
2017-03-14 17:23:32 +01:00
Anton Khirnov
522d850e68 h264_cavlc: check the value of run_before
Section 9.2.3.2 of the spec implies that run_before must not be larger
than zeros_left.

Fixes invalid reads with corrupted files.

CC: libav-stable@libav.org
Bug-Id: 1000
Found-By: Kamil Frankowicz
2017-03-12 20:42:13 +01:00
Anton Khirnov
83b2b34d06 h2645_parse: use the bytestream2 API for packet splitting
The code does some nontrivial jumping around in the buffer, so it is
safer to use a checked API rather than do everything manually.

Fixes a bug in nalff parsing, where the length field is currently not
counted in the buffer size check, resulting in possible overreads with
invalid files.

CC: libav-stable@libav.org
Bug-Id: 1002
Found-By: Kamil Frankowicz
2017-03-12 20:42:12 +01:00
Anton Khirnov
b76f6a76c6 h264dec: initialize field_started to 0 on each decode call
It might be incorrectly set to 1 if the previous call exited with an
error.

Bug-Id: 1019
CC: libav-stable@libav.org
2017-03-12 20:42:12 +01:00
Martin Storsjö
3a0d5e206d arm/aarch64: vp9itxfm: Skip loading the min_eob pointer when it won't be used
In the half/quarter cases where we don't use the min_eob array, defer
loading the pointer until we know it will be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 22:07:30 +02:00
Martin Storsjö
98ee855ae0 arm: vp9itxfm: Template the quarter/half idct32 function
This reduces the number of lines and reduces the duplication.

Also simplify the eob check for the half case.

If we are in the half case, we know we at least will need to do the
first three slices, we only need to check eob for the fourth one,
so we can hardcode the value to check against instead of loading
from the min_eob array.

Since at most one slice can be skipped in the first pass, we can
unroll the loop for filling zeros completely, as it was done for
the quarter case before.

This allows skipping loading the min_eob pointer when using the
quarter/half cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-11 22:07:12 +02:00
Diego Biurrun
b57a95d014 cfhd: Add FATE tests 2017-03-09 18:37:29 +01:00
Kieran Kunhya
5f794aa165 Add Cineform HD Decoder
Decodes YUV 4:2:2 10-bit and RGB 12-bit files.
Older files with more subbands, skips, Bayer, alpha not supported.

Further fixes and refactorings by Anton Khirnov <anton@khirnov.net>,
Diego Biurrun <diego@biurrun.de>, Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-03-09 18:37:29 +01:00
Konda Raju
f6790b5e10 add initial QP value options
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-03-09 17:24:00 +01:00
wm4
8a60bba0ae avcodec: clarify some decoding/encoding API details
Make it clear that there is no timing-dependent behavior. In particular,
there is no state in which both input and output are denied, and where
you have to wait for a while yourself to make progress (apparently some
hardware decoders like to do this).

Avoid wording that makes references to time. It shouldn't be mistaken
for some kind of asynchronous API (like POSIX read() can return EAGAIN
if there is no new input yet). It's a state machine, so try to use
appropriate terms.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-03-09 17:07:24 +01:00
Vittorio Giovara
0429f01e47 mkv: Export bounds and padding from spherical metadata
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-07 11:07:03 -05:00
James Almer
251849f06c mkv: Add support for Spherical Video elements
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-07 11:07:03 -05:00
Vittorio Giovara
a825980f9f mov: Export bounds and padding from spherical metadata
Update the fate test as needed.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-07 11:07:02 -05:00
Vittorio Giovara
6bce6aa17d spherical: Add tiled equirectangular type and projection-specific properties
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-07 11:07:02 -05:00
Vittorio Giovara
114324b9e0 mov: Validate cubemap layout 2017-03-07 11:07:02 -05:00
Vittorio Giovara
0f8512c4a8 mov: Validate spherical metadata version 2017-03-07 11:07:02 -05:00
Vittorio Giovara
2365772300 mov: Ignore old spherical metadata when newer version is present 2017-03-07 11:07:02 -05:00
Aaron Colwell
17adcc40ad mov: Fix spherical metadata_source parsing
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-07 11:07:01 -05:00
Luca Barbato
81bffae368 configure: Check for -no_weak_imports in ldflags on macOS
Recent versions of macOS provide more POSIX API (in particular,
clock_gettime) than previous versions and recent Apple toolchains
provide all that API, even when targeting older releases without
said API. Disallow linking to functions which might not be available
at runtime.

To actually have an effect, either add
--extra-cflags="-mmacosx-version-min=10.11" (or any other version
prior to 10.12) or set MACOSX_DEPLOYMENT_TARGET=10.11 when running
configure.

As a workaround for libav versions without this fix, one can
also add --extra-cflags="-mmacosx-version-min=10.11
-Werror=partial-availability" while running configure.

The -no_weak_imports flag is new in Xcode 8; in Xcode 7 it is not
supported. This is not an issue since Xcode 7 only ships with the
10.11 macOS SDK, which lacks clock_gettime.

Bug-Id: 1033

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-03-07 09:48:55 +02:00
Diego Biurrun
57b753b445 build: Prefer NASM assembler over YASM
NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.
2017-03-07 08:32:37 +01:00
Diego Biurrun
f54037da8a build: Make x86 assembler commandline-selectable 2017-03-07 08:32:37 +01:00
Diego Biurrun
51411eb7ff build: Special-case handling of SDL CFLAGS
SDL adds some "special" CFLAGS that interfere with building normal
binaries. Capture those CFLAGS separately and avoid adding them to
the general CFLAGS.
2017-03-07 08:32:37 +01:00
Diego Biurrun
003124ebf4 build: Fix logic of clock_gettime() check
We should only check for clock_gettime() if _POSIX_MONOTONIC_CLOCK is
available and do a full link check for clock_gettime() in all cases.
2017-03-07 08:32:37 +01:00
Vittorio Giovara
b44bd7ee7f pixlet: Fix architecture-dependent code and values
The constants used in the decoder used floating point precision,
and this caused different values to be generated on different
architectures. Additionally on big endian machines, the fate test
would output bytes in native order, which is different from the one
hardcoded in the test.

So, eradicate floating point numbers and use fixed point (32.32)
arithmetics everywhere, replacing constants with precomputed integer
values, and force the pixel format output to be the same in the fate
test.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-06 18:15:02 -05:00
Diego Biurrun
808ef43597 build: Explicitly set 32-bit/64-bit object formats for nasm/yasm
Consistently use object format names with "32" suffix and set object format
to "win64" on Windows x86_64, which fixes assembling with nasm.
2017-03-05 14:38:56 +01:00
Diego Biurrun
6eef263aca x86: Merge align directives into SECTION_RODATA declarations where possible 2017-03-05 14:26:06 +01:00
Ganapathy Kasi
3303f86467 nvenc: Remove qmin and qmax constraints for nvenc vbr
qmin and qmax are not necessary for nvenc vbr.

Also fix for using 2 pass vbr mode for slow preset through ctx->flag NVENC_TWO_PASSES.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-03-04 08:23:28 +01:00
Paul B Mahol
aba5b94859 Add Apple Pixlet decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-01 11:52:29 -05:00
James Almer
19d57ca62e libavutil: add av_mod_uintp2
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-01 11:23:19 -05:00
Ganesh Ajjanagadde
7bfda7d157 intmath: add faster clz support 2017-03-01 11:23:19 -05:00
Diego Biurrun
5ff3b5cafc build: Add pthreads to list of avutil extralibs
libavutil uses pthreads in the buffer code (abstracted through a header).
2017-03-01 12:02:11 +01:00
Diego Biurrun
db869f4ea4 fate: Add build-only targets to FATE 2017-03-01 11:06:52 +01:00
Diego Biurrun
3c0efbd033 build: Allow generating dependencies as a side-effect of assembling 2017-03-01 10:18:15 +01:00
Diego Biurrun
39e208f4d4 build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.
2017-03-01 10:18:15 +01:00
Diego Biurrun
d1d6230ea3 build: Add "build" shorthand target that depends on all compile targets 2017-03-01 10:13:26 +01:00
Diego Biurrun
4d1f7e8bc7 build: Skip generating .version files when cleaning 2017-03-01 09:42:39 +01:00
Diego Biurrun
58407b4d74 configure: Fix typo in objcc default setting
Also drop stray duplicate OBJCC config.mak entry.
2017-03-01 09:23:42 +01:00
Diego Biurrun
fde7ee8710 x86: hevc: Add missing colons after assembly labels
This fixes several warnings of the sort
warning: label alone on a line without a colon might be in error
2017-03-01 09:23:42 +01:00
Diego Biurrun
7cb1d9e2db build: Fine-grained link-time dependency settings
Previously, all link-time dependencies were added for all libraries,
resulting in bogus link-time dependencies since not all dependencies
are shared across libraries. Also, in some cases like libavutil, not
all dependencies were taken into account, resulting in some cases of
underlinking.

To address all this mess a machinery is added for tracking which
dependency belongs to which library component and then leveraged
to determine correct dependencies for all individual libraries.
2017-03-01 09:00:40 +01:00
Diego Biurrun
d154bdd3d0 configure: Simplify dlopen check 2017-03-01 09:00:40 +01:00
Michael Niedermayer
d7b2bb5391 h264_sei: Check actual presence of picture timing SEI message
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-02-28 10:32:50 -05:00
Diego Biurrun
21cca00dfe build: Explicitly disable external libraries when not explicitly enabled
Leaving those variables in an undefined state allows them getting implicitly
enabled when they are declared as weak dependencies of other components.
In that case, the library check is not run and required linker flags are not
added, resulting in a failing build.

Fixes linking when enabling libfreetype without libfontconfig.
2017-02-28 13:00:20 +01:00
Diego Biurrun
e1a6d63c7e fate: Rename WMV8_DRM decoder tests to WMV3_DRM
The codec used in those files is WMV3/WMV9, not WMV2/WMV8.
2017-02-28 13:00:20 +01:00
Luca Barbato
79331df362 rtsp: Lazily set up the pollfd array once 2017-02-28 12:54:04 +01:00
Ben Chang
d8f36a6aa3 nvenc: Fix the preset mapping list
The map is a sparse array and does not need a empty element to terminate
it.

The empty element is stored after the last one inserted in the list,
overwriting whichever element was next with zeros.

Bug-Id: 1029

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-02-28 11:54:02 +01:00
Diego Biurrun
698ac8f9ca fate: Make null comparison method more useful
This allows dropping /dev/null as reference value when no output is generated.
2017-02-27 13:57:35 +01:00
Diego Biurrun
c483398bb7 build: Drop DOC_ prefix from EXAMPLES-related variables 2017-02-27 13:57:35 +01:00
Luca Barbato
5263f464db rtsp: Lazily allocate the pollfd array
And use av_malloc_array.
2017-02-27 13:51:53 +01:00
Luca Barbato
b9b82151a1 rtsp: Move the pollfd setup out of the for loop 2017-02-27 13:51:53 +01:00