FFmpeg
|
Files | |
file | crc.h |
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, AV_CRC_8_EBU, 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... | |
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 |
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 341 of file crc.c.
Referenced by mlp_init_crc().
Get an initialized standard CRC table.
crc_id | ID of a standard CRC |
Definition at line 374 of file crc.c.
Referenced by ac3_decode_frame(), ac3_eac3_probe(), ac4_write_packet(), ape_decode_frame(), apng_write_chunk(), av_hash_alloc(), av_lfg_init_from_data(), check_header_mismatch(), check_image_fill_black(), crc32(), dcadec_init(), decode_frame(), decode_frame_common(), dts_probe(), dxv_init(), encode_apng(), encode_frame(), end_ebml_master_crc32(), ff_crc04C11DB7_update(), ff_crcA001_update(), ff_crcEDB88320_update(), ff_dovi_rpu_generate(), ff_dovi_rpu_parse(), ff_ffv1_write_extradata(), ff_flac_decode_frame_header(), ff_spp_init_x86(), ff_tak_check_crc(), flac_decode_frame(), handle_crc(), init_crc_table_data(), init_hca(), main(), mp3_update_xing(), mp3_write_audio_packet(), mpegts_write_section(), ogg_write_page(), output_frame_end(), png_write_chunk(), png_write_image_data(), read_extra_header(), read_specific_config(), sbc_decode_init(), sbc_encode_init(), svq1_decode_frame_header(), svq3_decode_init(), tak_check_crc(), tta_decode_init(), tta_encode_init(), write_frame_footer(), write_frame_header(), and write_section_data().
uint32_t av_crc | ( | const AVCRC * | ctx, |
uint32_t | crc, | ||
const uint8_t * | buffer, | ||
size_t | length | ||
) |
Calculate the CRC of a block.
ctx | initialized AVCRC array (see av_crc_init()) |
crc | CRC of previous blocks if any or initial value for CRC |
buffer | buffer whose CRC to calculate |
length | length of the buffer |
Definition at line 392 of file crc.c.
Referenced by ac3_decode_frame(), ac3_eac3_probe(), ac4_write_packet(), ape_decode_frame(), apng_write_chunk(), av_hash_update(), av_lfg_init_from_data(), check_header_mismatch(), check_image_fill_black(), crc32(), decode_frame(), decode_frame_common(), dts_probe(), encode_apng(), encode_frame(), end_ebml_master_crc32(), ff_aac_ac3_parse(), ff_crc04C11DB7_update(), ff_crcA001_update(), ff_crcEDB88320_update(), ff_dca_check_crc(), ff_dovi_rpu_generate(), ff_dovi_rpu_parse(), ff_ffv1_write_extradata(), ff_flac_decode_frame_header(), ff_mlp_checksum16(), ff_mlp_checksum8(), ff_mlp_restart_checksum(), ff_sbc_crc8(), ff_spp_init_x86(), ff_tak_check_crc(), flac_decode_frame(), handle_crc(), ht_delete(), ht_lookup_and_upsert(), main(), mp3_update_xing(), mp3_write_audio_packet(), mpegts_write_section(), ogg_write_page(), output_frame_end(), parse_optional_info(), png_write_chunk(), png_write_image_data(), read_extra_header(), svq1_decode_frame_header(), svq3_decode_init(), tak_check_crc(), tta_check_crc(), tta_encode_frame(), write_frame_footer(), write_frame_header(), and write_section_data().