diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-03-06 14:13:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-03-06 14:13:01 +0000 |
commit | 43a80ccee52bd478cbc5b575f9b4424de352138d (patch) | |
tree | c347d1bbf1900f7129a83165df6388796b70d2f0 /libavcodec | |
parent | 56419683b2e9f670d4ee231a92e13958f8134f37 (diff) | |
download | ffmpeg-43a80ccee52bd478cbc5b575f9b4424de352138d.tar.gz |
generic crc calculation code
Originally committed as revision 5115 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 801bb482bf..5e98a54ced 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -29,6 +29,7 @@ #include "mpegvideo.h" #include "integer.h" #include "opt.h" +#include "crc.h" #include <stdarg.h> #include <limits.h> #include <float.h> @@ -1218,6 +1219,11 @@ unsigned avcodec_build( void ) return LIBAVCODEC_BUILD; } +static void init_crcs(void){ + av_crc04C11DB7= av_mallocz_static(sizeof(AVCRC) * 257); + av_crc_init(av_crc04C11DB7, 0, 32, 0x04c11db7, sizeof(AVCRC)*257); +} + /* must be called before any other functions */ void avcodec_init(void) { @@ -1228,6 +1234,7 @@ void avcodec_init(void) inited = 1; dsputil_static_init(); + init_crcs(); } /** |