Revision 3abe5fbd libavutil/crc.h

View differences:

libavutil/crc.h
26 26

  
27 27
typedef uint32_t AVCRC;
28 28

  
29
#define AV_CRC_8_ATM      0x07
30
#define AV_CRC_16         0x8005
31
#define AV_CRC_16_CCITT   0x1021
32
#define AV_CRC_32_IEEE    0x04C11DB7L
33
//! reversed bitorder version of AV_CRC_32_IEEE
34
#define AV_CRC_32_IEEE_LE 0xEDB88320L
35

  
36
#if LIBAVUTIL_VERSION_INT  < (50<<16)
37
extern AVCRC *av_crcEDB88320;
38
extern AVCRC *av_crc04C11DB7;
39
extern AVCRC *av_crc8005    ;
40
extern AVCRC *av_crc07      ;
41
#else
42
extern AVCRC av_crcEDB88320[];
43
extern AVCRC av_crc04C11DB7[];
44
extern AVCRC av_crc8005    [];
45
extern AVCRC av_crc07      [];
46
#endif
29
typedef enum {
30
    AV_CRC_8_ATM,
31
    AV_CRC_16_ANSI,
32
    AV_CRC_16_CCITT,
33
    AV_CRC_32_IEEE,
34
    AV_CRC_32_IEEE_LE,  /*< reversed bitorder version of AV_CRC_32_IEEE */
35
    AV_CRC_MAX,         /*< not part of public API! don't use outside lavu */
36
}AVCRCId;
47 37

  
48 38
int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
39
const AVCRC *av_crc_get_table(AVCRCId crc_id);
49 40
uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length);
50 41

  
51 42
#endif /* FFMPEG_CRC_H */

Also available in: Unified diff