[FFmpeg-cvslog] avutil/sha: reorder Maj arguments

Michael Niedermayer git at videolan.org
Sun Jun 2 19:15:02 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  2 17:10:43 2013 +0200| [636c2dd4389d7aad71c6ee7434d6bf7e9de1a108] | committer: Michael Niedermayer

avutil/sha: reorder Maj arguments

about 1% speedup

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=636c2dd4389d7aad71c6ee7434d6bf7e9de1a108
---

 libavutil/sha.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/sha.c b/libavutil/sha.c
index a1f92f4..5c8e3b6 100644
--- a/libavutil/sha.c
+++ b/libavutil/sha.c
@@ -160,7 +160,7 @@ static const uint32_t K256[64] = {
 
 
 #define Ch(x,y,z)   (((x) & ((y) ^ (z))) ^ (z))
-#define Maj(x,y,z)  ((((x) | (y)) & (z)) | ((x) & (y)))
+#define Maj(z,y,x)  ((((x) | (y)) & (z)) | ((x) & (y)))
 
 #define Sigma0_256(x)   (rol((x), 30) ^ rol((x), 19) ^ rol((x), 10))
 #define Sigma1_256(x)   (rol((x), 26) ^ rol((x), 21) ^ rol((x),  7))



More information about the ffmpeg-cvslog mailing list