diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
commit | 1d0b3b20c34517b9d1ddf3ea347776304b0c4b44 (patch) | |
tree | 89f4fc640c2becc6f00ae08996754952ecf149c1 /contrib/ffmpeg/libavutil/aes.c | |
parent | 09496ad3469a0ade8dbd9a351e639b78f20b7942 (diff) | |
download | xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.gz xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.bz2 |
Update internal FFmpeg copy.
Diffstat (limited to 'contrib/ffmpeg/libavutil/aes.c')
-rw-r--r-- | contrib/ffmpeg/libavutil/aes.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/ffmpeg/libavutil/aes.c b/contrib/ffmpeg/libavutil/aes.c index 55ae0d4f3..5030dac48 100644 --- a/contrib/ffmpeg/libavutil/aes.c +++ b/contrib/ffmpeg/libavutil/aes.c @@ -1,6 +1,8 @@ /* * copyright (c) 2007 Michael Niedermayer <michaelni@gmx.at> * + * some optimization ideas from aes128.c by Reimar Doeffinger + * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or @@ -16,14 +18,14 @@ * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * some optimization ideas from aes128.c by Reimar Doeffinger */ #include "common.h" #include "aes.h" typedef struct AVAES{ + // Note: round_key[16] is accessed in the init code, but this only + // overwrites state, which does not matter (see also r7471). uint8_t round_key[15][4][4]; uint8_t state[2][4][4]; int rounds; @@ -128,7 +130,7 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) { uint8_t log8[256]; uint8_t alog8[512]; - if(!enc_multbl[4][1023]){ + if(!enc_multbl[0][sizeof(enc_multbl)/sizeof(enc_multbl[0][0])-1]){ j=1; for(i=0; i<255; i++){ alog8[i]= @@ -192,7 +194,9 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) { #ifdef TEST #include "log.h" -int main(){ +#undef random + +int main(void){ int i,j; AVAES ae, ad, b; uint8_t rkey[2][16]= { |