Commit Graph

2633 Commits

Author SHA1 Message Date
Michael Niedermayer
b6ce50a2d4 avutil/ripemd: adjust loop condition to silence CID1035716
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 14:52:29 +02:00
Michael Niedermayer
9626d0e906 avutil/frame: Try to align width to achive linesize[0] alignment
This results in more alignment for pixel formats that have "odd" pixel
sizes like RGB24. It makes access through SIMD easier

Works around Issue described in Ticket1031

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18 16:50:07 +02:00
James Almer
3e17eec607 lavu/adler32: Fix doxy group definition, take two
The description if for the function, not the group.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 12:50:00 +02:00
James Almer
4a0d603072 lavu/hash: Add support for RIPEMD
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 12:49:39 +02:00
Michael Niedermayer
359af6a7c7 Merge branch 'crypto' of https://github.com/jamrial/FFmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 01:07:24 +02:00
James Almer
99b8cd0c81 lavu: Add RIPEMD hashing
Includes RIPEMD-128, RIPEMD-160, RIPEMD-256 and RIPEMD-320

Signed-off-by: James Almer <jamrial@gmail.com>
2013-06-15 18:54:01 -03:00
James Almer
b6249acae6 lavu/hash: Add support for SHA-2 512
Signed-off-by: James Almer <jamrial@gmail.com>
2013-06-15 18:49:12 -03:00
Paul B Mahol
8a79a009f9 lavu/utils: silence warnings about incompatible pointer types
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-15 21:47:45 +00:00
Michael Niedermayer
1ba196a10d avutil/utils: check and warn about llrint() brokenness
Such broken llrint() exist for example on netbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-15 11:22:22 +02:00
James Almer
c4f932f4d7 lavu/md5: Add doxy
Mostly a copy&paste from other hash functions, with changes
where required.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-15 02:22:39 +02:00
James Almer
321906d341 lavu/crc: Fix doxy group definition
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-15 02:22:16 +02:00
James Almer
79d9ed4a43 lavu/adler32: Fix doxy group definition
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-15 02:22:00 +02:00
Michael Niedermayer
fa125c5e82 avutil/timestamp: remove ""
This may fix an error with C++

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-13 14:57:00 +02:00
James Almer
1163910a00 fate: Add test vectors for HMAC SHA and SHA-2
Also replace custom tests for MD5 with those published in RFC 2202

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 01:48:23 +02:00
James Almer
82ef67016e lavu/hmac: Add support for SHA-2
Includes HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512.
Tested using test vectors from https://tools.ietf.org/html/rfc4231

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 01:47:42 +02:00
Michael Niedermayer
fbc472da29 avutil/mem: simplify av_reallocp_array() by using av_realloc_f()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 14:40:31 +02:00
Michael Niedermayer
30b491f1c9 Merge commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e'
* commit '3b4feac1ec14f861bdd7f494f288f4d8dd7f449e':
  movenc: Keep track of the allocated size for the cluster array
  mem: Add av_realloc_array and av_reallocp_array

Conflicts:
	doc/APIchanges
	libavformat/movenc.c
	libavutil/mem.c
	libavutil/mem.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 11:19:16 +02:00
Martin Storsjö
fc962d4e7a mem: Add av_realloc_array and av_reallocp_array
These help avoiding overflows and simplify error handling.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:04:08 +03:00
Michael Niedermayer
45a73d2b47 Merge commit 'c011ceef78eae66039efc66d9551a7146e08838a'
* commit 'c011ceef78eae66039efc66d9551a7146e08838a':
  swscale: ppc: Remove commented-out define cruft
  nsvdec: Remove commented-out debug cruft
  cpu: Restructure code to avoid pointless ret variable indirection

Conflicts:
	libavutil/cpu.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-03 11:53:05 +02:00
Michael Niedermayer
636c2dd438 avutil/sha: reorder Maj arguments
about 1% speedup

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 18:51:09 +02:00
Diego Biurrun
f0ce1d9909 cpu: Restructure code to avoid pointless ret variable indirection
libavutil/cpu.c:133:9: warning: unused variable ‘ret’ [-Wunused-variable]
2013-06-02 18:05:08 +02:00
Michael Niedermayer
09d6beee24 avutil/sha512: Reshuffle Maj() operands
This reduces dependancy chains and improves speed by about 2%

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 13:18:16 +02:00
James Almer
682b2273e8 lavu: Add SHA-2 512 hashing
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-02 11:27:19 +02:00
James Almer
c485c835fe avutil/crc: Dont limit CRC32 standard tables
Currently, standard tables like AV_CRC_32_IEEE and such are being generated (or
provided in case the user compiles with hardcoded tables) with only 257 elements.
We're missing a considerable boost in performance by not making them with a size
of 1024 elements instead.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-01 10:53:39 +02:00
Michael Niedermayer
887d74c47e av_d2q: Add a special case for |value| > MAX and |value| < 1/MAX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 17:10:36 +02:00
Reimar Döffinger
4c2b3f4738 Add AV_HASH_MAX_SIZE.
Makes it easier to use static allocation for the result buffer.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-29 22:31:16 +02:00
Michael Niedermayer
b7c6d1ed90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  arm: Only output eabi attributes if building for ELF
  fix scalarproduct_and_madd_int16_altivec() for orders > 16

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 08:55:24 +02:00
Martin Storsjö
be7952b5c3 arm: Only output eabi attributes if building for ELF
This matches the other eabi attribute in the same file. This is
required in order to build for arm/hardfloat with other object
file formats than ELF.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-27 00:55:33 +03:00
Michael Niedermayer
4cf7b87551 av_cpu_count: factorize "detected %d logical cores" message
Also print the message just once

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 03:19:55 +02:00
Michael Niedermayer
d480b36db4 av_d2q: Avoid llrint(), its not correctly implemented in old netbsd
This should fix some fate failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 03:19:55 +02:00
Giorgio Vazzana
7e03886bbb avutil/md5: reindent after previous commits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 16:11:08 +02:00
Michael Niedermayer
64eacb839e av_d2q: fix rounding for negative values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 16:04:08 +02:00
Michael Niedermayer
de7d290631 av_d2q: Fix infinity check
The old check would fail on huge but not infinite values
and the later code could then fail to handle them correctly in
some cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 16:03:50 +02:00
Michael Niedermayer
fe99b1d50e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cpu: Include common.h for av_popcount64

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 17:19:21 +02:00
Michael Niedermayer
87a2bf2459 avutil/bprint: Fix doxygen comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 15:36:54 +02:00
Michael Niedermayer
fe40a9f98f Merge commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675'
* commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675':
  Move get_logical_cpus() from lavc/pthread to lavu/cpu.

Conflicts:
	doc/APIchanges
	libavcodec/pthread.c
	libavutil/cpu.c
	libavutil/cpu.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 13:24:28 +02:00
Martin Storsjö
597208fde1 cpu: Include common.h for av_popcount64
This fixes build failures on windows since 2a6eaeaa8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-24 13:34:19 +03:00
Clément Bœsch
cf6ed1f129 lavu/opencl: remove semi-colon from macro.
Fixes compilation when the macros are empty and the label above ends up
containing no statement. Also makes usage of these macro consistent
(some already have a semi colon, some others don't).

Fixes Ticket #2603
2013-05-24 12:01:02 +02:00
Anton Khirnov
2a6eaeaa85 Move get_logical_cpus() from lavc/pthread to lavu/cpu.
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Anton Khirnov
f36d7831d9 pixdesc: mark gray8 as pseudopal
Many functions treat it as such already.
Fixes Bug 499.

CC:libav-stable@libav.org
2013-05-22 21:18:08 +02:00
Paul B Mahol
f98dbc7311 lavu/opt: check if class is NULL too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-21 20:50:49 +00:00
Michael Niedermayer
81bec0ace4 avutil/pixfmt: add forgotten deprecated to YUVJ411
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-21 21:49:28 +02:00
Michael Niedermayer
a90baa63c3 add YUVJ411P
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-21 12:56:11 +02:00
Xidorn Quan
5a65fea655 avutil/frame: continue to process bufs even if some are empty
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 23:34:15 +02:00
Giorgio Vazzana
a67304d05f avutil/md5: move loop inside inner function
AMD Athlon(tm) II X3 450 Processor

size: 1048576  runs: 1024  time:    5.660 +- 0.023
size: 1048576  runs: 1024  time:    5.661 +- 0.030
size: 1048576  runs: 1024  time:    5.656 +- 0.022
size: 1048576  runs: 1024  time:    5.647 +- 0.026

size: 1048576  runs: 1024  time:    5.428 +- 0.037
size: 1048576  runs: 1024  time:    5.426 +- 0.034
size: 1048576  runs: 1024  time:    5.426 +- 0.034
size: 1048576  runs: 1024  time:    5.428 +- 0.038

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 22:07:48 +02:00
Michael Niedermayer
9c49d5908d avutil/hmac: silence pointer type warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 14:48:55 +02:00
Giorgio Vazzana
d0a34aeedf md5: optimize second round by using 4-operation form of G()
4-operation form is preferred over 3-operation because it breaks a long
dependency chain, thus allowing a superscalar processor to execute more
operations in parallel.
The idea was taken from: http://www.zorinaq.com/papers/md5-amd64.html

AMD Athlon(tm) II X3 450 Processor, x86_64

$ for i in $(seq 1 4); do ./avutil_md5_test2; done
size: 1048576  runs: 1024  time:    5.821 +- 0.019
size: 1048576  runs: 1024  time:    5.822 +- 0.019
size: 1048576  runs: 1024  time:    5.841 +- 0.018
size: 1048576  runs: 1024  time:    5.821 +- 0.018

$ for i in $(seq 1 4); do ./avutil_md5_test2; done
size: 1048576  runs: 1024  time:    5.646 +- 0.019
size: 1048576  runs: 1024  time:    5.646 +- 0.018
size: 1048576  runs: 1024  time:    5.642 +- 0.019
size: 1048576  runs: 1024  time:    5.641 +- 0.019

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 04:27:34 +02:00
Michael Niedermayer
97200d89b9 Merge commit '40020e171a3549a2c0b65ce6f2649aec868872f2'
* commit '40020e171a3549a2c0b65ce6f2649aec868872f2':
  doxy: add a section about versioning.

Conflicts:
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 11:17:52 +02:00
Michael Niedermayer
0718f0cc24 Merge commit 'bc8c1cdc7bfe7b1fe56df812aabdac3de2555cec'
* commit 'bc8c1cdc7bfe7b1fe56df812aabdac3de2555cec':
  lavfi doxy: add a page for lavfi.
  jpegls: check the scan offset

Conflicts:
	libavcodec/jpeglsdec.c
	libavfilter/avfilter.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 11:04:11 +02:00
Reimar Döffinger
24c65eb29f md5: avoid unnecessary copying.
Where necessary use memcpy instead.
Thanks to Giorgio Vazzana [mywing81 gmail] for
spotting this loop as the cause for the bad
performance.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-17 21:16:02 +02:00