Originally committed as revision 5676 to svn://svn.ffmpeg.org/ffmpeg/trunk
}
}
ctx[256]=1;
+#ifndef CONFIG_SMALL
if(ctx_size >= sizeof(AVCRC)*1024)
for (i = 0; i < 256; i++)
for(j=0; j<3; j++)
ctx[256*(j+1) + i]= (ctx[256*j + i]>>8) ^ ctx[ ctx[256*j + i]&0xFF ];
+#endif
return 0;
}
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){
const uint8_t *end= buffer+length;
+#ifndef CONFIG_SMALL
if(!ctx[256])
while(buffer<end-3){
crc ^= le2me_32(*(uint32_t*)buffer); buffer+=4;
^ctx[1*256 + ((crc>>16)&0xFF)]
^ctx[0*256 + ((crc>>24) )];
}
+#endif
while(buffer<end)
crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8);