World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
+ Граф связей класса CRC:

Файлы

файл  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 AVCRCav_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.

Типы

◆ AVCRC

typedef uint32_t AVCRC

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>

См. определение в файле crc.h строка 47

Перечисления

◆ AVCRCId

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

49  {
54  AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */
55  AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */
58  AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */
59 }AVCRCId;

Функции

◆ av_crc_init()

int av_crc_init ( AVCRC ctx,
int  le,
int  bits,
uint32_t  poly,
int  ctx_size 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavutil/crc.h>

Initialize a CRC table.

Аргументы
ctxmust be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024
leIf 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))
bitsnumber of bits for the CRC
polygenerator polynomial without the x**bits coefficient, in the representation as specified by le
ctx_sizesize of ctx in bytes
Возвращает
<0 on failure

◆ av_crc_get_table()

const AVCRC* av_crc_get_table ( AVCRCId  crc_id)

#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_idID of a standard CRC
Возвращает
a pointer to the CRC table or NULL on failure

◆ av_crc()

uint32_t av_crc ( const AVCRC ctx,
uint32_t  crc,
const uint8_t buffer,
size_t  length 
)

#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.

Аргументы
crcCRC of previous blocks if any or initial value for CRC
Возвращает
CRC updated with the data from the given block
См. также
av_crc_init() "le" parameter
AV_CRC_8_EBU
@ AV_CRC_8_EBU
Definition: crc.h:57
AV_CRC_24_IEEE
@ AV_CRC_24_IEEE
Definition: crc.h:56
AV_CRC_16_ANSI_LE
@ AV_CRC_16_ANSI_LE
Definition: crc.h:55
AV_CRC_16_ANSI
@ AV_CRC_16_ANSI
Definition: crc.h:51
AV_CRC_16_CCITT
@ AV_CRC_16_CCITT
Definition: crc.h:52
AV_CRC_32_IEEE
@ AV_CRC_32_IEEE
Definition: crc.h:53
AV_CRC_MAX
@ AV_CRC_MAX
Definition: crc.h:58
AV_CRC_32_IEEE_LE
@ AV_CRC_32_IEEE_LE
Definition: crc.h:54
AV_CRC_8_ATM
@ AV_CRC_8_ATM
Definition: crc.h:50
AVCRCId
AVCRCId
Definition: crc.h:49