stealing reimars XOR_BLOCK

Originally committed as revision 7464 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-01-14 12:40:32 +00:00
parent d43a297579
commit e8fc93136d
1 changed files with 3 additions and 4 deletions

View File

@ -40,10 +40,9 @@ static uint8_t alog8[512];
static uint8_t sbox[256]; static uint8_t sbox[256];
static uint8_t inv_sbox[256]; static uint8_t inv_sbox[256];
static inline void addkey(uint32_t state[4], uint32_t round_key[4]){ static inline void addkey(uint64_t state[2], uint64_t round_key[2]){
int i; state[0] ^= round_key[0];
for(i=0; i<4; i++) state[1] ^= round_key[1];
state[i] ^= round_key[i]; //partial memory stall? FIXME benchmark
} }
#define SUBSHIFT0(s, box) s[0]=box[s[ 0]]; s[ 4]=box[s[ 4]]; s[ 8]=box[s[ 8]]; s[12]=box[s[12]]; #define SUBSHIFT0(s, box) s[0]=box[s[ 0]]; s[ 4]=box[s[ 4]]; s[ 8]=box[s[ 8]]; s[12]=box[s[12]];