Commit Graph

2498 Commits

Author SHA1 Message Date
Derek Buitenhuis dedfa00107 build: Import makedef script from c99-to-c89
This allows MSVC 2013 and ICL to build with no external
dependencies.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-11-24 19:36:09 +00:00
Diego Biurrun f187557ab4 build: more fine-grained dependencies for documentation build tools
Perl is needed to build the manual pages, texi2html for the HTML pages.
2013-11-23 09:45:06 -08:00
Anton Khirnov 7671dd7cd7 avconv: add support for VDPAU decoding 2013-11-23 11:55:53 +01:00
Martin Storsjö ea9f7173ae configure: Avoid requiring c99wrap for working around msys path issues
Msys is unable to convert unix style absolute paths to windows style
paths when combined with certain multichar MSVC options such as
-Fo<file>. We used to work around this issue by passing them as two
separate parameters separated by a space to c99wrap, which then mapped
them back to the actual parameter format that MSVC uses.

The only paths that actually are an issue are absolute unix style
paths, and the only place such absolute paths are used with the output
arguments (-Fo, -Fe, -Fi, -out:) are for the temp files within configure.

By setting TMPDIR to . for msvc/icl builds, we never need to use
absolute unix style paths for the file output, and we can use the
actual proper form of the file output parameters. This avoids requiring
the c99wrap wrapper for remapping the parameters for cases where the
c99 converter isn't invoked at all (MSVC2013 and ICL).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-11-21 12:35:24 +02:00
Derek Buitenhuis 03f6d4e0f1 win{32,64}: Hard disable symbol versioning
ICL doesn't return an error on unknown parameters, and will
always pass the symver_gnu_asm test, and since Windows
never has symbol versioning, just always disable it.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-11-19 21:30:13 +00:00
Martin Storsjö fa48be9b95 configure: Don't use symlinks for creating the out of tree makefile
On some platforms (such as msys), symlinks are (poorly) emulated
by simply creating a copy of the file.

This means that when building out of tree, the build tree gets
a copy of the original makefile, which can lead to unintuitive
build errors when the original makefile gets updated later.

Instead simply create a stub makefile which includes the real
one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-11-19 10:12:58 +02:00
Ronald S. Bultje 72ca830f51 lavc: VP9 decoder
Originally written by Ronald S. Bultje <rsbultje@gmail.com> and
Clément Bœsch <u@pkh.me>

Further contributions by:
Anton Khirnov <anton@khirnov.net>
Diego Biurrun <diego@biurrun.de>
Luca Barbato <lu_zero@gentoo.org>
Martin Storsjö <martin@martin.st>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-15 10:16:28 +01:00
Martin Storsjö 16381923fb configure: Check whether MSVC requires using the C89-to-C99 converter
MSVC does support enough of C99 to work without the converter since
the 2013 version. Try to detect which version of the compiler in
the path needs to run the C99 converter or not. When the converter
is omitted, compilation time is reduced quite drastically.

Prior to this, users could still use --cc="c99conv -noconv cl"
when running MSVC 2013 to achieve the same.

This checks the version number instead of doing a normal compile
test, since this check needs to be done earlier in configure, before
the normal compile test helpers are usable.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-11-13 20:55:11 +02:00
Diego Biurrun 0338c39698 dsputil: Split off H.263 bits into their own H263DSPContext 2013-11-08 12:40:47 +01:00
Diego Biurrun 92352a94c1 configure: Move -Wno-maybe-uninitialized check into gcc section
As another example of bizarre compiler behavior clang groks the
-Wmaybe-uninitialized option, but not -Wno-maybe-uninitialized
and spews a warning for every file that gets compiled.
2013-11-05 12:22:48 +01:00
Martin Storsjö 435214a757 Add an HDS live fragmenting muxer
HDS fragments basically are FLV fragments wrapped in an ISO
media mdat atom.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-11-02 10:51:00 +02:00
Diego Biurrun 056fd4fe65 configure: Properly check for availability of -Wno-foo warning flags
For some weird reason gcc does not check if the -Wno disabling variants
of warning flags match existing warning flags. Instead it swallows them
silently. That is, unless other warning or error messages are generated,
because then - for some even more bizarre reason - a complaint about the
unknown disable warning flag is issued along with the error or warning
message.

Thus to check for the availability of a warning disabling option, one
needs to check for the enabling variant instead and then add the
disabling variant to CFLAGS.
2013-11-01 22:05:20 +01:00
Diego Biurrun 23157d72b5 configure: Split test_cflags function off from check_cflags
This is useful to test flags without directly adding them to CFLAGS.
2013-11-01 22:05:20 +01:00
Guillaume Martres 064698d381 Add HEVC decoder
Initially written by Guillaume Martres <smarter@ubuntu.com> as a GSoC
project. Further contributions by the OpenHEVC project and other
developers, namely:

Mickaël Raulet <mraulet@insa-rennes.fr>
Seppo Tomperi <seppo.tomperi@vtt.fi>
Gildas Cocherel <gildas.cocherel@laposte.net>
Khaled Jerbi <khaled_jerbi@yahoo.fr>
Wassim Hamidouche <wassim.hamidouche@insa-rennes.fr>
Vittorio Giovara <vittorio.giovara@gmail.com>
Jan Ekström <jeebjp@gmail.com>
Anton Khirnov <anton@khirnov.net>
Martin Storsjö <martin@martin.st>
Luca Barbato <lu_zero@gentoo.org>
Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diego Biurrun <diego@biurrun.de>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-31 20:19:59 +01:00
Luca Barbato e789130522 configure: Provide an hardened toolchain option 2013-10-29 11:36:00 +01:00
Luca Barbato dcd3eda6cb configure: Move gcc-only -W option where it belongs 2013-10-29 11:36:00 +01:00
Luca Barbato de6061203e configure: Disable -Wmaybe-uninitialized by default
It is by definition unreliable and causes pointless noise on valid
code.
2013-10-28 00:04:49 +01:00
Kieran Kunhya 4d6ee07255 libavutil: x86: Add AVX2 capable CPU detection.
Patch based on x264's AVX2 detection

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-25 19:36:55 +01:00
Clément Bœsch e01fba5562 movenc: Add an F4V muxer
F4V is Adobe's mp4/iso media variant, with the most significant
addition/change being supporting other flash codecs than just
aac/h264.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-23 11:17:03 +03:00
Derek Buitenhuis 9e3946aada build: Require yasm 0.8.0 or higher
This is in preparation for removing a .rodata kludge
which was only required for older YASM versions.

The movbe instruction was introduced in 0.8.0, which already
had AVX, which was introduced in 0.7.0, and NASM introduced
movbe in 2.0.3, which is the same version which introduced
AVX support.

Also, make the failure message more accurate.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-09 07:44:19 -04:00
Loren Merritt e52567c295 build: Strip spurious labels
The implementation of 25cb0c1a involves lots of spurious labels.

The effect of keeping those labels around is making debugging harder.
Those labels are meaningless, and complicate the disassembly. Also,
gdb can't tell the difference between them and function entry points.

This new strip command is irrelevant to any usage of Libav that would
have used the old fully stripped version, because the old one was for
non-debug use.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:20:15 -04:00
Alex Smith d6d27f3e58 configure: Enable -Qansi-alias for icl 14+
Qansi-alias worked on 12.x, then caused miscompilation on 13.x, but now
works again passing all FATE tests for icl version 14.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-24 11:29:00 +02:00
Alex Smith 09f2581dc5 msvc/icl: Use __declspec(deprecated)
Prior to this on msvc/icl there was no handling of deprecated functions
and the deprecated warning was disabled.

After enabling there are a number of warnings relating to the CRT and
the use of the non-secure versions of several functions.  Defining
_CRT_SECURE_NO_WARNINGS silences these warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 14:40:06 +03:00
Luca Barbato e5d45e028c build: Support cparser 2013-09-19 21:53:21 +02:00
Justin Ruggles c4bfa09807 Add a WebP decoder
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
2013-09-18 14:10:05 -04:00
Vittorio Giovara 187105ff8a Fix references to deleted avcodec_encode_video() function 2013-09-16 13:59:19 +02:00
Diego Biurrun e2cd766ca1 configure: Mention that icl does not build both static and shared libs 2013-09-12 13:00:22 +02:00
Diego Biurrun 5045f6bdfa configure: Fix wrong reference to user support mailing list 2013-09-11 14:49:56 +02:00
Luca Barbato 7f9e893f56 build: Report an error message when a pc file is not found
Ease tracking path problems.
2013-09-04 09:47:06 +02:00
Vittorio Giovara f4ca970dba configure: Add docdir configuration option
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-31 16:16:38 +02:00
Diego Biurrun 84146963d2 configure: x86: Fix handling of i686 and cpunop features
The i686 feature really is a CPU feature and should be handled as such.
The cpunop dependency on i686 should be expressed with a standard _deps
declaration instead of a manual test.
2013-08-28 17:03:05 +02:00
Martin Storsjö 4f2b469da5 Add a libfdk-aac decoder
This can be useful for decoding AAC object types that are not supported
by the native AAC decoder, e.g. AAC-LD and AAC-ELD.
2013-08-20 14:27:27 -04:00
Martin Storsjö c9031c7c14 hlsenc: Add a proper dependency on the mpegts muxer
The hls muxer itself doesn't have any direct (object file level)
dependencies on mpegtsenc.o, and including that object file
directly doesn't ensure that it is registered so that the muxer
actually is accessible.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 22:41:11 +03:00
Kostya Shishkov 3e5898782d Voxware MetaSound decoder 2013-08-08 10:52:44 +02:00
Diego Biurrun 6fb65973c9 configure: Properly split dv1394 indev dependencies 2013-08-06 11:23:00 +02:00
Diego Biurrun 61c31e4ee7 configure: Properly set zlib dependencies for all components 2013-08-06 11:23:00 +02:00
Diego Biurrun a7d45e06e9 configure: The W64 demuxer should select the WAV demuxer, not depend on it 2013-08-06 11:23:00 +02:00
Diego Biurrun 406e6c0ba5 configure: Properly split avserver component and system dependencies 2013-08-06 11:23:00 +02:00
Diego Biurrun 255d9c570e riff: Move demuxing code to a separate file. 2013-08-06 11:02:36 +02:00
Diego Biurrun 3dd5c95dee riff: Move muxing code to a separate file 2013-08-06 11:02:35 +02:00
Luca Barbato 605387582b lavf: Support unix sockets 2013-08-05 16:13:35 +02:00
Rémi Denis-Courmont 578ea75a9e vdpau: remove old-style decoders
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:15:49 +02:00
Diego Biurrun 6da5b57da1 configure: Check for GCC diagnostic pragma support inside of functions
The actual usage of the pragma is within functions and older versions
of gcc only support the pragma outside of functions.
2013-08-02 22:34:03 +02:00
Diego Biurrun 3a7050ffed build: Add _Pragma macro to disable deprecated declaration warnings 2013-08-02 19:19:02 +02:00
Diego Biurrun 4822ee3ca6 configure: Detect AIX ar command instead of hardcoding it in the OS section 2013-07-29 19:43:37 +02:00
Michael Kostylev 80ade7985c AIX: add support for shared builds
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-07-26 21:12:36 +02:00
Diego Biurrun 03039f4c8c miscellaneous typo fixes 2013-07-25 19:43:32 +02:00
Hendrik Leppkes 7ef760d95c configure: generate full msvc debug symbols when linking in debug mode
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-21 19:59:15 +03:00
Martin Storsjö d010e95f86 avserver: Remove unused loadable module support
There is no record of this ever being used at all, anywhere,
since the feature was added in 2effd27446.

This gets rid of extra linker tricks just to support a feature
that isn't used, simplifying portability to other platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-18 17:25:49 +03:00
Martin Storsjö ef5b70affc configure: Check for support for labels in the inline assembly
Use this for enabling the ppc timer.h implementation only on
assemblers that support labels in the inline assembly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-11 18:53:02 +03:00
Luca Barbato d3635f3ab0 compat: wrap math.h to avoid AIX-specific clashes
AIX defines a class() function in its math.h header without any
guard.
2013-07-04 21:54:32 +02:00
Alex Smith 4f6b192e2e configure: Do not omit frame pointers for msvc/icl debug builds
Because O1 or O2 are required to build libav with msvc/icl, this must be
explicitly set instead of just omitting Oy.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 18:51:30 -04:00
Alex Smith 9f4a16c52e configure: Do not explicitly set Oy for msvc/icl
It is implied by O1 or O2, both of which are required to build libav
with msvc/icl.  Silences warnings when targeting x64 with icl.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 18:51:20 -04:00
Diego Biurrun ace87c19ed configure: whitespace cosmetics 2013-06-23 12:24:31 +02:00
Diego Biurrun 6dc6598692 configure: Simplify an expression with enabled_all. 2013-06-23 12:00:08 +02:00
Alex Smith f11e4045b9 configure: More msvc/icl combining
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-22 17:00:57 -04:00
Alex Smith e0d6e2fc67 configure: Remove unneeded icl inline compatibility definition
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-19 10:53:27 +03:00
Anton Khirnov 84d3ff50cd lavc: add a libwavpack encoder wrapper 2013-06-10 21:33:48 +02:00
Martin Storsjö 3965d404cc configure: Don't add -fPIC on windows targets
This avoids warnings about this option not having any effect on
this platform.

We still want to enable the pic configure item for these platforms
(if detected via the compiler builtin define __PIC__) to get proper
inline assembly workarounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:13 +03:00
Martin Storsjö 3fd0d166aa configure: Don't explicitly disable PIC for windows targets
This reverts e08c946c6 and 05165c2f7a. The actual intention of
e08c946c6 was to fix shared library builds for arm/win32, which
can also be accomplished in other ways.

Disabling pic on those platforms broke inline assembly on cygwin/64
(since some inline assembly requires knowing whether we are building
as PIC or not), and might also break inline assembly on other
compilers on windows.

As a side-effect, this unfortunately brings back all the warnings
about PIC not having any effect on that platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:10 +03:00
Martin Storsjö 2aa3325454 configure: arm: Don't try to enable pic for shared libraries on win32
The object file format doesn't support PIC loads in ARM assembly,
there are no relocation types in PE/COFF that correspond to
BFD_RELOC_32_PCREL (R_ARM_REL32 in ELF).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-10 14:32:06 +03:00
Kostya Shishkov 2d66a58ccd Go2Webinar decoder 2013-06-03 09:24:55 +02:00
Alex Smith 60f09c04d8 configure: icl: Merge -Qdiag-error parameters
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-05-31 14:39:30 -04:00
Alex Smith 14fb9d3d8c configure: Separate commonalities in msvc and icl flags
Allows for easier handling of flags that may be specific to icl or msvc.
Furthermore, simplify the handling of warnings and remarks thanks to
icl's support of -Wall on Windows.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-05-31 14:39:14 -04:00
Martin Storsjö 9f30fb5a77 configure: Don't pass -mthumb or -march= to MSVC
The modern MSVC for ARM always builds for thumb, and it can't be
disabled.

Also just use the default arch instead of trying to map the -march
parameter to MSVC's -arch parameter (which only takes the values
ARMv7VE and VFPv4).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-29 00:53:11 +03:00
Luca Barbato 0ba49d28a1 configure: support gcc-4.8 instrumentation
Since version 4.8 gcc sports asan and tsan integration that can
be leveraged when hunting bugs.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-28 17:22:16 +02:00
Martin Storsjö ba13606ca6 fate: Add a --target-samples path parameter
This allows having the samples accessible via different paths
on the target and on the host.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 17:16:54 +03:00
Anton Khirnov a3fc62e89e configure: make jack depend on pthreads 2013-05-27 21:56:14 +02:00
Alex Smith 322e4194dd msvc/icl: Intel Compiler support on Windows
Initial support for the ICL compiler on windows. Requires a new
c99wrap with ICL support (1.0.2+).

Currently not much different speed wise compared to msvc. In the
future with a few changes it can be made to support the inline asm.
This would be the primary reason for using it.

Passed all fate tests, versions tested:
    13.1.1.171 (2013 Update 3) x86 and x64
    12.1.5.344 (2011 Update 11) x86 and x64

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-25 17:52:44 +02:00
Laurent 9495cd170b configure: Fix check_exec_crash for ICL support
Change the check_exec_crash test to use a function pointer instead of
simply calling the function. The EBP availability test will crash when
compiled with ICL likely due to compiler optimization shenanigans.

Originally the check_exec_crash code was moved out of main to fix a
problem with gcc's treatment of non-leaf main on x86_32. Libav already
moved the code out of main but the addition of the function pointer will
prevent any inlining which fixes the remaining problem.

A function pointer is used since it is compiler agnostic (as opposed to
say __attribute__ ((noinline)) which would only work with gcc compatible
compilers).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-25 12:07:56 +02:00
Martin Storsjö 5b2b0b912d configure: Enable the strtod workaround when building for bionic
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-21 19:37:07 +03:00
Martin Storsjö 0b6899f154 configure: msvc: Set the target windows version to XP if no target is set
MSVC 2010 (or more precisely, Windows SDK 7.0 which comes with MSVC
2010) sets _WIN32_WINNT to the constant for Windows 7 if nothing is
set. This could lead to the libav configure script detecting and
using functions only present in Windows 7 or newer, which in most
cases isn't desired. If the caller explicitly wants this, the caller
can add the _WIN32_WINNT define via --extra-cflags, setting the desired
version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-19 18:22:32 +03:00
Luca Barbato edfe609fc9 configure: Add basic valgrind-massif support
With the parameter --toolchain valgrind-massif, the configure
script sets reasonable defaults that can be overridden as explained
in the documentation.
2013-05-18 21:29:17 +02:00
Kostya Shishkov 1232a1647a Apple Intermediate Codec decoder 2013-05-17 06:31:05 +02:00
Alex Smith 225a5f91cc configure: Use linker hardening flags on mingw
This makes it consistent with the msvc builds which automatically set
the DEP and ASLR flags by default.  There really is no good reason why
they shouldn't be set.

The fact that binutils does not set them on by default boggles the mind.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 14:42:08 +03:00
Martin Storsjö 05165c2f7a configure: Disable PIC for cygwin just as for win32/mingw
If this is explicitly disabled for win32/mingw, it should also
be disabled for cygwin, for consistency and for the same reasons
as for win32/mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-13 20:20:55 +03:00
Diego Biurrun 2c2c48a9bd configure: x86: Only enable cpunop on i686
The assembler may insert nopl instructions for cpunop, which are not
(universally) supported on i586 CPUs.
2013-05-12 21:23:38 +02:00
Diego Biurrun f54b55058a configure: Rename cmov processor capability to i686
The goal is to make the capapility slightly more general and have it
cover the availability of the nopl instruction in addition to cmov.
2013-05-12 21:23:38 +02:00
Martin Storsjö e08c946c68 configure: Explicitly disable PIC when targeting win32/mingw
These platforms do not have any notion of PIC. On some compilers,
enabling pic produces a number of warnings.

This avoids trying to produce PIC loads in the ARM assembly - there
are no relocation types in PE/COFF that correspond to
BFD_RELOC_32_PCREL (R_ARM_REL32 in ELF).

As a side-effect, this avoids enabling PIC on mingw64, getting rid
of the warnings about PIC not having any effect on that platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-12 19:45:33 +03:00
Martin Storsjö b1803c79dc configure: Use enable_weak when enabling pic
This allows it to be overridden, either by the user on the command
line, or by other sections of the configure script.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-12 19:45:26 +03:00
Martin Storsjö 06122c2533 msvc: Move linker pragma from config.h to libavutil/internal.h
This makes linking succeed for tools that include config.h but
don't link to libavutil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-08 01:28:25 +03:00
Anton Khirnov 9779f93066 configure: add dependencies to lavfi .pc file
The scale filter depends on sws, resample on lavr, and movie on lavf and
lavc.

Fixes Bug 502.
2013-05-07 12:32:14 +02:00
Anton Khirnov bce70f8170 configure: make avconv select (a)trim filters
They are now used for -ss/-t
2013-05-07 12:32:03 +02:00
Martin Storsjö 2cca96e670 configure: Check for getenv
When targeting the "windows store application" (metro) API subset
(or the windows phone API subset), the getenv function isn't
available. If it is unavailable, just define getenv to NULL.

The check uses check_func_headers, since the function actually
might exist in the libraries, but is hidden in the headers.

The fallback is in config.h since msvc can't do -D defines with
parameters on the command line, and it's used both within the
libraries and the frontend applications (so a libavutil internal
header wouldn't be enough).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-04 23:58:59 +03:00
Reinhard Tartler b1ee8eec84 configure: Add basic valgrind-memcheck support
With the parameter --valgrind-memcheck, the configure script sets
reasonable defaults that can be overridden as explained in the
documentation.

The idea of using set_defaults is from Luca Barbato.
2013-05-04 12:17:51 +02:00
Martin Storsjö 769d921f3e compat: msvc: Make sure the object files are included when linking statically
If building libav with -MD in the cflags (for making the MSVC compiler
generate code for using a dynamically linked libc), the system headers
that declare strtod, snprintf and vsnprintf declare the functions as
imported from a DLL. To hook up wrappers of our own for these functions,
the function names are defined to avpriv_*, so that the calling code
within libav calls the wrappers instead. Since these functions
are declared to be imported from DLLs, the calling code expects to
load them from DLL import function pointers (creating references to
_imp__avpriv_strtod instead of directly to avpriv_strtod). If the
libav libraries are not built as DLLs, no such function pointers (as
the calling code expects) are created.

The linker can fix this up automatically in some cases (producing
warnings LNK4217 and LNK4049), if the object files are already
included. By telling the linker to try to include those symbols
(without the _imp prefix as the calling code ends up using),
we get the object files included, so that the linker can do the
automatic fixup. This is done via config.h, so that all (or at least
most) of the object files in our libraries force including the compat
files, to make sure they are included regardless of what files from our
static libraries actually are included.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-03 13:34:34 +03:00
Martin Storsjö ffb068ce8e configure: Don't do enable_deep_weak on disabled variables
This avoids cases where configure tries to weakly enable an item
which actually is disabled, ending up still enabling dependencies
of the item which itself is only enabled weakly.

More concretely, the h264 decoder suggests error resilience, which
is then enabled weakly (unless manually disabled). Previously,
dsputil, which is a dependency of error resilience, was enabled
even if error resilience wasn't enabled in the end.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-02 22:31:57 +03:00
Martin Storsjö 4d810ad2e9 configure: Use a different variable name in push/popvar
The variable name 'var' is commonly used to iterate through arguments
in other functions. When the pushvar function internally uses the
variable 'var', it makes pushing/popping the variable 'var' not
work as intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-02 22:31:55 +03:00
Ronald S. Bultje 28bc406c84 mjpeg: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:38 +03:00
Ronald S. Bultje 1277dc07fb svq1enc: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:32 +03:00
Ronald S. Bultje 2f6bc5f7c1 svq3: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:27 +03:00
Ronald S. Bultje f4fed5a2f9 mpegvideo: Use hpeldsp instead of dsputil for half-pel functions
This also converts vc1, since that is mpegvideo-based.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:21 +03:00
Ronald S. Bultje 6caa44aa7d svq1: Use hpeldsp instead of dsputil for half-pel functions
This makes svq1 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:14 +03:00
Ronald S. Bultje c10470035e mimic: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:08 +03:00
Ronald S. Bultje 8071264f21 interplayvideo: Use hpeldsp instead of dsputil for half-pel functions
This makes interplayvideo independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:18:02 +03:00
Ronald S. Bultje 0f0a11d576 bink: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:56 +03:00
Ronald S. Bultje 8f992dc8c7 indeo3: Use hpeldsp instead of dsputil for half-pel functions
This makes the Indeo 3 decoder independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:50 +03:00
Ronald S. Bultje cb7ecb7563 vp56: Use hpeldsp instead of dsputil for half-pel functions
This makes vp5 and vp6 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:33 +03:00
Ronald S. Bultje 3bd062bf7f vp3: Use hpeldsp instead of dsputil for half-pel functions
This makes vp3 independent of dsputil.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:26 +03:00
Ronald S. Bultje 68d8238cca hpeldsp: Add half-pel functions (currently copies of dsputil)
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-19 23:17:17 +03:00
Vittorio Giovara 3fce136798 lavfi: new interlace filter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-04-11 21:33:07 +02:00
Anton Khirnov 93e65e9a6c Cosmetics, restore alphabetic order in atomics lists. 2013-04-11 12:31:14 +02:00
Ronald S. Bultje b93b27edb0 dsputil: Make dsputil selectable
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:04:05 +03:00
Reinhard Tartler a862c7d336 Integrate lcov/gcov into Libav
The gcov/lcov are a common toolchain for visualizing code coverage with
the GNU/Toolchain. The documentation and implementation of this
integration was heavily inspired from the blog entry by Mike Melanson:
http://multimedia.cx/eggs/using-lcov-with-ffmpeg/
2013-04-05 18:55:11 +02:00
Luca Barbato 19f251a288 clang: use -fsantize=address and -fsanitize=thread
The previous syntax is deprecated.
2013-04-03 12:23:43 +02:00
Martin Storsjö 817dff578f configure: Check for the atomic.h functions used in the suncc atomics header
The "suncc" atomics implementation uses a suncc specific memory
barrier, but also relies on a few atomic functions from atomic.h,
that are not suncc specific but specific to solaris. This made
the current implementation fail on suncc on linux.
2013-04-03 09:23:04 +02:00
Anton Khirnov f9f6402e9c configure: prettify atomics handling.
Add simpler names and a shorthand for native atomics (as opposed to
pthreads fallback).
2013-04-03 09:22:31 +02:00
Martin Storsjö cfe5908a72 configure: Add error_resilience as dependency to the eatqi decoder
This makes standalone compilation of the eatqi decoder
succeed. The dependency comes from the shared mpeg12dec.o file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 17:37:15 +02:00
Janne Grunau d767e2f969 configure: fix dependencies of XvMC and old vdpau mpeg2 decoders 2013-03-26 22:53:18 +01:00
Martin Storsjö 2ece5bf3ec configure: Remove a stray msmpeg4v1 encoder declaration
No such encoder exists currently.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 16:17:00 +02:00
Martin Storsjö 3b2d0ec473 configure: Remove the mpegvideo dependency from svq1
The svq1 decoder can be built standalone without mpegvideo.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 15:50:00 +02:00
Ronald S. Bultje 0b499c9b06 h264: Make it possible to compile without error_resilience
Error resilience is enabled by the h264 decoder, unless explicitly
disabled. --disable-everything --enable-decoder=h264 will produce
a h264 decoder with error resilience enabled, while
--disable-everything --enable-decoder=h264 --disable-error-resilience
will produce a h264 decoder with error resilience disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:55:05 +02:00
Martin Storsjö 75644335b9 lavc: Move start code finding to utils.c
This allows dropping the mpegvideo dependency from a number of
components.

This also fixes standalone building of the h264 parser, which
was broken in 64e438697.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:48:12 +02:00
Diego Biurrun 2e2ec66741 configure: Enable hwaccels without external dependencies by default. 2013-03-21 14:19:03 +01:00
Vittorio Giovara 2eaa3663fd avplay: enable only when SDL 1.2 is found
SDL 2 is API incompatible.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-09 14:33:54 +01:00
Martin Storsjö e460aa3282 atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
Not all gcc configurations have an implementation of all the atomic
operations, and some gcc configurations have some atomic builtins
implemented but not all.

Thus check for the most essential function, whose presence should
indicate that all others are present as well, since it can be used
to implement all the other ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-08 14:55:08 +02:00
Ronald S. Bultje 65f1d45dcc lavu: add support for atomic operations.
These could be used for reference counting, or for keeping track of
decoding progress in references in multithreaded decoders.

Support is provided by gcc/msvc/suncc intrinsics, with a fallback using
pthread mutexes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-08 07:32:36 +01:00
Diego Biurrun 870add0de9 configure: Add missing videodsp dependencies to some decoders 2013-03-07 15:36:56 +01:00
Diego Biurrun bcd0a7137e configure: Add missing h264chroma dependencies to vp5, vp6 2013-03-07 15:33:41 +01:00
Diego Biurrun 06b54e8425 build: Fix error_resilience code dependencies 2013-03-07 15:04:49 +01:00
Ronald S. Bultje 64e4386974 h264: Integrate draw_horiz_band into ff_h264_draw_horiz_band
This makes the decoder independent of mpegvideo.

This copy of the draw_horiz_band code is simplified compared to
the "generic" mpegvideo one which still has a number of special
cases for different codecs.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 09:31:44 +02:00
Carl Eugen Hoyos 5da5128493 cavs: Add a dependency on h264chroma
This fixes standalone building of this decoder.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-06 21:55:51 +02:00
Diego Biurrun 2a7ab2dfaa configure: Use check_builtin() where appropriate 2013-03-05 11:04:37 +01:00
Diego Biurrun 9c7d85b3b4 configure: Add check_builtin convenience function 2013-03-05 11:04:37 +01:00
Diego Biurrun f868b24d0f configure: Add sanitize_var_name convenience function
This is useful in all the places where special characters in
variable names are manually translated to underscores.
2013-03-05 11:04:37 +01:00
Diego Biurrun 813b82b927 configure: Fix silly typo in logging command of check_struct() 2013-03-05 11:04:37 +01:00
Diego Biurrun 3a02b6884c configure: icc: Drop nonsense adding of cpuflags to LDFLAGS
This fixes many icc warnings when not setting the CPU type.
2013-02-26 00:51:34 +01:00
Diego Biurrun b2d688ea9f configure: Identify icc compiler with a less ambiguous pattern 2013-02-25 18:15:41 +01:00
Diego Biurrun b58b00aeca configure: Separate "ln" command line arguments
This is more compatible and not more complicated.
2013-02-25 18:15:17 +01:00
Mans Rullgard 04cccb5fc1 configure: List external libs used using print_enabled()
This cuts some lines from the script as well as the output and
simplifies maintenance.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2013-02-24 00:19:36 +01:00
Mans Rullgard 3fc09b0081 configure: Move list of external libs to a separate variable
Signed-off-by: Mans Rullgard <mans@mansr.com>
2013-02-24 00:19:36 +01:00
Diego Biurrun 45235ac488 configure: Move x11grab option to a more suitable place in the help output 2013-02-24 00:19:36 +01:00
Diego Biurrun 82ca17ac7a configure: Fix vaapi/vda/vdpau dependency declarations 2013-02-23 21:08:40 +01:00
Diego Biurrun 215cdd35ef configure: Refactor dxva2api.h dependency declarations 2013-02-23 21:08:40 +01:00
Diego Biurrun 4cc4b33f71 build: Add proper infrastructure for adding and checking host CPPFLAGS 2013-02-23 20:23:45 +01:00
Diego Biurrun 2aac411fd4 configure: Simplify VDPAU header check 2013-02-23 20:13:48 +01:00
Diego Biurrun 9840130edf configure: Simplify VDA header and extralibs check 2013-02-23 20:13:48 +01:00
Mans Rullgard 0a8da1a3e5 configure: Do not redundantly list enabled hwaccel libs
The enabled hwaccels are listed later anyway.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2013-02-23 20:13:47 +01:00
Diego Biurrun 7432e87206 configure: Add print_3_columns helper function and use where appropriate 2013-02-23 20:13:47 +01:00
Luca Barbato aa11cb7931 build: make audio_frame_queue a stand-alone component
Encoders requiring it have the dependency expressed in the
configure.
2013-02-17 22:05:18 +01:00
Diego Biurrun 759a3a2177 configure: Move MinGW CPPFLAGS setting to libc section, where it belongs 2013-02-14 17:37:42 +01:00
Diego Biurrun 69dca3a4f4 openbsd: Add minor number to shared library install name
This is what the OpenBSD porter's manual describes as correct, cf.
http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs
2013-02-11 20:17:15 +01:00
Diego Biurrun 304b806cb5 build: Make library minor version visible in the Makefile
This allows employing that number in library install commands.
2013-02-11 20:17:15 +01:00
Diego Biurrun 79dad2a932 dsputil: Separate h264chroma 2013-02-06 11:30:53 +01:00
Diego Biurrun 70b348ec5b configure: Group all hwaccels together in a separate variable 2013-02-05 17:01:06 +01:00
Diego Biurrun 197252f1c5 configure: Add a comment indicating why uclibc is checked before glibc 2013-01-31 11:19:23 +01:00
Diego Biurrun 29f1fa7422 configure: Move newlib libc check before mingw libc check
On Cygwin systems MinGW headers can be present if the corresponding
packages have been installed. Since the MinGW libc is checked for
first, this results in newlib getting misdetected as MinGW libc.
2013-01-31 11:19:23 +01:00
Diego Biurrun 2c10e2a2f6 build: Make the H.264 parser select h264qpel
It is required for building the shared H.264 code.
2013-01-24 19:25:21 +01:00
Diego Biurrun 528878ee7b openbsd: configure: Stop enabling PIC by default
Previously PIC was enabled as a magic workaround for binaries that
built fine, but failed to function at all.  This problem no longer
exists, possibly since the introduction of symbol versioning.
2013-01-24 10:39:17 +01:00
Brad Smith c7df1532e5 libgsm: detect libgsm header path
Libgsm header can reside either in the base include dir or in
the gsm subdir.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-21 07:59:35 +01:00
Sean McGovern 6d1114a806 configure: Run SHFLAGS through ldflags_filter()
These flags are as linker-specific as other LDFLAGS and thus
need to be translated to the correct linker syntax.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-18 19:10:29 +01:00
Luca Barbato 43e0e0c4e5 libcdio: support recent cdio-paranoia
Upstream decided to split the paranoia interface and move the headers
accordingly.
2013-01-17 21:41:18 +01:00
Martin Storsjö 0eecafc948 configure: Make the new srtp protocol depend on the rtp protocol
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:08 +02:00
Diego Biurrun 99853cb8d4 configure: Make warnings from -Wreturn-type fatal errors
These warnings have no false positives and point to serious bugs.
2013-01-14 22:49:44 +01:00
Sean McGovern 5e753ed502 suncc: Replace more GCC flags by their equivalents in suncc_flags()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-14 20:53:06 +01:00
Luca Barbato 3f111804eb libvpx: make vp8 and vp9 selectable
Support older libvpx versions.
2013-01-14 19:20:47 +01:00
Rémi Denis-Courmont 7752532789 vdpau: Add VC-1 decoding via hwaccel infrastructure
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:18 +01:00
Rémi Denis-Courmont 51b56a0716 vdpau: Add H.264 decoding via hwaccel infrastructure
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:08 +01:00
Rémi Denis-Courmont 200e8ac920 vdpau: Add MPEG-4 decoding via hwaccel infrastructure
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:54:02 +01:00
Rémi Denis-Courmont aaf9d0e8f3 vdpau: Add MPEG-1/2 decoding via hwaccel infrastructure
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:53:47 +01:00
Marcin Juszkiewicz d11cb13b0e configure: enable pic for shared libs on AArch64
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-11 11:01:05 +02:00
Diego Biurrun a0c5917f86 Drop Snow codec
Snow is a toy codec with no real-world use and horrible code.
2013-01-06 16:30:02 +01:00
Hendrik Leppkes 506409776c configure: suppress -fPIC in msvc builds
MSVC doesn't understand the option, and emits a warning on every
call to cl.exe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-31 12:34:30 +02:00
Diego Biurrun 5ad2f0bfb2 build: Add rtpenc_chain extra config option
Also fixes linking in various configs with only individual parts enabled
because the RTP muxer chaining code depends on the general RTP code,
which is now accounted for.
2012-12-28 19:18:13 +01:00
Diego Biurrun 844c68520e configure: Add --disable-all command line option
This option disables all programs, libraries and other parts of Libav
that get built as part of the compilation process.
2012-12-28 19:17:02 +01:00
Diego Biurrun ed40b6bf07 configure: cosmetics: Separate hwaccel dependencies from decoders/encoders
Also move mpegvideo_select statement to the correct position.
2012-12-23 18:51:52 +01:00
Diego Biurrun 0a0e340f5b configure: Make avconv depend on null, anull and resample filters
Building avconv without that functionality makes little sense.
2012-12-21 00:21:53 +01:00
Diego Biurrun 511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Ronald S. Bultje 8c53d39e7f lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-20 13:40:45 +01:00
Diego Biurrun ea061af15a configure: formatting cosmetics 2012-12-18 13:36:50 +01:00
Mans Rullgard d4f8cecc86 configure: fix automatic processing of _extralibs in check_deps
This fixes the automatic use of $foo_extralibs when feature foo
is enabled indirectly through a _select or _suggest.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-09 21:20:58 +00:00
Diego Biurrun 998c1ee10c configure: Have protocols select network code instead of depending on it 2012-12-09 14:56:12 +01:00
Paul B Mahol 57231e4d5b tak: demuxer, parser, and decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Mans Rullgard b57c1da81e arm: detect cpu features at runtime on Linux
This allows compiling optimised functions for features not enabled
in the core build and selecting these at runtime if the system has
the necessary support.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard b326755989 arm: rename ARMVFP config symbol to VFP
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard 637606de2d configure: arm: make _inline arch ext symbols depend on inline_asm
This makes --disable-inline-asm work as expected.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard 7f2b3dcabd configure: arm: check inline and external asm support for extensions
This tests instruction set support in both inline and external asm.
If both fail, the base config option is disabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard c6ebc9faa2 configure: add check_insn function
The check_insn function tests an instruction in both inline asm and
standalone assembly, and sets _external/_inline config properties
accordingly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard 7fd90119bb configure: clean up check_inline_asm and check_as functions
The check_inline_asm function should check the actual C compiler,
not the one used for assembly files.  Usually these are the same,
but they might be different, typically when using a compiler other
than gcc.

The check_as should, as its name suggests, test the type of input
the AS command is used with, i.e. a standalond assembly (.S) file.

Finally, check for gnu assembler using the modified check_as as
this reflects actual usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard f0fe245bc3 configure: arm: set fast_clz and fast_unaligned in cpuflags section
These are properties of the targeted core and do not depend on
specific assembly support in the toolchain which if missing will
render the controlling options here disabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard 1234c66a31 configure: arm: detect toolchain default arch version
Probe for the toolchain default architecture version if no --cpu flag
is present or an unknown cpu is specified.  Works with gcc, clang and
armcc.

This allows configuring based on the arch version even if it is not
explicitly specified to configure.  It also causes an explicit -march
flag to be added to CFLAGS and ASFLAGS, which in turn lets us do
proper instruction set tests with the assembler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Mans Rullgard 9ebd45c2d5 configure: do not bypass cpuflags section if --cpu not given
This will allow arch-specific ways of determining the target
variant when none is specified on the command line.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Luca Barbato 1944d532a8 ppc: always use pic for shared libraries
CC: libav-stable@libav.org
2012-12-03 22:53:30 +01:00
Martin Storsjö eb7018d2fc configure: Strip ordinals from mingw generated def files
The def files are used for generating import libraries for
other toolchains (in particular, for generating import libraries
for MSVC for DLLs built with mingw).

The def files produced by mingw/gcc contains ordinals for each
exported function. When MSVC tools generate import libraries
from such a def file, MSVC links to the DLL by the ordinals
instead of linking by name.

Since the def files aren't maintained by hand, the ordinal
numbers are assigned (more or less) randomly and any caller
linking to the libs by ordinals will break as soon as the libraries
export more/fewer functions.

Therefore, strip out the ordinals from the generated def files,
to make users link to the libraries by name.

Callers linking to the DLLs using the gcc provided import library
link by name as they should.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-03 13:39:47 +02:00
Mans Rullgard 66371c2851 configure: arm: detect default thumb state of compiler
This makes configure honour the compiler default if thumb is not
explicitly enabled or disabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-03 11:06:06 +00:00
Diego Biurrun 31f16dc1a1 build: Make the ISMV muxer select the MOV muxer
They share the same code, so building one w/o the other makes no sense.
2012-12-03 01:20:10 +01:00
Mans Rullgard 81dfa21ec9 configure: move arm arch extensions to a separate variable
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-03 00:15:19 +00:00
Diego Biurrun d173ede1b7 configure: avplay now depends on avresample 2012-12-02 23:39:35 +01:00
Mans Rullgard 7e9e7cc236 configure: fix indentation in option parsing loop
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-01 23:16:23 +00:00
Martin Storsjö 3bbe63d1a4 configure: Use headers in the check for _beginthreadex for w32threads
When targeting the metro API subset, this function still exists in
the link libraries, but is excluded from the headers. This makes
sure w32threads is automatically disabled when targeting this API
subset (since not all the necessary functions for it are available).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-30 16:57:02 +02:00
Martin Storsjö 7e6a11bcf7 avutil: Use a configure check to enable windows console functions
Not all versions or API subsets of windows have these functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-30 16:56:57 +02:00
Martin Storsjö 15caccb9be cmdutils: Use a configure check for enabling CommandLineToArgvW
This simplifies the condition to avoid hardcoding the systems
where the function exists. This also simplifies support for
newer Windows API subsets where this function doesn't exist,
such as Windows Phone 8 and the "metro" API subset of Windows 8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-29 18:19:36 +02:00
Martin Storsjö 54fd593a0e configure: Enable avconv filter dependencies automatically
This makes sure minimal configurations such as
"--disable-everything --enable-avconv" will enable the filters
necessary for running avconv, instead of just keeping avconv
disabled (even if the user specified "--enable-avconv").

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-27 17:05:01 +02:00
Diego Biurrun d89f2fa970 configure: Add separate list for libraries and use where appropriate 2012-11-26 22:46:07 +01:00
Sean McGovern f2ce813e37 configure: suncc: Add compiler arch support for Nehalem & Sandy Bridge
GCC does not appear to have a -march= string for Westmere, which is a
bit surprising as it has a few more instructions than a Nehalem, but
a few less than a Sandy Bridge.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-25 14:15:30 +01:00
Mans Rullgard 33db40f8d3 configure: sort cpuflags section by architecture
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:07:23 +00:00
Mans Rullgard 457cc333b4 configure: properly support DEC/Compaq compiler
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:07:11 +00:00
Mans Rullgard c262649291 build: add rules to generate preprocessed source files
This is useful for debugging.  Dependencies for these files are not
generated due to limitations in many compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-23 12:03:32 +00:00
Diego Biurrun 3bd1eacd2a configure: Refactor CPPFLAGS settings for glibc/uclibc
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:18 +00:00
Mans Rullgard 5873b623a9 configure: add basic support for ARM AArch64
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:18 +00:00
Mans Rullgard 8f7b814f54 build: set -U__STRICT_ANSI__ for newlib
This is (erroneously) required to enable various things in the
newlib headers.  As cygwin uses newlib, it is covered by this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-18 12:00:17 +00:00
Mans Rullgard 5af530f5a9 parisc: work around bug in gcc 4.3 and later
A bug in tail call optimisation in gcc 4.3 and later on parisc causes
numerous tests to fail.  Disabling this optimisation gives a working
build.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55023

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-17 17:54:28 +00:00
Martin Storsjö 9eded0fe41 configure: Check for -Werror parameters on clang
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-15 18:22:03 +02:00
Diego Biurrun e28b7553ae configure: Add option to disable all command line programs 2012-11-14 23:03:36 +01:00
Mans Rullgard 7f1fcaf0e6 ppc: do not pass redundant compiler flags
The -mpowerpc64 and -mpowerpc-gfxopt flags are implicitly set by
-mcpu as needed.  Passing them explicitly is redundant and can
conflict with user-supplied flags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-14 13:50:43 +00:00
Mans Rullgard 9eda2a85c6 configure: remove support for -n flag in print_enabled()
This flag is no longer used.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-12 10:30:02 +00:00
Diego Biurrun b8e8a07c6c x86: Require an assembler able to cope with AVX instructions
All modern assemblers have this capability.  Older NASM versions
that lack the capability produce code that crashes at runtime,
so it's better to error out during the build process instead.

CC: libav-stable@libav.org
2012-11-11 20:43:28 +01:00
Anton Khirnov e5e1a06e44 configure: add lavu dependency to lavr/lavfi .pc files 2012-11-11 15:45:18 +01:00
James Zern 12776d5d2a libvpxenc: Allow enabling constrained quality (CQ) mode
The CQ mode was introduced in libvpx 0.9.6.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 00:01:54 +02:00
Mans Rullgard d16c4aebba configure: fix print_config() with broke awks
Some awk versions do not treat the result of unary + on a (numeric)
string as numeric, giving wrong results when used in a boolean context
Using unary - instead is logically equivalent works as expected.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-30 13:33:29 +00:00
Mans Rullgard f454e87923 configure: rewrite print_config() function using awk
This is much faster with slow shells and noticeably faster even
with bash on a fast Linux system.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-30 10:28:25 +00:00
Martin Storsjö 9b500b8f6c avcodec: Add a RFC 3389 comfort noise codec
This isn't too useful as a normal codec, but can be used in
voip style applications. The decoder updates the noise
generator parameters when a packet is given to it for decoding,
but if called with an empty packet, it generates more noise
according to the last parameters.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 22:00:43 +02:00
Mans Rullgard 4cd217c065 configure: detect sparc64 automatically
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 18:24:55 +01:00
Mans Rullgard 1aa07aa21c configure: fix tests for 2-arg math functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-26 22:50:42 +01:00
Mans Rullgard 6aa93689ab configure: sanitise sparc vis check
It is wrong to force -mcpu=ultrasparc when checking for vis.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-26 12:29:03 +01:00
Michael Kostylev eadfb0560a configure: recognise more sparc variants as --cpu argument
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-26 12:29:03 +01:00
Diego Biurrun 2a91ada828 avutil: Make LZO decoder code configure-time selectable 2012-10-25 11:49:49 +02:00
Mans Rullgard a6e9d64977 configure: detect parisc64 automatically
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-24 16:26:51 +01:00
Mans Rullgard 56203596ae configure: detect ppc64 automatically
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-24 16:26:51 +01:00
Mans Rullgard 2acda282eb configure: detect mips64 automatically
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-24 16:26:51 +01:00
Mans Rullgard d4c99513f4 configure: generalise 64-bit test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-24 16:26:51 +01:00
Mans Rullgard 4ebc6a7410 build: Plan 9 support
This adds support for building on Plan 9 x86-32.  The compat/plan9
directory contains these items:

- replacements for the 'head' and 'printf' shell commands
- wrapper for main() to disable FPU exceptions

Larger required changes to the system are described in the
documentation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:01:18 +01:00
Mans Rullgard 80521c1997 build: allow targets to specify extra objects to link with executables
This allows targets to include special objects when linking
executables without including them in (shared) libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:22 +01:00
Mans Rullgard fab0a8b2c6 libm: add fallbacks for various single-precision functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Mans Rullgard c3e73100af network: use getservbyport() only if available
The absence of this function will only give a less informative
string back from our fallback implementation of getnameinfo().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Diego Biurrun 79042ab376 configure: Group math functions into a separate variable
This avoids some duplication when listing and testing for the functions.
2012-10-20 02:34:29 +02:00
Diego Biurrun 4b587848ce configure: Disable Snow decoder and encoder by default
Snow has serious unfixed bugs and no real-world use.
2012-10-19 17:10:10 +02:00
Mans Rullgard 1cd432e167 configure: fix libcdio check
The compiler/linker flags passed to check_lib2 should not be quoted.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-19 01:02:58 +01:00
Martin Storsjö d66c52c2b3 Add support for building shared libraries with MSVC
This requires the makedef perl script by Derek, from the
c89-to-c99 repo. That scripts produces a .def file, listing
the symbols to be exported, based on the gcc version scripts
and the built object files.

To properly load non-function symbols from DLL files, the
data symbol declarations need to have the attribute
__declspec(dllimport) when building the calling code. (On mingw,
the linker can fix this up automatically, which is why it has not
been an issue so far. If this attribute is omitted, linking
actually succeeds, but reads from the table will not produce the
desired results at runtime.)

MSVC seems to manage to link DLLs (and run properly) even if
this attribute is present while building the library itself
(which normally isn't recommended) - other object files in the
same library manage to link to the symbol (with a small warning
at link time, like "warning LNK4049: locally defined symbol
_avpriv_mpa_bitrate_tab imported" - it doesn't seem to be possible
to squelch this warning), and the definition of the tables
themselves produce a warning that can be squelched ("warning C4273:
'avpriv_mpa_bitrate_tab' : inconsistent dll linkage, see previous
definition of 'avpriv_mpa_bitrate_tab').

In this setup, mingw isn't able to link object files that refer to
data symbols with __declspec(dllimport) without those symbols
actually being linked via a DLL (linking avcodec.dll ends up with
errors like "undefined reference to `__imp__avpriv_mpa_freq_tab'").
The dllimport declspec isn't needed at all in mingw, so we simply
choose not to declare it for other compilers than MSVC that requires
it. (If ICL support later requires it, the condition can be extended
later to include both of them.)

This also implies that code that is built to link to a certain
library as a DLL can't link to the same library as a static library.
Therefore, we only allow building either static or shared but not
both at the same time. (That is, static libraries as such can be,
and actually are, built - this is used for linking the test tools to
internal symbols in the libraries - but e.g. libavformat built to
link to libavcodec as a DLL cannot link statically to libavcodec.)

Also, linking to DLLs is slightly different from linking to shared
libraries on other platforms. DLLs use a thing called import
libraries, which is basically a stub library allowing the linker
to know which symbols exist in the DLL and what name the DLL will
have at runtime.

In mingw/gcc, the import library is usually named libfoo.dll.a,
which goes next to a static library named libfoo.a. This allows
gcc to pick the dynamic one, if available, from the normal -lfoo
switches, just as it does for libfoo.a vs libfoo.so on Unix. On
MSVC however, you need to literally specify the name of the import
library instead of the static library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:15 +03:00
Martin Storsjö 53e8cd68b7 configure: Split out msvc as a separate target OS
The name mingw32 as target OS is both misleading, and very little
of the target OS specific settings actually match.

Since the target OS default is set based on uname, the default
(which on MSYS is set to mingw) is overridden by --toolchain=msvc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:12 +03:00
Mans Rullgard 206a070dce fate: list lavfi tests in a makefile
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-17 22:31:18 +01:00
Mans Rullgard 36ac9a16a1 fate: dependencies for seek tests
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-17 22:31:18 +01:00
Mans Rullgard fa26335003 fate: handle lavf test dependencies entirely in make
This makes the lavf tests depend on all codecs and formats they use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-17 22:31:18 +01:00
Derek Buitenhuis c75848cd4c configure: Add support for Tilera processors
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-10-16 18:24:18 -04:00
Mans Rullgard 84e65c763d build: simplify enabling of compat objects
Add a configure function to pull in a compat object and set up
redirects in one operation.  This avoids duplicating conditions
across configure and makefiles.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:19 +01:00
Mans Rullgard 66a1ccd746 configure: simplify argument handling in check_ld
Use the existing filter functions instead of open-coding the
separation of general flags and libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:18 +01:00
Mans Rullgard 4c995fafd8 configure: simplify get_version() function
awk alone can do this, no need for grep.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 17:46:18 +01:00
Luca Barbato 0fbb62a8e6 build: support asan and tsan toolchain shortcuts 2012-10-15 18:25:35 +02:00
Mans Rullgard e98b02de5f configure: check for mprotect
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-15 02:39:49 +01:00
Mans Rullgard b6f8d635f2 build: tms470: work around glibc math.h problems
The glibc definitions of INFINITY and NAN do not work with the
tms470 compiler, nor do our usual fallbacks.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard 5ab432fa35 configure: improve tms470 compiler usage with glibc
Apply flags to work around glibc quirks only if glibc is detected,
and add a few more such flags.

Do not mess with as/ld settings in probe_cc.  This is not the
proper place.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard b5198a2637 configure: tms470: add mapping for -mfpu=vfpv3-d16 flag
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 18:21:36 +01:00
Mans Rullgard 741a8b724e configure: recognise Minix as OS
No special setup is required for Minix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 14:05:55 +01:00
Mans Rullgard ac17ccf73a configure: work around bug in ash shell
The ash 'test' builtin misbehaves if the first operand of a binary
operator looks like a unary operator.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-13 14:05:55 +01:00
Mans Rullgard a77f01c725 configure: use utilities from /usr/xpg4/bin if it exists
Solaris defaults to non-standard utilities (grep, sed, ...) with
proper ones being in /usr/xpg4/bin.  Prefixing PATH with this
directory when it exists ensures we get correct variants.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 23:57:01 +01:00
Diego Biurrun ca411fc1d3 avcodec: Remove broken MMI optimizations
The code fails to compile and is broken beyond repair.
2012-10-12 20:56:54 +02:00
Mans Rullgard fdd666094d build: add support for Tru64 (OSF/1)
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 02:17:54 +01:00
Martin Storsjö 1093383d6c random_seed: Support using CryptGenRandom on windows
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 18:49:34 +03:00
Diego Biurrun a75b9a1804 mingw/cygwin: Stop adding -fno-common to gcc CFLAGS
This was done to work around toolchain bugs that have long been fixed.
2012-10-09 11:39:26 +02:00
Mans Rullgard 643933f51d build: add LTO support for PGI compiler
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-08 22:30:41 +01:00