Luca Barbato
f3e5e6f05b
mem: introduce av_malloc_array and av_mallocz_array
...
Both function ease allocating large arrays implementing the overflow
check inside it.
13 years ago
Janne Grunau
2d497c141d
eval: add gt(), gte(), lt() and lte() fate tests
13 years ago
Max Lazarov
caac3ab6ef
eval: fix swapping of lt() and lte()
...
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
375c0f74d1
av_samples_copy: support overlapping copies
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
183b1c2268
configure: Check for the math function rint
...
Add a fallback implementation if it doesn't exist.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
dd0a9b78db
replace all __volatile__ by volatile
...
__volatile__ can cause problems with some compilers and volatile is a standard keyword.
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
5a9d6993cb
parseutils: ignore digits below the microsecond.
...
Accept 1.1234567 as simply 1.123456 instead of rejecting it.
The rounding is towards 0, which is acceptable and much simpler.
13 years ago
Mans Rullgard
e346176de9
x86: cpu: clean up check for cpuid instruction support
...
This adds macros for accessing the EFLAGS register and uses
these instead of coding the entire check in inline asm.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
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>
13 years ago
Ronald S. Bultje
c0ee695bd7
x86/cpu: implement support for cpuid through intrinsics
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Ronald S. Bultje
3f150ffba3
x86/cpu: implement support for xgetbv through intrinsics
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
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>
13 years ago
Martin Storsjö
620b1e7e98
mem: Don't abort on av_malloc(0) in debug mode
...
This makes the behaviour consistent between debug and release mode.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Clément Bœsch
7073174551
x86inc: put basicnop under ifdef to prevent compile failure.
...
This should fix the NASM box.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
07b287020c
x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME).
13 years ago
Michael Niedermayer
dc12f7d4ec
x86inc: try to put amdnop under ifdef to prevent compile failure
...
based on similar amdnop usage in ffmpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
50bfd547b9
log: fix compilation failure on mingw due to reference to undefined set_color256
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
1842b27564
lavu: 256 color support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Lou Logan
b22ecbc6a5
cosmetics: various spelling fixes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ec08676232
Blowfish: restructure/simplify code a bit.
...
Very slightly faster (2% or so)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Loren Merritt
4d4752366f
x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Loren Merritt
2cd1f5cadc
x86inc: modify ALIGN to not generate long nops on i586
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Samuel Pitoiset
983db9b2b4
xtea: Make the count parameter match the documentation
...
Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
e4a7fb3da3
blowfish: Make the count parameter match the documentation
...
Previously it was interpreted as number of bytes, while the
documentation stated that it was the number of 8 byte blocks.
This makes it behave similarly to the existing AES code.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Luca Barbato
f6687bf5f8
xtea: invert branch and loop precedence
...
Should slightly improve performance depending on the compiler used.
13 years ago
Luca Barbato
669bbedfa8
blowfish: invert branch and loop precedence
...
Should slightly improve performance depending on the compiler used.
13 years ago
Carl Eugen Hoyos
b5baad3a4c
Install libavutil/version.h
...
Fixes ticket #1513
13 years ago
Michael Niedermayer
1f29504204
blowfish.h: include author attribution
...
Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0713c38ea3
xtea.h: include author attribution
...
Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
7beeea8f17
error: define AVERROR_EXTERNAL.
...
This code is intended for errors in external libraries
when no corresponding error code can be found.
AVERROR_UNKNOWN is too vague for that and looks like AVERROR_BUG.
13 years ago
Nicolas George
aa39516a04
error: define AVERROR_BUFFER_TOO_SMALL.
...
Some API require a buffer and return a specific error
if it is too small. This error code helps to map codes.
13 years ago
Diego Biurrun
2047e40e6e
Clarify Doxygen comment for FF_API_* #defines.
13 years ago
Diego Biurrun
86ab7b0f2f
Create version.h headers for libraries that lack them
13 years ago
Samuel Pitoiset
8c14f7a593
Add XTEA encryption support in libavutil
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Samuel Pitoiset
bc3dbcc8e5
Add Blowfish encryption support in libavutil
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
143f1e9203
eval: Add the isinf() function and tests for it
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
e9757066e1
libavutil: add 12 and 14 bit planar colorspaces
...
Reviewed-by: Jean First <jeanfirst@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
1a068bfefd
cosmetics: Consistently use C-style comments with multiple inclusion guards
13 years ago
Reinhard Tartler
22662ca560
attributes: add av_noreturn
...
Also use it in the declaration of the various exit_program
implementations in avtools.
inspired by a clang-scan report.
13 years ago
Reinhard Tartler
a1641e9540
attributes: drop pointless define guards
...
the av_-prefixed attributes must not be defined outside of this file
13 years ago
Clément Bœsch
7c84e7d337
mem: heap memory poisoning.
...
Enable it by default with FATE.
limitation: not random, and not supported with realloc.
13 years ago
Ronald S. Bultje
ff8f8dfb79
intfloat: Don't use designated initializers in the public headers
...
intfloat.h is a public header, and is now (since a1245d5ca
) included
by mathematics.h, which many external callers include.
This fixes building third party applications that include
mathematics.h in a language that doesn't support designated
initalizers.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
3893feeccd
opt/eval: Include mathematics.h for NAN/INFINITY
...
These files use NAN/INFINITY but didn't include mathematics.h to get
the fallback definitions if the system lacks the macros.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Ronald S. Bultje
a1245d5ca1
mathematics: Don't use division by zero in NAN/INFINITY macros
...
Some compilers, MSVC among them, don't recognize the divisions by
zero as meaning infinity/nan.
These macros should, according to the standard, expand to constant
expressions, but this shouldn't matter for our usage.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
889c1ec4cc
x86: cpu: clean up check for cpuid instruction support
...
This adds macros for accessing the EFLAGS register and uses
these instead of coding the entire check in inline asm.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
62634158b7
ARM: generate position independent code to access data symbols
...
This creates proper position independent code when accessing
data symbols if CONFIG_PIC is set.
References to external symbols should now use the movrelx macro.
Some additional code changes are required since this macro may
need a register to hold the GOT pointer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Ronald S. Bultje
4f2c846d96
attributes: Add a definition of av_always_inline for MSVC
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Ronald S. Bultje
f985113075
random_seed: Only read /dev/*random if we have unistd.h
...
unistd.h is used for open/read/close, but if this header does not
exist, there's probably no use in trying to open /dev/*random
at all.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
491846e4be
avutil: fix project name reference in doxy section
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c496224374
pixdesc: fix project reference in comment
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago