Commit Graph

4077 Commits

Author SHA1 Message Date
James Almer
c1a3683f26 configure: disable -Wunused-const-variable
The option became too aggressive with GCC 6, generating nearly 500
warnings from static const variables defined in assorted headers

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-18 20:16:55 -03:00
Carl Eugen Hoyos
1f12a889da configure: The XMA decoders depend on wmapro.
Fixes compilation with --disable-fft.
2016-01-17 18:37:01 +01:00
Paul B Mahol
653f9d84ae avfilter: add spectrumsynth filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-14 20:51:20 +01:00
Ganesh Ajjanagadde
a0a47a09b0 lavu/libm: add isfinite fallback
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-13 20:00:19 -05:00
Paul B Mahol
57e4571679 configure: showspectrum now uses fft, add showspectrumpic
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-12 22:36:34 +01:00
Ricardo Constantino
be0f005da6 configure: Use libgcrypt-config's cflags
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-08 21:00:18 -03:00
Ricardo Constantino
e990d746d0 configure: Use libgcrypt-config if available
Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-08 20:36:48 +01:00
James Almer
08339cdb6c configure: remove unused bulitin check
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-07 20:11:00 -03:00
Clément Bœsch
2ce29d1765 lavu: add ff_parity() 2016-01-07 22:51:31 +01:00
Michael Niedermayer
23679d82f6 configure: use warn() for mips unknown cpu warning
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-06 22:15:14 +01:00
Vicente Olivert Riera
6282bdc2bf mips: display a warning message when using an unknown CPU
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-06 19:41:38 +01:00
Derek Buitenhuis
72673ad7ea avcodec: Remove libstagefright
It serves absolutely no purpose other than to confuse potentional
Android developers about how to use hardware acceleration properly
on the the platform. The stagefright "API" is not public, and the
MediaCodec API is the proper way to do this.

Furthermore, stagefright support in avcodec needs a series of
magic incantations and version-specific stuff, such that
using it actually provides downsides compared just using the actual
Android frameworks properly, in that it is a lot more work and confusion
to get it even running. It also leads to a lot of misinformation, like
these sorts of comments (in [1]) that are absolutely incorrect.

[1] http://stackoverflow.com/a/29362353/3115956

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-06 16:43:06 +00:00
James Almer
78129978f0 configure: bump copyright year to 2016
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-02 16:28:31 -03:00
yukari yakumo
f87e29a615 configure: support --cpu=host and Clang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-30 23:14:31 +01:00
Vicente Olivert Riera
dde994751b mips: put "disable mipsfpu" in a better place for loongson
Let's disable the ISAs first, and then the core capabilities, as we do
for the rest of the cores. This way the code is better organized.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-30 20:21:57 +01:00
Vicente Olivert Riera
6a7e94cb14 mips: add mips32r6 architecture variant
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-30 20:21:45 +01:00
Ganesh Ajjanagadde
29bc293297 configure: make gcc 2 detection more robust
Solves an issue that will get triggered when gcc 20 rolls in.

Found-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-30 08:45:02 -08:00
Ganesh Ajjanagadde
63702014fa lavfi/af_anequalizer: remove cabs, cexp dependencies
Replaces by real arithmetic. Tested the validity of these transformations separately.
Numerical differences are ~1e-15, and should not matter: it is not even
clear which is more precise mathematically.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-28 16:47:23 -08:00
Ganesh Ajjanagadde
73616b1f21 lavu/libm,configure: remove exp10, exp10f detection
Subsequent commit introduces ff_exp10 instead.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-25 10:12:49 -08:00
Paul B Mahol
56c7d2b4da avfilter: add high-order parametric multiband equalizer filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-25 14:22:28 +01:00
Michael Bradshaw
99eabcdd5f avcodec: add OpenJPEG 2.x compatibility
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-25 10:55:34 +01:00
Ganesh Ajjanagadde
e29db08cf7 lavu/libm: add exp10 support
exp10 is a function available in GNU libm. Looks like no other common
libm has it. This adds support for it to FFmpeg.

There are essentially 2 ways of handling the fallback:
1. Using pow(10, x)
2. Using exp2(M_LOG2_10 * x).

First one represents a Pareto improvement, with no speed or accuracy
regression anywhere, but speed improvement limited to GNU libm.

Second one represents a slight accuracy loss (relative error ~ 1e-13)
for non GNU libm. Speedup of > 2x is obtained on non GNU libm platforms,
~30% on GNU libm. These are "average case numbers", another benefit is
the lack of triggering of the well-known terrible worst case paths
through pow.

Based on reviews, second one chosen. Comment added accordingly.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-23 09:22:59 -08:00
Ganesh Ajjanagadde
520a5d33f0 lavfi/af_aemphasis: remove unnecessary complex number usage
complex is not available on all platforms. Furthermore, it is trivial to
rewrite complex number expressions to real arithmetic, and in fact
sometimes advantageous for performance reasons: by wrapping as a complex,
one forces a particular Cartesian representation that is not necessarily optimal for the purpose.

Configure dependencies also removed, and aemphasis is now available across
all platforms.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-23 09:22:59 -08:00
Timo Rothenpieler
d7c2b75681 vaapi: Add VP9 hwaccell support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-12-22 12:54:23 +01:00
Ganesh Ajjanagadde
dd68cde28a lavu/libm: add erf hack and make dynaudnorm available everywhere
Source code is from Boost:
http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp
with appropriate modifications for FFmpeg.

Tested on interval -6 to 6 (beyond which it saturates), +/-NAN, +/-INFINITY
under -fsanitize=undefined on clang to test for possible undefined behavior.

This function turns out to actually be essentially as accurate and faster than the
libm (GNU/BSD's/Mac OS X), and I can think of 3 reasons why upstream
does not use this:
1. They are not aware of it.
2. They are concerned about licensing - this applies especially to GNU
libm.
3. They do not know and/or appreciate the benefits of rational
approximations over polynomial approximations. Boost uses them to great
effect, see e.g swr/resample for bessel derived from them, which is also
similarly superior to libm variants.

First, performance.
sample benchmark (clang -O3, Haswell, GNU/Linux):

3e8 values evenly spaced from 0 to 6
time (libm):
./test  13.39s user 0.00s system 100% cpu 13.376 total
time (boost based):
./test  9.20s user 0.00s system 100% cpu 9.190 total

Second, accuracy.
1e8 eval pts from 0 to 6
maxdiff (absolute): 2.2204460492503131e-16
occuring at point where libm erf is correctly rounded, this is not.

Illustration of superior rounding of this function:
arg   : 0.83999999999999997
erf   : 0.76514271145499457
boost : 0.76514271145499446
real  : 0.76514271145499446

i.e libm is actually incorrectly rounded. Note that this is clear from:
https://github.com/JuliaLang/openlibm/blob/master/src/s_erf.c (the Sun
implementation used by both BSD and GNU libm's), where only 1 ulp is
guaranteed.

Reasons it is not easy/worthwhile to create a "correctly rounded"
variant of this function (i.e 0.5ulp):
1. Upstream libm's don't do it anyway, so we can't guarantee this unless
we force this implementation on all platforms. This is not easy, as the
linker would complain unless measures are taken.
2. Nothing in FFmpeg cares or can care about such things, due to the
above and FFmpeg's nature.
3. Creating a correctly rounded function will in practice need some use of long
double/fma. long double, although C89/C90, unfortunately has problems on
ppc. This needs fixing of toolchain flags/configure. In any case this
will be slower for miniscule gain.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-21 09:03:11 -08:00
Ganesh Ajjanagadde
062e3e2382 lavu/libm: add copysign hack
For systems with broken libms.
Tested with NAN, -NAN, INFINITY, -INFINITY, +/-x for regular double x and
combinations of these.

Old versions of MSVC need some UINT64_C hackery.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-19 14:05:49 -08:00
Ganesh Ajjanagadde
39f8c7961d lavu/random_seed: use arc4random() when available
arc4random() was designed as a superior interface for system random
number generation, designed for OpenBSD and subsequently incorporated by
other BSD's, Mac OS X, and some non-standard libc's. It is thus an improvement to
use it whenever available.

As a side note, this may or may not get included in glibc, and there is
a proposal to create a posix_random family based on these ideas:
http://austingroupbugs.net/view.php?id=859.

Tested on Mac OS X.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-17 08:12:41 -08:00
Hendrik Leppkes
efcc8fddd6 Merge commit 'e02de9df4b218bd6e1e927b67fd4075741545688'
* commit 'e02de9df4b218bd6e1e927b67fd4075741545688':
  lavc: export Dirac parsing API used by the ogg demuxer as public

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 14:48:46 +01:00
Vicente Olivert Riera
a2f2abc889 mips: add mips64r2 architecture variant
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-16 14:03:57 +01:00
Vicente Olivert Riera
e8bc43fe47 mips: i6400 core is not mips32r2, so disable mips32r2
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-16 14:03:57 +01:00
Paul B Mahol
e8586ecb86 configure: add conditional library dependency for sofalizer and showfreqs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-14 22:41:52 +01:00
Paul B Mahol
2f12172d67 avfilter/af_sofalizer: add frequency domain processing and use it by default
Code ported from SOFAlizer patch for VLC.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-14 21:58:08 +01:00
Paul B Mahol
0a19538bcf avfilter: add SOFAlizer audio filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-12 20:56:36 +01:00
Vicente Olivert Riera
69e80d6ce4 mips: i6400 core does have an FPU, so not disable it
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 19:47:17 +01:00
Vicente Olivert Riera
88d66f691a mips: add i6400 core optimizations
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 19:47:11 +01:00
Vicente Olivert Riera
1dcd96f72f mips: remove --mips64r6 configure option
Having a configure option with the same name as a MIPS ISA is confusing,
so better to remove it. This option was being used to add some
optimizations to a specific core (i6400). We will add the optimizations
just when the i6400 core has been detected, in a later patch.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 19:47:06 +01:00
James Almer
a0050d9bf9 configure: fix vp9_d3d11va_hwaccel deps
Signed-off-by: James Almer <jamrial@gmail.com>
2015-12-07 13:12:21 -03:00
Hendrik Leppkes
357c62657a Merge commit 'cb49bb10ca7fcff2e382d9d989232b1a7f28e7da'
* commit 'cb49bb10ca7fcff2e382d9d989232b1a7f28e7da':
  build: Move -Wcast-qual to the extra_warnings

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-07 16:01:41 +01:00
Hendrik Leppkes
1e6cf7272f avcodec: implement vp9 dxva2 hwaccel 2015-12-07 09:38:59 +01:00
Anton Khirnov
e02de9df4b lavc: export Dirac parsing API used by the ogg demuxer as public
Also, stop using AVCodecContext for storing the stream parameters.
2015-12-06 10:28:04 +01:00
Hendrik Leppkes
3b0f63e110 Merge commit '9f57f134c19773d54269b6cb9ee455ff87c2e9e1'
* commit '9f57f134c19773d54269b6cb9ee455ff87c2e9e1':
  configure: ObjC support

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-05 12:21:33 +01:00
Vicente Olivert Riera
1a538a1490 mips: add p5600 core optimizations
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 20:51:01 +01:00
Vicente Olivert Riera
c8419035f4 mips: remove --mips32r5 configure option
Having a configure option with the same name as a MIPS ISA is confusing,
so better to remove it. This option was being used to add some
optimizations to a specific core (p5600). We will add the optimizations
just when the p5600 core has been detected, in a later patch.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 20:50:57 +01:00
Paul B Mahol
5d2cc00dd0 avfilter: add audio emphasis filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-04 17:52:57 +01:00
Vicente Olivert Riera
a27401a05b mips: rename mipsdspr1 to mipsdsp
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 02:35:42 +01:00
Martin Storsjö
1077d8c845 configure: Add -framework CoreVideo when building the avfoundation indev
This fixes builds with --disable-vda, which previously failed with
undefined references to CVImageBuffer* and CVPixelBuffer* functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-12-03 14:28:12 +02:00
Luca Barbato
cb49bb10ca build: Move -Wcast-qual to the extra_warnings
It amounts to about 1/2 of the warnings generated and does not help
spotting anything useful.
2015-12-02 23:49:10 +01:00
Kylie McClain
bf12a81cc6 configure: Replace pr since it is not provided by busybox
While pr is a valid POSIX.1 command, its usage in configure
is a little borderline and is possible to replace it with
printf.

Bug-Id: 913

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
James Almer
27ce53b52d avcodec/libdcadec: require first public release
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-11-29 12:53:14 -03:00
Matt Oliver
26a84e2dae configure: Add user options to enable gcrypt/gmp for rtmp(t)e support.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-11-30 02:25:37 +11:00