changeset 3169:53f0b29ff865 libavcodec

generic crc calculation code
author michael
date Mon, 06 Mar 2006 14:13:01 +0000
parents 1deaaa111fbc
children 1475eb5f8649
files utils.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <stdarg.h>
 #include <limits.h>
 #include <float.h>
@@ -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();
 }
 
 /**