Browse Source

avutil/sha512: Reshuffle Maj() operands

This reduces dependancy chains and improves speed by about 2%

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
09d6beee24
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/sha512.c

+ 1
- 1
libavutil/sha512.c View File

@@ -91,7 +91,7 @@ static const uint64_t K512[80] = {
#define ror(value, bits) (((value) >> (bits)) | ((value) << (64 - (bits))))

#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_512(x) (ror((x), 28) ^ ror((x), 34) ^ ror((x), 39))
#define Sigma1_512(x) (ror((x), 14) ^ ror((x), 18) ^ ror((x), 41))


Loading…
Cancel
Save