ffmpeg.libavutil.crc

@file @ingroup lavu_crc32 Public header for CRC hash function implementation.

Members

Aliases

AVCRC
alias AVCRC = uint

@defgroup lavu_crc32 CRC @ingroup lavu_hash CRC (Cyclic Redundancy Check) hash function implementation.

Enums

AVCRCId
enum AVCRCId
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

av_crc
uint av_crc(const(AVCRC)* ctx, uint crc, const(ubyte)* buffer, size_t length)

Calculate the CRC of a block. @param crc CRC of previous blocks if any or initial value for CRC @return CRC updated with the data from the given block

av_crc_get_table
const(AVCRC)* av_crc_get_table(AVCRCId crc_id)

Get an initialized standard CRC table. @param crc_id ID of a standard CRC @return a pointer to the CRC table or NULL on failure

av_crc_init
int av_crc_init(AVCRC* ctx, int le, int bits, uint poly, int ctx_size)

Initialize a CRC table. @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 @param 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)) @param bits number of bits for the CRC @param poly generator polynomial without the x**bits coefficient, in the representation as specified by le @param ctx_size size of ctx in bytes @return <0 on failure

Meta