Michael Niedermayer
26474d1098
random_seed: fix digest size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7fe5548531
random_seed: fix out of array read
...
Fixes CID733787
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
1093383d6c
random_seed: Support using CryptGenRandom on windows
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
c9454cb643
av_tempfile: fix leak in error case
...
Fixes CID733796 Part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
492b8ec4c5
av_opt_set_from_string: fix memleak
...
Fixes CID733801
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4e4ae2f82c
sha: change loop condition to be tighter.
...
This makes no change to the way the code functions, but should make
it easier for static analyzers to see the valid range for i
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
1a2c7880aa
averror: make error values proper negative values
...
Fixes stupid mistake in 25227c3a78
.
12 years ago
Janne Grunau
25227c3a78
averror: explicitly define AVERROR_* values
12 years ago
Mans Rullgard
41e46a5fba
parseutils-test: do not print numerical error codes
...
The error codes differ between systems so printing the value makes
the fate test fail on some systems.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
03f5043f5d
eval: Fix eval test with ftrapv
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
89715a3cf1
lavu: fix typo in Makefile
12 years ago
Janne Grunau
ea14a655f7
avutil: skip old_pix_fmts.h since it is just a list
12 years ago
Anton Khirnov
8728b958ff
lavu: fix typo in Makefile
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
78071a1420
pixfmt: add AV_ prefixes to PIX_FMT_*
12 years ago
Michael Niedermayer
43bbc3f477
xtea: give constants the correct type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
6221e2478c
parseutils: fix parsing of invalid alpha values
...
An alpha specifier outside the valid range results in a conversion from
double to long with undefined result. Range-checking the double and
only converting it after it passes avoids this.
Fixes fate-parseutils errors on some systems.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
24702a91e4
pca: get rid of VLA
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
e4cbf7529b
Give all anonymously typedeffed structs in headers a name
...
Anonymous structs cannot be forward declared and have no benefit.
12 years ago
Diego Biurrun
c010fce6c9
parseutils-test: Drop random colors from parsing test
...
This guarantees stable output for comparing test results.
12 years ago
Diego Biurrun
a7329e5fc2
x86: get_cpu_flags: add necessary ifdefs around function body
...
ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined
elsewhere in the file. Surrounding the function body with ifdefs allows
building even when cpuid is not defined. An empty cpuflags mask is
returned in this case.
12 years ago
Diego Biurrun
f6fbce761e
x86: Drop CPU detection intrinsics
...
Now that there is CPU detection in YASM, there will always be one of
inline or external assembly enabled, which obviates the need to fall
back on CPU detection through compiler intrinsics.
12 years ago
Diego Biurrun
1f6d86991f
x86: Add YASM implementations of cpuid and xgetbv from x264
...
This allows detecting CPU features with builds that have neither
gcc inline assembly nor the right compiler intrinsics enabled.
12 years ago
Diego Biurrun
54b243141e
x86: cpu: Break out test for cpuid capabilities into separate function
12 years ago
Diego Biurrun
cc5e9e5ff0
x86: ff_get_cpu_flags_x86(): Avoid a pointless variable indirection
12 years ago
Anton Khirnov
cd15b7c03d
samplefmt: make av_samples_alloc() initialize the data to silence.
...
Right now the buffer is zeroed, which does not represent silence for U8(P).
12 years ago
Michael Niedermayer
f0fce9f33e
xtea: Test inplace decryption
...
Based on test code by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
b434500431
xtea: Fix CBC decryption when src==dst
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
ca074cc313
xtea: Factorize testing into a separate function
...
Based on a patch by Michael Niedermayer.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Mans Rullgard
05e209c04c
Allow use of strncpy()
...
There are cases where strncpy() does exactly what is required.
A blanket ban forces more convoluted solutions to be used in those
cases and has been a cause of bugs.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Martin Storsjö
75366a504d
blowfish: Add more tests
...
Test inplace ECB, normal CBC and inplace CBC encryption/decryption.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
87f023f2c0
blowfish: Fix CBC decryption with dst==src
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
0cc9a64b92
blowfish: Factorize testing into a separate function
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Mans Rullgard
51a15ed740
ARM: use numeric ID for Tag_ABI_align_preserved
...
Some old assemblers still in use do not support named tags.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
1ca3b62b10
ARM: bswap: drop armcc version of av_bswap16()
...
This function causes several versions of armcc to miscompile code,
and the performance impact is small.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
5e826fd65e
ARM: set Tag_ABI_align_preserved in all asm files
...
All our ARM asm preserves alignment so setting this attribute
in a common location is simpler. This removes numerous warnings
when linking with armcc.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
7bda4ed780
ARM: fix Thumb PIC on Apple
...
LDR with register offset and PC as base register is not available in
the Thumb instruction set so the addition must be done separately.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Clément Bœsch
81bbce9cf3
Move xGA font data from lavc to lavu.
...
This needs to be accessible for libavfilter in the next commit.
12 years ago
Michael Niedermayer
64604e2679
cpu: improve av_get_cpu_flags() doxy
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
11d4e92ed9
avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
12 years ago
Giorgio Vazzana
a8cb21fd62
xtea: fix decryption with --enable-small
...
iv decrypt handling code needs to be executed regardless of CONFIG_SMALL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
48154c2594
xtea: move iv decrypt handling code into xtea_crypt_ecb()
...
this simplifies things are avoids a temporary
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a4dcdd04d7
xtea-test: test inplace decryption
...
Based on test code by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Giorgio Vazzana
8c3ee93be5
xtea: fix CBC mode when src=dst
...
In CBC mode, when src=dst and we are decrypting a block different
from the first one, we need to save the current block of ciphertext
(which will constitute the initialization vector for the next block)
before we overwrite it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a0321dadfd
xtea-test: factorize test code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
e4b1fcd474
lavu/opt: cosmetic fixes forgotten in the previous patch.
12 years ago
Nicolas George
438978fb4b
opt: implement av_opt_set_from_string().
...
It is similar to av_set_options_string() but accepts a list
of options that can be in shorthand: if the key is omitted
on the first fields, the keys from the shorthand list are
assumed, in order.
12 years ago
Derek Buitenhuis
5ae9fa13f5
MinGW: Use our snprintf/vsnprintf when MinGW's is broken
...
All versions of MinGW-w64 prior to version 3, as well as
all versions of MinGW32 have broken implementations of
vsnprintf.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Michael Niedermayer
874b9dcc4b
ppc/cpu: make linux 32bit specific altivec detection depend on __linux__
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
8995d34972
ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code
...
The Apple assembler refuses to assemble the 3-operand form
in Thumb2 even though it is valid syntax.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago