diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 03:44:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 03:44:18 +0200 |
commit | 43bbc3f477a2dc5ab18fe10147e0f3964cdb4f41 (patch) | |
tree | b6ac1b21cc203e8b345de7b0658c1dafceb4598a | |
parent | 89074e9066d1a2fd525d94a332872ac68e90bb3e (diff) | |
download | ffmpeg-43bbc3f477a2dc5ab18fe10147e0f3964cdb4f41.tar.gz |
xtea: give constants the correct type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/xtea.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/xtea.c b/libavutil/xtea.c index 9c41f140fa..28780fb551 100644 --- a/libavutil/xtea.c +++ b/libavutil/xtea.c @@ -50,7 +50,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, if (decrypt) { #if CONFIG_SMALL int i; - uint32_t delta = 0x9E3779B9, sum = delta * 32; + uint32_t delta = 0x9E3779B9U, sum = delta * 32; for (i = 0; i < 32; i++) { v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + ctx->key[(sum >> 11) & 3]); @@ -60,7 +60,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, #else #define DSTEP(SUM, K0, K1) \ v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + K0); \ - v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM - 0x9E3779B9 + K1) + v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM - 0x9E3779B9U + K1) DSTEP(0xC6EF3720U, k2, k3); DSTEP(0x28B7BD67U, k3, k2); @@ -103,7 +103,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, } else { #if CONFIG_SMALL int i; - uint32_t sum = 0, delta = 0x9E3779B9; + uint32_t sum = 0, delta = 0x9E3779B9U; for (i = 0; i < 32; i++) { v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + ctx->key[sum & 3]); @@ -113,7 +113,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, #else #define ESTEP(SUM, K0, K1) \ v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM + K0);\ - v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + 0x9E3779B9 + K1) + v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + 0x9E3779B9U + K1) ESTEP(0x00000000U, k0, k3); ESTEP(0x9E3779B9U, k1, k2); ESTEP(0x3C6EF372U, k2, k1); |