FFmpeg
|
Typedefs | |
typedef uint32_t | AVCRC |
Enumerations | |
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 = 12, AV_CRC_MAX } |
Functions | |
int | av_crc_init (AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) |
Initialize a CRC table. More... | |
const AVCRC * | av_crc_get_table (AVCRCId crc_id) |
Get an initialized standard CRC table. More... | |
uint32_t | av_crc (const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length) av_pure |
Calculate the CRC of a block. More... | |
enum AVCRCId |
int av_crc_init | ( | AVCRC * | ctx, |
int | le, | ||
int | bits, | ||
uint32_t | poly, | ||
int | ctx_size | ||
) |
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 |
Definition at line 309 of file crc.c.
Referenced by av_crc_get_table(), and ff_mlp_init_crc().
Get an initialized standard CRC table.
crc_id | ID of a standard CRC |
Definition at line 342 of file crc.c.
Referenced by ac3_decode_frame(), ac3_eac3_probe(), apng_write_chunk(), av_hash_alloc(), check_header_mismatch(), crc32(), decode_frame(), doTest(), encode_apng(), encode_frame(), ff_crc04C11DB7_update(), ff_crcA001_update(), ff_flac_decode_frame_header(), ff_tak_check_crc(), flac_decode_frame(), flush_packet(), mp3_update_xing(), mp3_write_audio_packet(), mpegts_write_section(), output_frame_end(), png_write_chunk(), png_write_image_data(), read_extra_header(), read_specific_config(), tak_check_crc(), tta_check_crc(), tta_decode_init(), tta_encode_init(), write_extradata(), write_frame_footer(), write_frame_header(), and write_section_data().
Calculate the CRC of a block.
crc | CRC of previous blocks if any or initial value for CRC |
Definition at line 356 of file crc.c.
Referenced by ac3_decode_frame(), ac3_eac3_probe(), apng_write_chunk(), av_hash_update(), check_header_mismatch(), crc32(), decode_frame(), doTest(), encode_apng(), encode_frame(), ff_crc04C11DB7_update(), ff_crcA001_update(), ff_flac_decode_frame_header(), ff_mlp_checksum16(), ff_mlp_checksum8(), ff_mlp_restart_checksum(), ff_tak_check_crc(), flac_decode_frame(), flush_packet(), mp3_update_xing(), mp3_write_audio_packet(), mpegts_write_section(), output_frame_end(), png_write_chunk(), png_write_image_data(), read_extra_header(), tak_check_crc(), tta_check_crc(), tta_encode_frame(), write_extradata(), write_frame_footer(), write_frame_header(), and write_section_data().