# HG changeset patch # User michael # Date 1141654381 0 # Node ID 53f0b29ff8657ad53c78871c908e9545f573bc91 # Parent 1deaaa111fbcf8f85d17a86ed7f34d2e7eaa6eb4 generic crc calculation code diff -r 1deaaa111fbc -r 53f0b29ff865 utils.c --- a/utils.c Mon Mar 06 09:54:09 2006 +0000 +++ b/utils.c Mon Mar 06 14:13:01 2006 +0000 @@ -29,6 +29,7 @@ #include "mpegvideo.h" #include "integer.h" #include "opt.h" +#include "crc.h" #include #include #include @@ -1218,6 +1219,11 @@ 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 @@ inited = 1; dsputil_static_init(); + init_crcs(); } /**