generic crc calculation code

Originally committed as revision 5115 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2006-03-06 14:13:01 +00:00
parent 56419683b2
commit 43a80ccee5
6 changed files with 107 additions and 61 deletions

View File

@@ -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();
}
/**