- * Calculate the CRC of a block
- * @param crc CRC of previous blocks if any or initial value for CRC.
+ * Gets an initialized standard CRC table.
+ * @param crc_id ID of a standard CRC
+ * @return a pointer to the CRC table or NULL on failure
+ */
+const AVCRC *av_crc_get_table(AVCRCId crc_id){
+#if !CONFIG_HARDCODED_TABLES
+ if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1])
+ if (av_crc_init(av_crc_table[crc_id],
+ av_crc_table_params[crc_id].le,
+ av_crc_table_params[crc_id].bits,
+ av_crc_table_params[crc_id].poly,
+ sizeof(av_crc_table[crc_id])) < 0)
+ return NULL;
+#endif
+ return av_crc_table[crc_id];
+}
+
+/**
+ * Calculates the CRC of a block.
+ * @param crc CRC of previous blocks if any or initial value for CRC