diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-05 01:46:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-05 02:26:17 +0200 |
commit | 5d4fd1d1adf1ec17dd19548783f7f2eb0d64225f (patch) | |
tree | 0ed0d9be892e55bea47d777dcd78d7c1cf104adf /libavutil/sha.c | |
parent | 96676e1abfece89e20bc962255b48cb2d9e417bd (diff) | |
parent | 3824ef08e0878aa9f100f33ef22b61daf68058c2 (diff) | |
download | ffmpeg-5d4fd1d1adf1ec17dd19548783f7f2eb0d64225f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (36 commits)
ARM: allow unaligned buffer in fixed-point NEON FFT4
fate: test more FFT etc sizes
dca: set AVCodecContext frame_size for DTS audio
YASM: Shut up unused variable compiler warning with --disable-yasm.
x86_32: Fix build on x86_32 with --disable-yasm.
iirfilter: add fate test
doxygen: Add qmul docs.
ogg: propagate return values and return more meaningful error values
H.264: fix overreads of qscale_table
Remove unused static tables and static inline functions.
eval: clear Parser instances before using
dct-test: remove 'ref' function pointer from tables
build: Remove deleted 'check' target from .PHONY list.
oggdec: Abort Ogg header parsing when encountering a data packet.
Add LGPL license boilerplate to files lacking it.
mxfenc: small typo fix
doxygen: Fix documentation for some VP8 functions.
sha: use AV_RB32() instead of assuming buffer can be cast to uint32_t*
des: allow unaligned input and output buffers
aes: allow unaligned input and output buffers
...
Conflicts:
libavcodec/dct-test.c
libavcodec/libvpxenc.c
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/h264_qpel_mmx.c
libavfilter/x86/gradfun.c
libavformat/oggdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/sha.c')
-rw-r--r-- | libavutil/sha.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/sha.c b/libavutil/sha.c index ff9e55720f..301d1606b4 100644 --- a/libavutil/sha.c +++ b/libavutil/sha.c @@ -42,7 +42,7 @@ const int av_sha_size = sizeof(AVSHA); #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ -#define blk0(i) (block[i] = av_be2ne32(((const uint32_t*)buffer)[i])) +#define blk0(i) (block[i] = AV_RB32(buffer + 4 * (i))) #define blk(i) (block[i] = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1)) #define R0(v,w,x,y,z,i) z += ((w&(x^y))^y) + blk0(i) + 0x5A827999 + rol(v, 5); w = rol(w, 30); @@ -67,7 +67,7 @@ static void sha1_transform(uint32_t state[5], const uint8_t buffer[64]) for (i = 0; i < 80; i++) { int t; if (i < 16) - t = av_be2ne32(((uint32_t*)buffer)[i]); + t = AV_RB32(buffer + 4 * i); else t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1); block[i] = t; |