James Almer
a876958d0f
avutil/md5: fix misaligned reads
...
This makes ubsan happy and also considerably increases performance on
big endian systems.
Tested on an IBM POWER7 3.55 GHz
Before:
2.24user 0.14system 0:02.39elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
2.26user 0.11system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k
2.23user 0.15system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
2.25user 0.12system 0:02.38elapsed 100%CPU (0avgtext+0avgdata 2624maxresident)k
2.20user 0.15system 0:02.36elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
After:
1.86user 0.13system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.89user 0.11system 0:02.01elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.85user 0.14system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.84user 0.15system 0:01.99elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k
1.89user 0.13system 0:02.02elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k
Tested-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
8 years ago
Diego Biurrun
e435beb1ea
crypto: consistently use size_t as type for length parameters
...
size_t is the correct type to use for sizes.
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
d12b5b2f13
build: Split test programs off into separate files
...
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
9 years ago
Diego Biurrun
3b08d9d932
testprogs: K&R formatting cosmetics
9 years ago
Vittorio Giovara
2f9b652e8c
lavu: Drop deprecated context size variables
...
Deprecated in 10/2012.
9 years ago
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
12 years ago
Martin Storsjö
9a92aea27b
avutil: Add functions for allocating opaque contexts for algorithms
...
The current API where the plain size is exposed is not of much
use - in most cases it is allocated dynamically anyway.
If allocated e.g. on the stack via an uint8_t array, there's no
guarantee that the struct's members are aligned properly (unless
the array is overallocated and the opaque pointer within it
manually aligned to some unspecified alignment).
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Mans Rullgard
82494cad9d
md5: cosmetics
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
fa49fc72d9
md5: use AV_WL32 to write result
...
This is simpler, safer, and removes the undocumented requirement of
aligned output buffer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
44496ff2d6
md5: include correct headers
...
This file needs stdint.h but not string.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
edf4dbff33
md5: fix test program
...
This makes the md5-test program print something meaningful and not
smash the stack.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Måns Rullgård
8fc0162ac4
Add av_ prefix to bswap macros
...
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
e6b22522c9
bswap: change ME to NE in macro names
...
Other parts of FFmpeg use NE (native endian) rather than ME (machine).
This makes it consistent.
Originally committed as revision 24169 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
2ed6f39944
Replace many includes of libavutil/common.h with what is actually needed
...
This reduces the number of false dependencies on header files and
speeds up compilation.
Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
63613fe615
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
...
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
89c9ff504b
spelling/grammar/consistency review part I
...
Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Aurelien Jacobs
b250f9c66d
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
...
They are now always defined to either 0 or 1.
Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
e503674c4a
Add necessary, remove unnecessary #includes.
...
Originally committed as revision 16547 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
53e9d0105f
Fix generated md5, it was wrong for some input lengths.
...
Fix issue634.
Originally committed as revision 15335 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
59abc29e69
fixing warning
...
md5.c:150: warning: passing argument 2 of 'av_md5_update' from incompatible pointer type
Originally committed as revision 11665 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
f3635240b7
Fix a couple of 'return type defaults to int' and 'control reaches end of
...
non-void function' warnings in test code.
Originally committed as revision 11491 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
f8a80fd69d
main() --> main(void)
...
Originally committed as revision 11079 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Diego Biurrun
7b94177e37
Group all copyright and author notices together.
...
Originally committed as revision 9483 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Carl Eugen Hoyos
154e30f6c2
rename attribute_unused to av_unused and moves its declaration to common.h
...
patch by Carl Eugen Hoyos cehoyos chez ag or at
original thread: [FFmpeg-devel] [PATCH] attribute_unused -> av_unused
date: 05/29/2007 01:23 PM
Originally committed as revision 9155 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
ad73e79cab
160 bytes smaller object file, ask gcc devels why
...
Originally committed as revision 8407 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
f1505ce3bc
explain where the T table comes from
...
Originally committed as revision 8406 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
e057461dac
cosmetic (order context variables like in sha1)
...
Originally committed as revision 8386 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
e657aa3415
#undef printf under #ifdef TEST (needed for testing)
...
Originally committed as revision 8384 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
ef3c7c3328
borrow finalization algo from sha1 (100byte smaller)
...
Originally committed as revision 8383 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Michael Niedermayer
e1b62250ac
get rid of b_used variable (same size with CONFIG_SMALL)
...
Originally committed as revision 8382 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Steve L'Homme
949b1a13bf
Replace most of the %lld and %llx by their (cleaner) PRI*64 counterparts.
...
patch by Steve Lhomme, slhomme divxcorp com
Originally committed as revision 6868 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Diego Biurrun
b78e7197a8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
...
and fix GPL/LGPL version mismatches.
Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
18 years ago
Diego Biurrun
a020e2c5f0
Add proper LGPL header.
...
Originally committed as revision 5634 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Diego Biurrun
da2e9781bb
spelling typo
...
Originally committed as revision 5633 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Luca Barbato
5351c29cbe
fix endianess build in a better way
...
Originally committed as revision 5596 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Luca Barbato
a8d88e03d2
big endian fix
...
Originally committed as revision 5592 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Måns Rullgård
d10fda8ee2
1l: put that int i back
...
Originally committed as revision 5587 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Måns Rullgård
4dddc5e10c
kill warnings
...
Originally committed as revision 5585 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Ivo van Poorten
f28660eb3f
cast pointers to make compiler happy
...
remove test define
Originally committed as revision 5582 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago
Michael Niedermayer
94d85eaf34
md5 support
...
depending on CONFIG_SMALL this can either be compiled to a fully unrolled kernel / rfc reference style md5 routine
or a single loop similar to what mplayer uses
Originally committed as revision 5565 to svn://svn.ffmpeg.org/ffmpeg/trunk
19 years ago