#include "common.h"
#include "crc.h"
Go to the source code of this file.
Functions | |
int | av_crc_init (AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) |
Inits a crc table. | |
const AVCRC * | av_crc_get_table (AVCRCId crc_id) |
Get an initialized standard CRC table. | |
uint32_t | av_crc (const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length) |
Calculate the CRC of a block. | |
Variables | |
struct { | |
uint8_t le | |
uint8_t bits | |
uint32_t poly | |
} | av_crc_table_params [AV_CRC_MAX] |
static AVCRC | av_crc_table [AV_CRC_MAX][257] |
Calculate the CRC of a block.
crc | CRC of previous blocks if any or initial value for CRC. |
Definition at line 112 of file crc.c.
Referenced by ac3_decode_frame(), decode_frame(), ff_crc04C11DB7_update(), mlp_checksum16(), mpegts_write_section(), output_frame_end(), output_frame_footer(), output_frame_header(), and write_section_data().
Get an initialized standard CRC table.
crc_id | ID of a standard CRC |
Definition at line 92 of file crc.c.
Referenced by ac3_decode_frame(), decode_frame(), ff_crc04C11DB7_update(), mpegts_write_section(), output_frame_end(), output_frame_footer(), output_frame_header(), and write_section_data().
int av_crc_init | ( | AVCRC * | ctx, | |
int | le, | |||
int | bits, | |||
uint32_t | poly, | |||
int | ctx_size | |||
) |
Inits a crc table.
ctx | must be an array of sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 | |
cts_size | size of ctx in bytes | |
le | if 1, lowest bit represents coefficient for highest exponent of 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): bswap_32(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 |
Definition at line 56 of file crc.c.
Referenced by av_crc_get_table(), and mlp_checksum16().
AVCRC av_crc_table[AV_CRC_MAX][257] [static] |
struct { ... } av_crc_table_params[AV_CRC_MAX] [static] |
Referenced by av_crc_get_table().
Definition at line 29 of file crc.c.
Referenced by aac_sync(), adaptive_quantization(), av_crc_get_table(), av_picture_copy(), avg_bits_per_pixel(), bit8x8_c(), build_huff_tree(), calc_rice_params(), calc_rice_params_fixed(), calc_rice_params_lpc(), check_slice_end(), compute_mantissa_size(), decode_cabac_mb_type(), decode_i2_frame(), dnxhd_calc_ac_bits(), dnxhd_encode_rdo(), dnxhd_find_qscale(), dvbsub_read_2bit_string(), dvbsub_read_4bit_string(), dvbsub_read_8bit_string(), encode_frame(), encode_picture(), encode_residual(), encode_thread(), ff_copy_bits(), ff_mpeg1_encode_init(), ff_rate_control_init(), ff_rate_estimate_qscale(), ff_rv34_decode_init(), gb_get_v(), generate_bits_table(), generate_joint_tables(), get_bits_diff(), get_qscale(), imc_decode_frame(), init_pass2(), init_uni_ac_vlc(), modify_qscale(), mp_decode_layer2(), mpc7_decode_frame(), mpc8_dec_enum(), mpc8_decode_frame(), mpeg1_encode_motion(), nelly_decode_block(), put_codebook_header(), rd8x8_c(), read_huffman_tables(), readQuantSpectralCoeffs(), seq_decode_op1(), smka_decode_frame(), vorbis_parse_setup_hdr_floors(), vorbis_parse_setup_hdr_mappings(), vorbis_parse_setup_hdr_residues(), and xan_huffman_decode().
uint32_t poly |