1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-14 02:53:37 +02:00
Commit Graph

5259 Commits

Author SHA1 Message Date
Paul B Mahol
f7d749e95b avcodec: add MatchWare Screen Capture Codec 2018-08-27 22:06:19 +02:00
Avi Halachmi (:avih)
45499e557c configure: speed up check_deps()
x4 - x25 faster.

check_deps() recursively enables/disables components, and its loop is
iterated nearly 6000 times. It's particularly slow in bash - currently
consuming more than 50% of configure runtime, and about 20% with other
shells.

This commit applies few local optimizations, most effective first:
- Use $1 $2 ... instead of pushvar/popvar, and same at enable_deep*
- Abort early in one notable case - empty deps, to avoid costly no-op.
- Smaller changes which do add up:
  - Handle ${cfg}_checking locally instead of via enable[d]/disable
  - ${cfg}_checking: test done before inprogress - x2 faster in 50%+
  - one eval instead of several at the empty-deps early abort path.

- The "actual work" part is unmodified - just its surroundings.

Biggest speedups (relative and absolute) are observed with bash.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:10 -03:00
Avi Halachmi (:avih)
923586a58f configure: speed up print_enabled_components()
x4 - x10 faster.

Inside print_enabled components, the filter_list case invokes sed
about 350 times to parse the same source file and extract different
info for each arg. This is never instant, and on systems where fork is
slow (notably MSYS2/Cygwin on windows) it takes many seconds.

Change it to use sed once on the source file and set env vars with the
parse results, then use these results inside the loop.

Additionally, the cases of indev_list and outdev_list are very
infrequent, but nevertheless they're faster, and arguably cleaner, with
shell parameter substitutions than with command substitutions.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:10 -03:00
Avi Halachmi (:avih)
58b81ac621 configure: speed up flatten_extralibs_wrapper()
x50 - x200 faster.

Currently configure spends 50-70% of its runtime inside a single
function: flatten_extralibs[_wrapper] - which does string processing.

During its run, nearly 20K command substitutions (subshells) are used,
including its callees unique() and resolve(), which is the reason
for its lengthy run.

This commit avoids all subshells during its execution, speeding it up
by about two orders of magnitude, and reducing the overall configure
runtime by 50-70% .

resolve() is rewritten to avoid subshells, and in unique() and
flatten_extralibs() we "inline" the filter[_out] functionality.

Note that logically, "unique" functionality has more than one possible
output (depending on which of the recurring items is kept). As it
turns out, other parts expect the last recurring item to be kept
(which was the original behavior of uniqie()). This patch preservs
its output order.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:09 -03:00
Michael Niedermayer
4251a44e7d configure: do not add fsanitize cflags with ossfuzz if coverage is tested
Found-by: Max Moroz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-23 16:00:26 +02:00
James Almer
728760de35 Revert "avcodec/libaomdec: auto insert dump_extra bitstream filter"
This reverts commit e45ed15594.

The Matroska spec was updated to not remove Sequence Header OBUs from key
frames, so this is no longer needed.
2018-08-17 15:17:59 -03:00
Danil Iashchenko
5423fe29da lavfi: add erosion_opencl, dilation_opencl filters
Add erosion_opencl, dilation_opencl filters. Behave like existing erosion and dilation filters.
2018-08-12 21:52:06 +01:00
Kyle Swanson
87cc7e8d4e lavfi/vf_libvmaf: update to use libvmaf v1.3.9
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2018-08-10 12:00:12 -07:00
James Almer
e45ed15594 avcodec/libaomdec: auto insert dump_extra bitstream filter
Some containers, like Matroska, may propagate key frames with no Sequence
Header OBU since it's provided in extradata instead.
With this change, the Sequence Header will be appended to the packet data
before calling aom_codec_decode().

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-02 12:41:05 -03:00
James Almer
269daf5985 configure: add missing aandcttables dependency to asv1 and asv2 encoders
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-29 21:30:00 -03:00
James Almer
c38b9c2bf7 configure: add missing aandcttables dependency to mpegvideoenc
Also remove the superfluous aandcttables dependency from all the modules
that only need it because of mpegvideoenc

Fixes ticket #7333

Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-29 21:29:13 -03:00
hwren
5985a1bf72 lavc, doc, configure: add avs2 video decoder wrapper
Tested-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-07-27 20:07:56 +08:00
Carl Eugen Hoyos
d01d46ad86 configure: Force pie for Android.
Position-independent executables are required since Lollipop.

Reported-by: Mohammed Bey Ahmed Khernache
2018-07-25 20:43:02 +02:00
James Almer
3735d55af3 avcodec/parser: move parsers list and related API to its own file
And add it to the CONFIGURABLE_COMPONENTS list in Makefile. This way, changes
to the new file will be tracked and the usual warning to suggest re-running
configure will be shown.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-21 16:08:29 -03:00
James Almer
a754af942a avcodec/libaomenc: export Sequence Header and Metadata OBUs as extradata
aom_codec_get_global_headers() is not implemented as of libaom 1.0.0 for AV1, so
we're forced to extract the relevant header OBUs from the first packet and propagate
them as packet side data.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:25 -03:00
Stephen Seo
0ea20124b7 Add lensfun filter
Lensfun is a library that applies lens correction to an image using a
database of cameras/lenses (you provide the camera and lens models, and
it uses the corresponding database entry's parameters to apply lens
correction). It is licensed under LGPL3.

The lensfun filter utilizes the lensfun library to apply lens
correction to videos as well as images.

This filter was created out of necessity since I wanted to apply lens
correction to a video and the lenscorrection filter did not work for me.

While this filter requires little info from the user to apply lens
correction, the flaw is that lensfun is intended to be used on indvidual
images. When used on a video, the parameters such as focal length is
constant, so lens correction may fail on videos where the camera's focal
length changes (zooming in or out via zoom lens). To use this filter
correctly on videos where such parameters change, timeline editing may
be used since this filter supports it.

Note that valgrind shows a small memory leak which is not from this
filter but from the lensfun library (memory is allocated when loading
the lensfun database but it somehow isn't deallocated even during
cleanup; it is briefly created in the init function of the filter, and
destroyed before the init function returns). This may have been fixed by
the latest commit in the lensfun repository; the current latest release
of lensfun is almost 3 years ago.

Bi-Linear interpolation is used by default as lanczos interpolation
shows more artifacts in the corrected image in my tests.

The lanczos interpolation is derived from lenstool's implementation of
lanczos interpolation. Lenstool is an app within the lensfun repository
which is licensed under GPL3.

v2 of this patch fixes license notice in libavfilter/vf_lensfun.c

v3 of this patch fixes code style and dependency to gplv3 (thanks to
Paul B Mahol for pointing out the mentioned issues).

v4 of this patch fixes more code style issues that were missed in
v3.

v5 of this patch adds line breaks to some of the documentation in
doc/filters.texi (thanks to Gyan Doshi for pointing out the issue).

v6 of this patch fixes more problems (thanks to Moritz Barsnick for
pointing them out).

v7 of this patch fixes use of sqrt() (changed to sqrtf(); thanks to
Moritz Barsnick for pointing this out). Also should be rebased off of
latest master branch commits at this point.

Signed-off-by: Stephen Seo <seo.disparate@gmail.com>
2018-07-15 10:07:54 +02:00
Carl Eugen Hoyos
a2317556ef configure: toolchain-tsan does not need -fPIE.
Fixes compilation with some kernel-gcc combinations:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67308

Reported and analyzed by Gonzalo Garramuño.
2018-07-06 00:41:59 +02:00
Rostislav Pehlivanov
755e618399 lavc: implement an ATRAC9 decoder
This commit implements a full ATRAC9 decoder, a simple low-delay codec
developed by Sony and used in most PSVita games, some PS3 games and some
PS4 games. Its similar to AAC in that it uses Huffman coded scalefactors
but instead of vector quantization it just Huffman codes the spectral
coefficients (in a way similar to how Opus splits band energy coding
into coarse and fine precision). It opts to write rather large Huffman
codes by packing several small coefficients into one Huffman coded
symbol, though I don't believe this increases efficiency at all.
Band extension implements SBC in a simple way, first it mirrors the
lower spectrum onto the higher frequencies and then it uses one of 5
filters to shape it. Noise substitution is implemented via 2 of them.
Unlike previous ATRAC codecs, there's no QMF, this is a standard MDCT
codec.

Based off of the reverse engineering work of Alex Barney.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-07-03 20:15:01 +01:00
James Almer
3c4af577aa configure: add missing swscale to avfilter when sr filter is enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-02 22:18:47 -03:00
Danil Iashchenko
581bafa83b lavfi: add sobel, prewitt, roberts filters
Add opencl version of sobel, prewitt, roberts filters.
2018-07-03 00:11:28 +01:00
Sergey Lavrushkin
575b718990 Adds ESPCN super resolution filter merged with SRCNN filter.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-07-02 10:47:14 -03:00
John Cox
52fd2afce8 configure: fix inline asm checks
Commit 8c893aa3cd removed quotes that were required to detect
inline asm:

check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }

The correct code is:

void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }

Commit message written by Frank Liberato <liberato@chromium.org>

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-06-29 13:43:28 +03:00
Jun Zhao
2730a0fdf4 configure: fix check for opencl_vaapi_intel_media.
opencl_vaapi_intel_media doesn't depend on libmfx, OpenCL™ Drivers
and Runtimes for Intel® Architectureis is a standalone release, more
information can be found in the link:
https://software.intel.com/en-us/articles/opencl-drivers.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-29 05:17:36 +08:00
James Almer
a0ac49e38e configure: bump minimum required version of libaom
Version 1.0.0 is the first release after the bitstream freeze.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-06-25 16:04:32 -03:00
Ruiling Song
8b8b0e2cd2 lavfi: add opencl tonemap filter
This filter does HDR(HDR10/HLG) to SDR conversion with tone-mapping.

An example command to use this filter with vaapi codecs:
FFMPEG -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \
opencl=ocl@va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \
vaapi -i INPUT -filter_hw_device ocl -filter_complex \
'[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \
[x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 OUTPUT

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:18 +01:00
Danil Iashchenko
714da1fd89 lavfi: Add boxblur_opencl filter
Behaves like existing boxblur filter.
2018-06-21 00:31:42 +01:00
Timo Rothenpieler
6129b13dad configure: simplify ffnvcodec version logic 2018-06-15 11:18:47 +02:00
Carl Eugen Hoyos
9461e7d3a5 configure: The eac3_core bitstream filter needs the ac3 parser.
Fixes linking with "--disable-everything --enable-bsf=eac3_core".
2018-06-13 12:01:04 +02:00
Jun Zhao
3769aafb7c configure: fix check for opencl
add pkg-config support for opencl check.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-07 19:38:58 +08:00
John Cox
ad94f1c8ab configure: fix arm inline asm checks
Commit 8c893aa3cd removed quotes that were required to detect
inline asm in clang:

check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }

The correct code is:

void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }

Commit message written by Frank Liberato <liberato@chromium.org>

Signed-off-by: James Almer <jamrial@gmail.com>
2018-06-06 10:38:01 -03:00
Sergey Lavrushkin
d8c0bbb0aa Adds TensorFlow backend for dnn inference module.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-05 10:16:50 -03:00
Sven Dueking
a507af97ee avformat/libsrt: add latency options and deprecate tspbdelay
Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-06-04 18:47:48 +02:00
Michael Niedermayer
1386a199f9 configure: Omit fsanitize flags if they are already specified by the user
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-27 21:38:33 +02:00
Reino Wijnsma
0263c52f4d configure: fix check for mbedtls
Add missing libraries needed when linking with a static build of MbedTLS.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-27 16:18:18 -03:00
Thomas Volkert
c24d247e2c libavformat: add mbedTLS based TLS
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-21 19:43:04 -03:00
Rostislav Pehlivanov
ce943dd6ac configure: error out on unsupported MSVC versions
The FATE tests for MSVC versions older than 2013 are untested in FATE
and apparently are no longer supported.

This commit makes the configure process error out in case an older version
is used, and suggests to use a supported version of MSVC to compile.

This also changes the documentation to reflect this.

As discussed on IRC:

2018-05-12 19:45:16     jamrial then again, most of those were for old msvc, and i think we're not supporting versions older than 2013 (first one c99 compliant) anymore
2018-05-12 19:45:43     +JEEB   yea, I think 2013 update 2 is needed

22:53 <@atomnuker> nevcairiel: which commit broke/unsupported support for msvc 2013?
23:23 <@atomnuker> okay, it was JEEB
23:25 <+JEEB> which was for 2012 and older
23:25 <+JEEB> and IIRC we no longer test those in FATE so that was my assumption
23:26 <+JEEB> 2013 is when MS got trolled enough to actually update their C part
23:26 <+JEEB> aand actually advertised FFmpeg support
23:26 <+JEEB> (although it was semi-failing until VS2013 update 1 or 2)

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-05-18 02:22:57 +01:00
Carl Eugen Hoyos
20b8807622 configure: Mention the dash demuxer in the libxml2 help text. 2018-05-14 21:00:26 +02:00
Reino Wijnsma
1548d2a5a5 configure: add pkg-config check for libmysofa
This does require libmysofa with today's latest commit (08f243d1ec).
They already had a pkg-config file, but the dependencies weren't setup right. Until now.
2018-05-14 17:26:23 +02:00
Niklas Haas
32234e03a7 configure: fix configure check for lilv-0
This should be included as `<lilv/lilv.h>`, same as is done in af_lv2.c.
Forcing the extra lilv-0 breaks platforms where the include dir is
`/usr/include/lilv/lilv.h` rather than
`/usr/include/lilv-0/lilv/lilv.h`.

The new include path works for both, because the `pkg-config --cflags`
includes `-I/usr/include/lilv-0`.
2018-05-13 18:55:43 +03:00
Paul B Mahol
974eb4aaaa avfilter: add fftdnoiz filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-10 14:44:17 +02:00
Timo Rothenpieler
c855683427 avutil/hwcontext_cuda: add CUstream in cuda hwctx 2018-05-10 00:34:22 +02:00
Hendrik Leppkes
8007a86363 lavfi/vf_srcnn: use avio_check instead of access
The filter uses avio for file access already, and avio_check is
portable.

Fixes trac #7192.
2018-05-08 17:52:33 +02:00
James Almer
0736f32a4f configure: fix and simplify xlib check
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-06 20:46:32 -03:00
James Almer
652b857b94 configure: add missing dependencies to vf_srcnn
The access dependecy is temporary and should fix compilation with
msvc until a proper fix is committed.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-06 17:23:29 -03:00
Jan Ekström
8d1263fa19 configure: add pkg-config check for zlib
It exists, so why not use it? Helps one get rid of additional
search path related flags in addition to PKG_CONFIG_{PATH,LIBDIR}
when utilizing a cross-prefix separate from the sysroot.
2018-05-06 20:47:42 +03:00
wm4
7074a7ccd9 avformat: add vapoursynth wrapper
This can "demux" .vpy files. Autodetection of .vpy scripts is
intentionally not done, because it would be a major security issue. You
need to force the format, for example with "-f vapoursynth" for the
FFmpeg CLI tools.

Some minor code copied from other LGPL parts of FFmpeg.

I did not find a good way to test a few of the more obscure VS features,
like VFR nodes, compat pixel formats, or nodes with dynamic size/format
changes. These can be easily implemented on demand.
2018-05-04 17:56:35 +02:00
Mark Thompson
308b989e0c lavc: Add VP9 metadata bitstream filter
Can adjust the colour information.
2018-05-02 01:21:40 +01:00
Mark Thompson
b5df289eb7 lavc: Add coded bitstream read/write support for VP9 2018-05-02 01:21:33 +01:00
James Almer
cae6f806a6 configure: add missing pthreads dependency to v4l2_m2m
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-29 15:04:10 -03:00
Paul B Mahol
0b360cae1c make swresample optional for ffmpeg
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 12:38:03 +02:00
Diego Biurrun
ad5bbc4086 configure: Rename require_header() --> require_headers()
This renaming was overlooked in the previous check_header() rename.
2018-04-25 12:24:24 +02:00
Thomas Volkert
4130e05ff4 libavformat: add mbedTLS based TLS
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-04-25 10:34:12 +02:00
Rostislav Pehlivanov
4ac0ff8ec2 Revert "libavformat: add mbedTLS based TLS"
This reverts commit 62f5c9d68b,
which was pushed a bit prematurely.
2018-04-23 20:29:02 +01:00
Thomas Volkert
62f5c9d68b libavformat: add mbedTLS based TLS 2018-04-23 20:48:11 +02:00
Diego Biurrun
39f3b6f3fc configure: Move add_fooflags() helper functions into canonical order 2018-04-20 12:00:11 +02:00
Diego Biurrun
5691c746cf configure: Group toolchain parameter mangling functions together 2018-04-20 12:00:11 +02:00
Diego Biurrun
5cb62f9d95 configure: Rename check_header() --> check_headers()
The plural in the name clarifies the fact that the function
can check for multiple headers at once.
2018-04-20 12:00:11 +02:00
Diego Biurrun
25c2a27c9e configure: Make require_cc() and require_cpp_condition() functions consistent
Their API and implementation is different from other require_foo() functions,
which violates the rule of least astonishment.
2018-04-20 12:00:11 +02:00
Diego Biurrun
23be4eebf8 build: Group external library protocols separately 2018-04-20 12:00:10 +02:00
Hendrik Leppkes
638575cd0b configure: fix clang-cl check in the MSVC section
Without properly grouping the checks, the second test would execute for
MSVC cl.exe, which results in configure getting stuck since cl.exe -? is
an interactive paginated help screen, waiting for input.
2018-04-19 09:57:11 +02:00
Steve Lhomme
abf806f7f1 random_seed: use bcrypt instead of the old wincrypt API
Remove the wincrypt API calls since we don't support XP anymore and
bcrypt is available since Vista, even on Windows Store builds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-04-19 10:54:26 +03:00
Timo Rothenpieler
b3b3a3e3ce configure: add nvcc to CMDLINE_SET
This was somehow forgotten and nobody noticed until now.
2018-04-16 22:35:26 +02:00
James Almer
c04609eefc configure: extend the check for bcrypt
Some old mingw-w64 builds seem to provide an incomplete implementation
of the API. Add an extra check to make sure it's disabled for those.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-16 10:20:46 -03:00
Alexander Bilyak
9fd11e5188 configure: fix clang-cl detection
When using clang-cl it expects parameters passed in MSVC-style, so appropriate toolchain should be selected.
As soon as both clang and clang-cl report themselfs as "clang" with -v option the only chance to detect
clang-cl is passing -? option to both which is valid for clang-cl.exe and not for clang.exe.

Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-15 17:37:00 +02:00
Steve Lhomme
aedbf1640c avutil/random_seed: use bcrypt instead of the old wincrypt API
Remove the wincrypt API calls since we don't support XP anymore and bcrypt is
available since Vista, even on Windows Store builds.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-14 18:31:25 -03:00
Michael Niedermayer
876f9ac9a6 configure: make the C11 atomics check more robust
C11 atomics allow direct access. This check should prevent the usage
of bogus stdatomic.h available on some systems.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-13 11:08:17 -03:00
James Almer
e7a2f1f8d8 configure: disable direct stripping in OpenBSD
It appears strip -o creates new files without preserving permissions
from the source binary, resulting in non executable files.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-13 11:01:29 -03:00
Carl Eugen Hoyos
b5c877a554 configure: Disable direct stripping for AIX.
AIX strip doesn't know the option -o.
2018-04-12 02:30:21 +02:00
James Almer
aea610b0d6 configure: check for INIT_ONCE before enabling w32threads
Should fix compilation wiht some old mingw-w64 builds that
don't seem to define it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-10 20:45:17 -03:00
James Almer
234a5e0831 configure: check that the required header for Linux Perf is available
Should fix compilation on targets like some old Android NDK versions.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-10 20:43:25 -03:00
wm4
c7ab6aff66 w32pthreads: always use Vista+ API, drop XP support
This removes the XP compatibility code, and switches entirely to SRW
locks, which are available starting at Windows Vista.

This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.

Windows XP is hereby not a supported build target anymore.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-04-09 21:58:39 +02:00
Michael Niedermayer
8247e0304e configure: fix build
regression since 8f1382f80e
2018-04-01 02:58:42 +02:00
Josh de Kock
65452bcd64 lavd: remove linked lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:31 +01:00
Josh de Kock
d8ae40611b Revert "lavd: add new API for iterating input and output devices"
This reverts commit 0fd475704e.

Revert "lavd: fix iterating of input and output devices"

This reverts commit ce1d77a5e7.

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:31 +01:00
Josh de Kock
8f1382f80e lavfi: add new iteration API
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:30 +01:00
Martin Storsjö
f33f728470 arm: swscale: Only compile the rgb2yuv asm if .dn aliases are supported
Vanilla clang supports altmacro since clang 5.0, and thus doesn't
require gas-preprocessor for building the arm assembly any longer.

However, the built-in assembler doesn't support .dn directives.

This readds checks that were removed in d7320ca3ed, when
the last usage of .dn directives within libav were removed.

Alternatively, the assembly could be rewritten to not use the
.dn directive, making it available to clang users.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-31 21:54:56 +03:00
Diego Biurrun
e744281c49 configure: Revert some incorrect uses of check_cc() 2018-03-30 10:12:13 +02:00
James Almer
a123e576a4 Merge commit 'a2fc8dbae85339d1b418d296f2982b6c04c53c57'
* commit 'a2fc8dbae85339d1b418d296f2982b6c04c53c57':
  Add Haivision SRT protocol

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:56:19 -03:00
James Almer
75bf51ef87 Merge commit '434b44cd6fb4bb9a2bf2bb29ef55ce1a315314b8'
* commit '434b44cd6fb4bb9a2bf2bb29ef55ce1a315314b8':
  configure: Simplify vararg check

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:30:16 -03:00
James Almer
e46fab0f3c Merge commit '8c7554e6a9b126bd6ee5bf80dae9e11e056db2f1'
* commit '8c7554e6a9b126bd6ee5bf80dae9e11e056db2f1':
  configure: Add check_x86asm() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:25:43 -03:00
James Almer
91bcf0b8cd Merge commit '17ee5b0c13bc17465b71bc9ca1cde9f0eed8b3ff'
* commit '17ee5b0c13bc17465b71bc9ca1cde9f0eed8b3ff':
  configure: Use indirection for the -o assembler flag also for x86asm

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:15:18 -03:00
James Almer
3bbec8e7c2 Merge commit 'b9ea301e02472d0982b0fa0f80294bd95885bde8'
* commit 'b9ea301e02472d0982b0fa0f80294bd95885bde8':
  configure: Use a more sensible suffix for x86 assembly tempfiles

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:06:25 -03:00
James Almer
44df2e8588 Merge commit '5292e97c42b05db7ad4e51c1ea756b12fdf721ff'
* commit '5292e97c42b05db7ad4e51c1ea756b12fdf721ff':
  configure: Document available options for the --toolchain parameter

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 21:03:33 -03:00
James Almer
23f4472944 Merge commit 'ea2f72a2c14c67a3b35dac6426d1e3c0fae33fd5'
* commit 'ea2f72a2c14c67a3b35dac6426d1e3c0fae33fd5':
  configure: Don't assume a 16 byte aligned stack on BSDs on i386

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 20:40:07 -03:00
James Almer
7e3c4d029b Merge commit '847190ebd99ffd57dc89bd568a33bf2d5c424129'
* commit '847190ebd99ffd57dc89bd568a33bf2d5c424129':
  configure: Don't assume an aligned stack on clang on windows

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 20:31:03 -03:00
James Almer
99cc3cf7a2 Merge commit '43778a501f1bfbceeddc8eaeea2ea2b3506beeda'
* commit '43778a501f1bfbceeddc8eaeea2ea2b3506beeda':
  Support AV1 encoding using libaom

This contains some extra changes taken from the libvpx encoder
wrapper, most of them contained in the set_pix_fmt() function.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-29 00:05:45 -03:00
James Almer
0dc11d8bbd Merge commit 'c438899a706422b8362a13714580e988be4d638b'
* commit 'c438899a706422b8362a13714580e988be4d638b':
  Add AV1 video decoding support through libaom

This contains some extra changes taken from the libvpx decoder
wrapper, most of them contained in the set_pix_fmt() function.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 18:09:46 -03:00
James Almer
18195e570c Merge commit 'dd7e63af93b2430b5d42b87a966160c66736342c'
* commit 'dd7e63af93b2430b5d42b87a966160c66736342c':
  configure: Restore original endianness test

The test was not changed in 67e8f476b7
Merging only the explanation.

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 15:39:26 -03:00
James Almer
23ba9b3fd1 Merge commit '31a53ab34e22fe1eec902f79ec1f19ab828a7a0c'
* commit '31a53ab34e22fe1eec902f79ec1f19ab828a7a0c':
  configure: Add check_as() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 15:28:13 -03:00
James Almer
c00b218a8f Merge commit '18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad'
* commit '18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad':
  configure: Add check_ld() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 15:19:35 -03:00
James Almer
67e8f476b7 Merge commit '9c37d765ef28b027414f86b0088b0c282a3c46d8'
* commit '9c37d765ef28b027414f86b0088b0c282a3c46d8':
  configure: Add check_cc/require_cc helper functions to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-28 15:03:56 -03:00
Sven Dueking
a2fc8dbae8 Add Haivision SRT protocol
The protocol requires libsrt (https://github.com/Haivision/srt) to be
installed

Signed-off-by: Sven Dueking <sven.dueking@nablet.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-28 16:16:41 +02:00
Diego Biurrun
2124a97a49 configure: Drop unused helper function test_cflags_cpp() 2018-03-27 13:38:20 +02:00
Danil Iashchenko
9f17875134 libavfilter: Add OpenCL convolution filter
Behaves like existing convolution filter.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-26 22:26:35 +01:00
Diego Biurrun
434b44cd6f configure: Simplify vararg check 2018-03-26 18:59:44 +02:00
Diego Biurrun
8c7554e6a9 configure: Add check_x86asm() helper function to simplify some expressions 2018-03-26 18:59:43 +02:00
Diego Biurrun
17ee5b0c13 configure: Use indirection for the -o assembler flag also for x86asm
Similar indirections are used for the -o compiler/assembler flag to
account for differences in compiler/assembler syntax. For x86asm half
the infrastructure for doing the same currently exists unused.
Finish and use that infrastructure for consistency.
2018-03-26 18:54:56 +02:00
Diego Biurrun
b9ea301e02 configure: Use a more sensible suffix for x86 assembly tempfiles 2018-03-26 18:52:04 +02:00
Diego Biurrun
5292e97c42 configure: Document available options for the --toolchain parameter 2018-03-26 18:52:04 +02:00
Mark Thompson
ac993e73de hwcontext_opencl: Add support for mapping DRM objects to Beignet
Also use that to support mapping VAAPI to Beignet.
2018-03-22 23:19:00 +00:00
drfer3
6135c958cd lavfi: Add OpenCL avgblur filter
Behaves like the existing avgblur filter, except working on OpenCL
hardware frames. Takes exactly the same options.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-22 23:16:25 +00:00
James Almer
d8ca7a7e70 configure: add const_nan dependency to h264_metadata_bsf
Fixes compilation with some compilers.

Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-18 19:51:22 -03:00
Mark Thompson
c99f837dde lavc: Add filter_units bitstream filter
This can remove units with types in or not in a given set from a stream.
For example, it can be used to remove all non-VCL NAL units from an H.264 or
H.265 stream.
2018-03-18 18:23:18 +00:00
Mark Thompson
84bb8327f5 cbs: Add a table of all supported codec IDs
Use it as the set of codec IDs supported by the trace_headers BSF.
2018-03-18 17:55:00 +00:00
Martin Storsjö
ea2f72a2c1 configure: Don't assume a 16 byte aligned stack on BSDs on i386
With GCC, request it to maintain 16 byte alignment, and the existing
entry points already align it via attribute_align_arg.

With clang, do the same as for mingw; disable the aligned stack
and let the assembly functions that require it do the alignment
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-17 22:27:42 +02:00
James Almer
c51dbc2717 configure: revert changes to the schannel check
check_cpp_condition was not being called on some targets, which made schannel
remain enabled even when it was not available

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-17 16:49:15 -03:00
James Almer
222d4b0acc Merge commit '83fef16b6a8dbbcbd80d159ba3ebe818dbbb2776'
* commit '83fef16b6a8dbbcbd80d159ba3ebe818dbbb2776':
  configure: Add check_cpp_condition() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-17 15:01:29 -03:00
James Almer
40e32f83c6 Merge commit 'a5e011c8dcbf6968cc60f883d33382ba46147e90'
* commit 'a5e011c8dcbf6968cc60f883d33382ba46147e90':
  configure: Add check_cmd() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-17 15:00:40 -03:00
James Almer
eeca8921e2 configure: add missing adts_header to aac_fixed decoder
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-15 20:33:20 -03:00
James Almer
f75ba4c2d6 Merge commit '49804dc2baec009577e6b4ee827ae562188fbc2f'
* commit '49804dc2baec009577e6b4ee827ae562188fbc2f':
  configure: Use test_ prefix for helper functions that do not set variables

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 19:21:31 -03:00
James Almer
3c56d67341 Merge commit '8c893aa3cd5f2d73896c72af330dcbfe299fbc5a'
* commit '8c893aa3cd5f2d73896c72af330dcbfe299fbc5a':
  configure: Drop unnecessary variables, shifts, and quotes in helper functions

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 18:09:58 -03:00
Martin Storsjö
847190ebd9 configure: Don't assume an aligned stack on clang on windows
If we'd enable a 16 byte aligned stack, clang/llvm would also assume
that alignment everywhere and produce code that strictly requires it.
That would require adding realignment (via attribute_align_arg) on every
single public library function or enable -mstackrealign (which does the
same on every single function).

Also relatedly; the parameter currently tested (-mllvm
-stack-alignment=16) hasn't actually been supported for quite some
time; current clang versions use -mstack-alignment=16 for the same.
Actually testing for that parameter would be a different change
though, since it has a real risk of changing behaviour on any other
platform where clang is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-13 15:25:12 +02:00
Luca Barbato
43778a501f Support AV1 encoding using libaom 2018-03-12 12:10:33 +01:00
Luca Barbato
c438899a70 Add AV1 video decoding support through libaom
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-12 08:12:43 +01:00
Diego Biurrun
dd7e63af93 configure: Restore original endianness test
Previously the bit pattern for the endianness test was declared as a
global, instead of a local, variable. This ensures that the pattern
appears unchanged in the object file and is not optimized out.
2018-03-08 14:02:30 +01:00
Diego Biurrun
31a53ab34e configure: Add check_as() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
18dc1ff0fb configure: Add check_ld() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
9c37d765ef configure: Add check_cc/require_cc helper functions to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
83fef16b6a configure: Add check_cpp_condition() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
a5e011c8dc configure: Add check_cmd() helper function to simplify some expressions 2018-03-07 13:55:07 +01:00
Diego Biurrun
49804dc2ba configure: Use test_ prefix for helper functions that do not set variables 2018-03-07 13:55:06 +01:00
Diego Biurrun
8c893aa3cd configure: Drop unnecessary variables, shifts, and quotes in helper functions 2018-03-07 13:55:06 +01:00
Diego Biurrun
121314895f configure: Fix logic of AMF external library check
Fail if AMF is requested but unavailable, as we do for all
other external libraries that need to be explicitly enabled.
2018-03-07 13:53:27 +01:00
Timo Rothenpieler
5787908e8c configure: rename cuda to ffnvcodec
Right now, if someone configures ffmpeg with for example --enable-nvenc they will
get an error message complaining about missing cuda.
This is very confusing and already has lead people into installing the CUDA SDK,
even though it's not what they need.

This will make it complain about ffnvcodec instead.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-03-05 21:09:22 +01:00
Timo Rothenpieler
27cbbbb33f compat: remove in-tree NVidia headers
External headers are no longer welcome in the ffmpeg codebase because they
increase the maintenance burden. However, in the NVidia case the vanilla
headers need some modifications to be usable in ffmpeg therefore we still
provide them, but in a separate repository.

The external headers can be found at
https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git

Fate-source is updated because of the deleted files, and dynlink_loader.h
license headers were updated with the standard FFmpeg headers.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-02-27 16:22:12 +01:00
James Almer
f4709f1b7b configure: add missing audio_frame_queue dependency to vorbis encoder
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-26 01:43:54 -03:00
Tomas Härdin
f958f431ec Add libcodec2 en/decoder 2018-02-24 17:06:31 +01:00
Philip Langdale
cd98f20b4a avcodec/nvdec: Implement mjpeg nvdec hwaccel 2018-02-21 23:38:42 +00:00
Mark Thompson
63c690ad15 vaapi: Add MJPEG decode hwaccel 2018-02-21 23:38:30 +00:00
Felix Matouschek
5ac3a309fd avdevice: add android_camera indev
This commit adds an indev for Android devices on API level 24+ which
uses the Android NDK Camera2 API to capture video from builtin cameras

Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
James Almer
04a8d5c2d7 Merge commit 'cc1c94dacd0642ac1a6cad45deb65071f127d91a'
* commit 'cc1c94dacd0642ac1a6cad45deb65071f127d91a':
  configure: Pass the right machine types to dlltool for arm and arm64 mingw

Merged-by: James Almer <jamrial@gmail.com>
2018-02-19 18:35:32 -03:00
Hendrik Leppkes
6d8bef8c05 build: restore using dlltool/lib.exe for creating Win32 .lib files
The GCC generated import libraries don't work properly when being imported
by MSVC, resulting in missing symbols at runtime.

This reverts 5b5365fe9 and partially reverts changes from 98a9b1f0d
2018-02-19 22:26:34 +01:00
Martin Storsjö
cc1c94dacd configure: Pass the right machine types to dlltool for arm and arm64 mingw
These are supported by llvm-dlltool.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:41 +02:00
Martin Storsjö
97eee953e6 Revert "configure: Stop using dlltool to create an import library"
This reverts commit 67c72f08a4.

While the linker produced import libraries might work with MSVC in
simple test cases, they don't if e.g. linking to multiple GNU ld
produced import libraries at the same time. (They end up importing
functions from the wrong libraries.) The ones produced by dlltool
work fine though.

This issue was pointed out by Hendrik Leppkes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-19 12:36:09 +02:00
James Almer
4961ddfd35 Merge commit 'fd36cf6bf6524247a8ff6788c028836fe7d9fd20'
* commit 'fd36cf6bf6524247a8ff6788c028836fe7d9fd20':
  configure: Factorize check_64_bit()

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 23:18:59 -03:00
James Almer
c1c720d527 Merge commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba'
* commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba':
  configure: Simplify restrict keyword handling

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 23:13:17 -03:00
James Almer
8a15ad8a17 Merge commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0'
* commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0':
  configure: Group code that sets the license string with licensing checks

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:59:18 -03:00
Aurelien Jacobs
6fd110a094 aptx: implement the aptX HD bluetooth codec 2018-02-09 22:10:55 +01:00
Josh de Kock
0fd475704e lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in
libavformat
2018-02-06 18:57:42 +00:00
Josh de Kock
0694d87024 lavf: add new API for iterating muxers and demuxers 2018-02-06 18:57:42 +00:00
Josh de Kock
7e8eba2d87 lavc: add new API for iterating codecs and codec parsers
Based on an unfinished patch by atomnuker.
2018-02-06 18:50:27 +00:00
Diego Biurrun
fd36cf6bf6 configure: Factorize check_64_bit() 2018-02-06 11:13:19 +01:00
Diego Biurrun
38434a9ff5 configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
2018-02-06 11:13:10 +01:00
Diego Biurrun
bca41545b3 configure: Group code that sets the license string with licensing checks
This also moves the setting of the licensing string out of a block that
is skipped when quiet operation is requested.
2018-02-06 10:03:15 +01:00
Jun Zhao
0519e66a90 examples: Add a VA-API transcode example.
Usage is:
./vaapi_transcode input_stream codec output_stream
For example:
- ./vaapi_transcode input.mp4 h264_vaapi output_h264.mp4
- ./vaapi_transcode input.mp4 vp8_vaapi output_vp8.ivf

Does not handle resolution changes on the input stream.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-04 12:56:39 +00:00
Xiaohan Wang
caaa40d2c6 configure: Remove carriage return ('\r') in Windows CC_IDENT
Currently the Windows CC_IDENT is ended with '\r\n'. "head -n1" will not
remove the '\r' and this is causing building error in Chromium.

This CL adds "tr -d '\r'" to remove '\r' in the CC_IDENT string. Since in
most cases '\r' only appears at the end of a string/line, this should
work in most cases.

See example:

printf "hello\r\nworld\r\n" | head -n1 | hd
00000000  68 65 6c 6c 6f 0d 0a                              |hello..|

printf "hello\r\nworld\r\n" | head -n1 | tr -d '\r' | hd
00000000  68 65 6c 6c 6f 0a                                 |hello.|

Also note a similar previous change at:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2013-October/069950.html

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-02 00:18:24 +01:00
James Almer
172564ace9 configure: fix vaapi_encode_example dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:04 -03:00
Jun Zhao
9bba10c174 lavfi: add denoise and sharpness VAAPI video filters.
Most code between them is common, so put them in a new file for
miscellaneous VAAPI filters.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao
fcf5eae4bf lavfi: add ProcAmp (color balance) VAAPI video filter.
Add ProcAmp(color balance) vaapi video filter, use the option
like -vf "procamp_vaapi=b=10:h=120:c=2.8:s=3.7" to set
brightness/hue/contrast/saturation.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Carl Eugen Hoyos
af964baf09 configure: Simplify detection of static x264 on systems without pkg-config.
Fixes a regression since 6dfcbd80.
2018-01-11 11:12:38 +01:00