Commit Graph

5179 Commits

Author SHA1 Message Date
James Almer ebc3d04b8d avcodec: add an AV1 parser
Simple parser to set keyframes, frame type, structure, width, height, and pixel
format, plus stream profile and level.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-10-03 20:48:49 -03:00
Mark Thompson 476a77128a lavc: Add AV1 metadata bitstream filter
Can adjust colour and timing information.
2018-09-26 23:41:34 +01:00
Mark Thompson c8c81ac502 lavc: Add coded bitstream read/write support for AV1 2018-09-26 23:27:53 +01:00
Paul B Mahol efb65abedf avfilter: add audio denoising (afftdn) filter 2018-09-25 19:54:06 +02:00
Marton Balint db6b4b56b3 avdevice/decklink: add support for selecting devices based on their unique ID
Also bump the API version requirement to 10.9.5, because on olders versions
there were some reports of crashes using the undocumented, yet available
BMDDeckLinkDeviceHandle.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-23 18:55:29 +02:00
Mark Thompson ff0eb2bce3 vaapi_encode_mjpeg: Use CBS to store parameters and write headers
Also adds greyscale, 4:2:2, 4:4:4 and RGB support.
2018-09-23 14:42:34 +01:00
Mark Thompson 525de2000b lavc/cbs: Add JPEG support 2018-09-23 14:42:34 +01:00
Mark Thompson a00763be88 configure: Use pkgconfig for VAAPI
Set the minimum version to 0.35.0 (libva 1.3.0) and remove redundant
configure tests.  This also allows the proprietary libmfx fork of libva,
which always shows the version number 0.99.0 (independent of the actual
version).
2018-09-23 14:42:33 +01:00
James Almer 98518e90aa avcodec: add missing mpegvideo dependencies to SpeedHQ decoder
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-15 12:35:16 -03:00
James Almer 6304268e39 configure: add missing avcodec dependency to avfilter when bm3d filter is enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-14 21:17:04 -03:00
Paul B Mahol 0ac937f80d configure: bm3d filter depends on dct in avcodec 2018-09-13 11:27:20 +02:00
hwren 85a921f461 lavc, doc, configure: add libxavs2 video encoder wrapper
Signed-off-by: hwren <hwrenx@126.com>
2018-09-11 21:48:42 +01:00
Roman Arzumanyan 90ba17652a avfilter: add nvidia NPP based transpose filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-09-10 12:11:41 +02:00
Devin Heitmueller 8732dfa995 avdevice/decklink: Add support for EIA-708 output over SDI
Hook in libklvanc and use it for output of EIA-708 captions over
SDI.  The bulk of this patch is just general support for ancillary
data for the Decklink SDI module - the real work for construction
of the EIA-708 CDP and VANC line construction is done by libklvanc.

Libklvanc can be found at: https://github.com/stoth68000/libklvanc

Updated to reflect feedback from Marton Balint <cus@passwd.hu>,
Carl Eugen Hoyos <ceffmpeg@gmail.com>, Aaron Levinson
<alevinsn_dev@levland.net>, and Moritz Barsnick <barsnick@gmx.net>

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-09 22:42:26 +02:00
Paul B Mahol a5278b672a avcodec: add RemotelyAnywhere Screen Capture decoder 2018-09-08 15:59:10 +02:00
James Almer ce265b0bf5 Merge commit '39f3b6f3fc2b46b405b680cce3599f1b370e342d'
* commit '39f3b6f3fc2b46b405b680cce3599f1b370e342d':
  configure: Move add_fooflags() helper functions into canonical order

Merged-by: James Almer <jamrial@gmail.com>
2018-09-02 17:35:51 -03:00
James Almer 9a88a47be4 Merge commit '5691c746cf62e69806aae1baf0a6e8252d519444'
* commit '5691c746cf62e69806aae1baf0a6e8252d519444':
  configure: Group toolchain parameter mangling functions together

Merged-by: James Almer <jamrial@gmail.com>
2018-09-02 17:33:30 -03:00
James Almer ce47f1589e Merge commit '5cb62f9d952e24fff62737a57e89cf43d9c2333a'
* commit '5cb62f9d952e24fff62737a57e89cf43d9c2333a':
  configure: Rename check_header() --> check_headers()

Merged-by: James Almer <jamrial@gmail.com>
2018-09-02 17:29:54 -03:00
James Almer 73d193d1d0 Merge commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56'
* commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56':
  configure: Make require_cc() and require_cpp_condition() functions consistent

Merged-by: James Almer <jamrial@gmail.com>
2018-09-02 17:18:58 -03:00
James Almer 41cd5af325 Merge commit '23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a'
* commit '23be4eebf8aaa7519b12b2a49e5c5c6c4d076e6a':
  build: Group external library protocols separately

Merged-by: James Almer <jamrial@gmail.com>
2018-09-02 16:50:45 -03:00
Marton Balint 1124df0397 avformat/libsrt: add pkt_size parameter to libsrt
Also make sure we set the URL context max packet size accordingly.

Based on a patch by Tudor Suciu <tudor.suciu@gmail.com>

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-01 21:57:59 +02:00
Avi Halachmi (:avih) 09e49a8fb0 configure: <fflib>_deps: validate, reduce sensitivity
- Allow to add deps in any order rather than "in linking order".
- Expand deps chains as required rather than just once.
- Validate that there are no cycles.
- Validate that [after expansion] deps are limited to other fflibs.
- Remove expectation for a specific output order of unique().

Previously when adding items to <fflib>_deps, developers were
required to add them in linking order. This can be awkward and
bug-prone, especially when a list is not empty, e.g. when adding
conditional deps.

It also implicitly expected unique() to keep the last instance of
recurring items such that these lists maintain their linking order
after removing duplicate items.

This patch mainly allows to add deps in any order by keeping just
one master list in linking order, and then reordering all the
<fflib>_deps lists to align with the master list order.

This master list is LIBRARY_LIST itself, where otherwise its order
doesn't matter.

The patch also removes a limit where these deps lists were expanded
only once. This could have resulted in incomplete expanded lists,
or forcing devs to add already-deducable deps to avoid this issue.

Note: it is possible to deduce the master list order automatically
from the deps lists, but in this case it's probably not worth the
added complexity, even if minor. Maintaining one list should be OK.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-31 01:44:03 +02:00
Shiyou Yin e13e52fd0d configure: [loongson] revert no-expensive-optimizations
Add gcc version check before add -fno-expensive-optimizations flag.
Only when gcc version is lower than 5.3.0, this flag is needed.
More bug info see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67736
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00401.html

Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-27 23:30:54 +02:00
Paul B Mahol ad2ac1e7dd avcodec: add WinCAM Motion Video decoder 2018-08-27 22:06:19 +02:00
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
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