From 3479b72bc28a2eaffa3202ba8ed8194558081f93 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 12 Mar 2007 21:14:33 +0000 Subject: [PATCH] its faster to copy the data to the stack it seems ... Originally committed as revision 8353 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavutil/sha1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavutil/sha1.c b/libavutil/sha1.c index 6ab8c25346..4708542f4a 100644 --- a/libavutil/sha1.c +++ b/libavutil/sha1.c @@ -29,7 +29,10 @@ typedef struct AVSHA1 { static void transform(uint32_t state[5], uint8_t buffer[64]){ unsigned int a, b, c, d, e, i; - uint32_t* block= buffer; + uint32_t block[16]; + + memcpy(block, buffer, 64); + /* Copy context->state[] to working vars */ a = state[0]; b = state[1];