diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 21:40:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 21:40:21 +0000 |
commit | 597e3232ef9b65a1df9f8b9ae37d70547a680bd2 (patch) | |
tree | f2e65b4be47cb41a4025ee093214db2d0994c106 /libavutil | |
parent | 7200f5d054421484f1326ff5e25340629154b421 (diff) | |
download | ffmpeg-597e3232ef9b65a1df9f8b9ae37d70547a680bd2.tar.gz |
simplify
Originally committed as revision 7504 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/aes.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libavutil/aes.c b/libavutil/aes.c index d649dfa29f..f14523bfc6 100644 --- a/libavutil/aes.c +++ b/libavutil/aes.c @@ -99,22 +99,16 @@ void av_aes_encrypt(AVAES *a){ crypt(a, 2, sbox, enc_multbl); } -static void init_multbl3(uint8_t tbl[4][256][4]){ - int i, j, k; - for(k=1; k<4; k++) - for(j=0; j<256; j++) - for(i=0; i<4; i++) - tbl[k][j][i]= tbl[k-1][j][(i-1)&3]; -} - static void init_multbl2(uint8_t tbl[1024], int c[4], uint8_t *log8, uint8_t *alog8, uint8_t *sbox){ - int i; + int i, j; for(i=0; i<1024; i++){ int x= sbox[i/4]; if(x) tbl[i]= alog8[ log8[x] + log8[c[i&3]] ]; } #ifndef CONFIG_SMALL - init_multbl3(tbl); + for(j=256; j<1024; j++) + for(i=0; i<4; i++) + tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024]; #endif } |