World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
Файлы | |
файл | crc.h |
Определения типов | |
typedef uint32_t | AVCRC |
Перечисления | |
enum | AVCRCId { AV_CRC_8_ATM, AV_CRC_16_ANSI, AV_CRC_16_CCITT, AV_CRC_32_IEEE, AV_CRC_32_IEEE_LE, AV_CRC_16_ANSI_LE, AV_CRC_24_IEEE, AV_CRC_8_EBU, AV_CRC_MAX } |
Функции | |
int | av_crc_init (AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) |
const AVCRC * | av_crc_get_table (AVCRCId crc_id) |
uint32_t | av_crc (const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length) av_pure |
CRC (Cyclic Redundancy Check) hash function implementation.
This module supports numerous CRC polynomials, in addition to the most widely used CRC-32-IEEE. See AVCRCId for a list of available polynomials.
enum AVCRCId |
#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>
Элементы перечислений | |
---|---|
AV_CRC_8_ATM | |
AV_CRC_16_ANSI | |
AV_CRC_16_CCITT | |
AV_CRC_32_IEEE | |
AV_CRC_32_IEEE_LE | |
AV_CRC_16_ANSI_LE | |
AV_CRC_24_IEEE | |
AV_CRC_8_EBU | |
AV_CRC_MAX |
См. определение в файле crc.h строка 49
#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>
Initialize a CRC table.
ctx | must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 |
le | If 1, the lowest bit represents the coefficient for the highest exponent of the corresponding polynomial (both for poly and actual CRC). If 0, you must swap the CRC parameter and the result of av_crc if you need the standard representation (can be simplified in most cases to e.g. bswap16): av_bswap32(crc << (32-bits)) |
bits | number of bits for the CRC |
poly | generator polynomial without the x**bits coefficient, in the representation as specified by le |
ctx_size | size of ctx in bytes |
#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>
Get an initialized standard CRC table.
crc_id | ID of a standard CRC |
#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>
Calculate the CRC of a block.
crc | CRC of previous blocks if any or initial value for CRC |