FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
crc.c File Reference
#include "config.h"
#include "bswap.h"
#include "common.h"
#include "crc.h"

Go to the source code of this file.

Macros

#define CRC_TABLE_SIZE   1024
 

Functions

int av_crc_init (AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
 Initialize a CRC table. More...
 
const AVCRCav_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)
 Calculate the CRC of a block. More...
 

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][CRC_TABLE_SIZE]
 

Macro Definition Documentation

#define CRC_TABLE_SIZE   1024

Definition at line 292 of file crc.c.

Variable Documentation

uint8_t le
uint8_t bits

Definition at line 296 of file crc.c.

Referenced by aac_sync(), ac3_compute_mantissa_size_c(), ac3_decode_transform_coeffs_ch(), adaptive_quantization(), apply_lpc(), arith2_get_consumed_bytes(), arith_get_bits(), av_base64_decode(), av_crc_get_table(), av_crc_init(), av_get_bits_per_pixel(), av_get_padded_bits_per_pixel(), avisynth_read_packet_video(), avpriv_copy_bits(), avpriv_copy_pce_data(), aw_parse_coords(), binkb_get_value(), binkb_read_bundle(), bit8x8_c(), bits2qp(), buffer_size_after_time_downloaded(), build_canonical_huff(), build_huff(), build_huff10(), build_huff_tree(), build_table(), build_vlc(), calc_bit_demand(), calc_rice_params(), calc_slice_sizes(), celt_bits2pulses(), celt_decode_allocation(), celt_decode_tf_changes(), check_slice_end(), checkasm_check_flacdsp(), code_filter_coeffs(), code_matrix_coeffs(), codebook_trellis_rate(), compress_alpha(), count_hq_slice(), create_filtergraph(), dct_error(), dec_gain(), decode_band_numwavs(), decode_band_types(), decode_block(), decode_gainc_levels(), decode_gainc_loc_codes(), decode_gainc_npoints(), decode_i2_frame(), decode_init(), decode_line_TMPL(), decode_qu_spectra(), decode_rgb_frame_TMPL(), decode_rle(), decode_spectrum_and_dequant(), decode_subframe(), decode_tones_amplitude(), decode_tones_frequency(), decode_tones_info(), delta_mono(), delta_stereo(), dequant(), dnxhd_calc_ac_bits(), dnxhd_calc_bits_thread(), dnxhd_encode_rdo(), dnxhd_find_qscale(), dvbsub_read_2bit_string(), dvbsub_read_4bit_string(), dvbsub_read_8bit_string(), encode_block(), encode_frame(), encode_line_TMPL(), encode_mode(), encode_picture(), encode_residual_ch(), encode_rgb_frame_TMPL(), encode_thread(), estimate_acs(), estimate_alpha_plane(), estimate_dcs(), estimate_slice_plane(), extend_code(), ff_acelp_fc_pulse_per_track(), ff_decode_10_pulses_35bits(), ff_eac3_decode_transform_coeffs_aht_ch(), ff_g723_1_scale_vector(), ff_h263_encode_motion(), ff_h264_decode_mb_cabac(), ff_huffyuv_generate_bits_table(), ff_mjpeg_decode_sof(), ff_mpeg1_encode_init(), ff_mpeg4_merge_partitions(), ff_mpv_encode_picture(), ff_rate_control_init(), ff_rate_estimate_qscale(), ff_rv34_decode_init(), fillPlane16(), find_optimal_param_exact(), find_slice_quant(), find_subframe_rice_params(), fixed_sqrt(), g2m_load_cursor(), gainc_level_mode1m(), gb_get_v(), generate_joint_tables(), get_bits_diff(), get_mvdata_interlaced(), get_qscale(), get_vc2_ue_uint(), hdcd_integrate(), hScale16To19_c(), huff_build(), imc_decode_block(), imc_refine_bit_allocation(), init_pass2(), init_static(), init_uni_h263_rl_tab(), init_uni_mpeg4_rl_tab(), is_ebml_id_valid(), ivi_create_huff_from_desc(), kempf_decode_tile(), lag_decode_prob(), ljpeg_decode_yuv_scan(), m101_decode_frame(), main(), match_colors(), metasound_read_bitstream(), mp_decode_layer2(), mpc8_dec_enum(), mpc8_decode_frame(), mpeg1_encode_motion(), mpeg4_decode_partition_a(), msmpeg4v2_encode_motion(), mss4_init_vlc(), nelly_decode_block(), number_trailing_zeroes(), opus_rc_p2model(), opus_rc_unimodel(), put_codebook_header(), put_subframe_samples(), put_vc2_ue_uint(), query_formats(), rate_control(), rd8x8_c(), read_and_decode_spectrum(), read_argb_line(), read_code_table(), read_colorspace_details(), read_dct_coeffs(), read_huffman_code_normal(), read_huffman_tables(), read_map(), read_quant_spectral_coeffs(), read_rgb24_component_line(), read_sbr_envelope(), read_yuv_component_line(), recurse_mono(), recurse_stereo(), s302m_parse_frame_header(), search_for_golomb(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), seq_decode_op1(), smka_decode_frame(), sort_mono(), sort_stereo(), tdsc_load_cursor(), twinvq_read_bitstream(), unpack_intraframe(), vorbis_parse_setup_hdr_floors(), vp56_rac_renorm(), wmavoice_init_static_data(), wp_log2(), xan_unpack_luma(), and zero_extend().

uint32_t poly

Definition at line 297 of file crc.c.

Referenced by av_crc_get_table(), mul_poly(), and tta_check_crc64().

struct { ... } av_crc_table_params[AV_CRC_MAX]
Initial value:
= {
[AV_CRC_8_ATM] = { 0, 8, 0x07 },
[AV_CRC_16_ANSI] = { 0, 16, 0x8005 },
[AV_CRC_16_CCITT] = { 0, 16, 0x1021 },
[AV_CRC_24_IEEE] = { 0, 24, 0x864CFB },
[AV_CRC_32_IEEE] = { 0, 32, 0x04C11DB7 },
[AV_CRC_32_IEEE_LE] = { 1, 32, 0xEDB88320 },
[AV_CRC_16_ANSI_LE] = { 1, 16, 0xA001 },
}

Referenced by av_crc_get_table().

AVCRC av_crc_table[AV_CRC_MAX][CRC_TABLE_SIZE]
static

Definition at line 307 of file crc.c.

Referenced by av_crc_get_table().