Commit Graph

1944 Commits

Author SHA1 Message Date
Ronald S. Bultje 358d854df8 x86/cpu: implement get/set_eflags using intrinsics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-10 14:33:32 +03:00
Ronald S. Bultje c0ee695bd7 x86/cpu: implement support for cpuid through intrinsics
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-10 14:33:24 +03:00
Ronald S. Bultje 3f150ffba3 x86/cpu: implement support for xgetbv through intrinsics
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-10 14:33:17 +03:00
Ronald S. Bultje f80ddd5bf7 lavu: use intrinsics for emms on systems lacking inline asm support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-10 14:33:09 +03:00
Diego Biurrun 8e85ba8d13 configure: Change the rdtsc check to a linker check
A compile-only test could succeed with an implicit function declaration.
Also move the check to the x86 section; rdtsc is x86-only.
2012-07-09 12:50:06 +02:00
Ronald S. Bultje 07b287020c x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME). 2012-07-07 13:35:07 -07:00
Mans Rullgard 5adc829eb0 configure: add functions for testing code fragments
This simplifies testing arbitrary code fragments within a function
body.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-06 19:22:08 +02:00
Diego Biurrun 112971af26 configure: simplify get_version()
All libs have version headers now, which allows hardcoding the path.
2012-07-04 15:10:08 +02:00
Diego Biurrun 86ab7b0f2f Create version.h headers for libraries that lack them 2012-07-04 15:10:06 +02:00
Mans Rullgard 06eb4f0885 configure: do not disable av_always_inline with --enable-small
Currently, --enable-small turns av_always_inline into plain inline,
which is more or less ignored by the compiler.  While the intent of
this is probably to reduce code size by avoiding some inlining, it
has more far-reaching effects.

We use av_always_inline in two situations:

1. The body of a function is smaller than the call overhead.
   Instances of these are abundant in libavutil, the bswap.h
   functions being good examples.

2. The function is a template relying on constant propagation
   through inlined calls for sane code generation.  These are
   often found in motion compensation code.

Both of these types of functions should be inlined even if targeting
small code size.

Although GCC has heuristics for detecting the first of these types,
it is not always reliable, especially when the function uses inline
assembler, which is often the reason for having those functions in
the first place, so making it explicit is generally a good idea.

The size increase from inlining template-type functions is usually
much smaller than it seems due to different branches being mutually
exclusive between the different invocations.  The dead branches can,
however, only be removed after inlining and constant propagation have
been performed, which means the initial cost estimate for inlining
these is much higher than is actually the case, resulting in GCC
often making bad choices if left to its own devices.

Furthermore, the GCC inliner limits how much it allows a function to
grow due to automatic inlining of calls, and this appears to not take
call overhead into account.  When nested inlining is used, the limit
may be hit before the innermost level is reached.  In some cases, this
has prevented inlining of type 1 functions as defined above, resulting
in significant performance loss.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-03 16:10:54 +01:00
Martin Storsjö cdee08e365 network: Check for struct pollfd
We need to include winsock2.h here, to make sure we have the
real pollfd struct definition, if one exists, before defining the
fallback poll function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:18:06 +03:00
Ronald S. Bultje 3b1ab197be file: Only include unistd.h if it exists
It is included for the open/read/write/close functions. On
MSVC, where this header does not exist, the same functions
are provided by io.h, which is already included.

On windows, these functions are provided by io.h. Make sure
io.h is included if it exists, regardless of the setmode
function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-29 15:53:41 +03:00
Martin Storsjö 75d339e044 udp: Support IGMPv3 source specific multicast and source blocking
Based on an original patch by Stephen D'Angelo <SDAngelo@evertz.com>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:39:00 +03:00
Ronald S. Bultje fa84506177 dxva2: include dxva.h if found
Apparently, some build environments require dxva.h even for dxva2,
while others lack this header entirely.  Including it conditionally
allows building in both cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:36:27 +03:00
Martin Storsjö 46df708b45 libm: Provide fallback definitions for isnan() and isinf()
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:04:02 +03:00
Mans Rullgard 153335625c libm: provide fallback definition for cbrtf() using powf()
This adds a fallback for cbrtf() using powf(x, 1/3).  Since
powf() with a non-integer exponent requires a non-negative
base, special handling of negative inputs is needed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-26 15:56:38 +01:00
Ronald S. Bultje e64bceeac0 configure: Check for sys/time.h
Apparently this include is needed on some systems for building the
poll fallback (for the timeval struct for select?), but it isn't
available on all systems. Thus only include it if it exists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-26 17:22:21 +03:00
Mans Rullgard d3d3a32c9d lavu: add av_usleep() function
This function implements a delay using the first available
of the following functions:

- nanosleep()
- usleep()
- Sleep() (Windows)

The conditional #includes in time.c are simplified by including
unistd.h and windows.h whenever they are available rather than
having these lines triggered by specific functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:18 +01:00
Mans Rullgard 542920b7f6 configure: check for unistd.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 22:54:05 +01:00
Janne Grunau 1d01fee980 fix hardcoded tables compililation caused by missing math constants
Add -D_XOPEN_SOURCE=600 to host cflags to make the constants in math.h
available. Include math.h where necessary and remove redundant M_PI
defines.
2012-06-21 18:05:40 +02:00
Mans Rullgard 61183b5ab4 av_gettime: support Win32 without gettimeofday()
Based on patch by Ronald S. Bultje.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Ronald S. Bultje be1a839ca6 mem: add support for _aligned_malloc() as found on Windows
The check uses check_func_header, since this function is
conditionally available depending on the targeted MSVCRT
version.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 10:08:00 +03:00
Martin Storsjö 3641b0489c Add support for iLBC decoding/encoding via the external library libilbc
The library is 3-clause BSD licensed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:00:35 +03:00
Martin Storsjö becc3c629b configure: Sort the library listings in the help text alphabetically
Only these three libraries were out of order, the rest was already
neatly sorted.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 11:10:14 +03:00
Samuel Pitoiset 8e50c57dcb RTMPT protocol support
This adds two protocols, but one of them is an internal implementation
detail just used as an abstraction layer/generalization in the code. The
RTMPT protocol implementation uses rtmphttp:// as an alternative to the
tcp:// protocol. This allows moving most of the lower level logic out
from the higher level generic rtmp code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:56:56 +03:00
Anton Khirnov ce03b0881a configure: add all filters hardcoded into avconv to avconv_deps 2012-06-13 13:58:34 +02:00
Anton Khirnov 2f296e39a1 lavfi: allow building without swscale. 2012-06-13 13:57:47 +02:00
Sean McGovern 8772997d10 jack: update to new latency range API as the old one has been deprecated
Fixes Bugzilla #279.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-06-13 10:59:22 +02:00
Kostya Shishkov 19be0f3ca6 iac: add missing dependency 2012-06-10 06:50:10 +02:00
Jindrich Makovicka 2439bd8681 mpegtsenc: Support LATM packetization for AAC
This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:20:41 +03:00
Jindrich Makovicka b1c56eabe8 mpegtsenc: use AVFormatContext for AAC packetization
This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:17:48 +03:00
Anton Khirnov c9cc76290f avconv: extend -r to work on any input stream.
This is done by automatically inserting a setpts filter.
2012-05-29 19:19:17 +02:00
Mans Rullgard 7263cd5544 fate: convert codec-regression.sh to makefile rules
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-29 08:35:41 +01:00
Diego Biurrun db9e00f469 Remove libnut wrapper
libnut is unmaintained and known to be buggy; native NUT code exists.
2012-05-21 08:51:50 +02:00
Diego Biurrun 9309bdfe2c fate: change name of FATE samples location environment variable
FATE_SAMPLES is now used directly by the Makefiles, which induces the test
system to run a test with the value of the environment variable as name.
Renaming the environment variable to LIBAV_SAMPLES avoids this problem.
2012-05-21 08:51:49 +02:00
Anton Khirnov d371e7b988 lavfi: add lavr-based audio resampling filter. 2012-05-12 18:09:28 +02:00
Sean McGovern 779222dbfe configure: Add _XOPEN_SOURCE=600 to Solaris preprocessor flags.
This is needed to expose some networking APIs.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 00:01:44 +02:00
Anton Khirnov ac71230902 lavfi: add video buffer sink, and use it in avtools
Also add the public interface libavfilter/buffersink.h.

Based on a commit by Stefano Sabatini.
2012-05-09 08:59:37 +02:00
Luca Barbato 5699884c2e sctp: Initial tcp-alike sctp support with streams
Signed-off-by: Jordi Ortiz <nenjordi@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-08 16:06:49 -07:00
Anton Khirnov 25b3babe11 lavfi: always enable the scale filter and depend on sws.
The scale filter is used for internal colorspace conversions, so it must
always be present.
2012-05-06 16:22:29 +02:00
Sean McGovern 313f9fbfbb configure: add POWER[5-7] support
Also merge POWER3 and POWER4 configuration together with the additions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-04 13:54:03 +01:00
Ronald S. Bultje 77cfb2563c configure: remove malloc_aligned.
It was to signal that allocations are 16-byte aligned, but AVX requires
32-byte alignment, thus the check is no longer useful (and causes
crashes).
2012-05-02 09:57:12 -07:00
Sean McGovern 3510a13307 configure: add libavresample to rpath
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-26 11:25:23 +01:00
Mans Rullgard 88de5b0a73 build: icc: silence some warnings
This disables the warning "external declaration in primary source file"
which is issued when a prototype for an extern function is found in a
.c file rather than a header file.  We have such prototypes for asm
functions where a separate header file would be pointless.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Justin Ruggles c8af852b97 Add libavresample
This is a new library for audio sample format, channel layout, and sample rate
conversion.
2012-04-24 21:28:27 -04:00
Diego Biurrun a229d6c285 Remove libdirac decoder.
libschroedinger is the preferred way to decode Dirac video.
2012-04-23 09:20:24 +02:00
Mans Rullgard e73ec9216b configure: detect PGI compiler and set suitable flags
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-19 02:02:49 +01:00
Mans Rullgard 6555acad10 configure: escape colons in values written to config.fate
The fields in config.fate are colon-separated so any colons
within the fields should be escaped to prevent confusion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-13 13:22:37 +01:00
Anton Khirnov e06d2dfcde avconv: drop support for building without libavfilter.
Since the mandatory memcpy in vsrc_buffer has been eliminated, there
shouldn't be any significant reason to build without lavfi anymore.

This will make upcoming support for complex filtergraphs easier to do.
2012-04-06 20:21:07 +02:00
Anton Khirnov cfec77aaf8 configure: add dl to frei0r extralibs. 2012-04-05 09:20:03 +02:00