Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 17 of 17) sorted by relevance

/lib/
Dcrc32.c57 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) argument
60 # define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
66 # define DO_CRC(x) crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
105 q = crc ^ *++b; /* use pre increment for speed */
107 crc = DO_CRC4;
109 crc = DO_CRC8;
111 crc ^= DO_CRC4;
127 return crc;
145 static inline u32 __pure crc32_le_generic(u32 crc, unsigned char const *p, argument
152 crc ^= *p++;
[all …]
Dgen_crc32table.c40 uint32_t crc = 1; in crc32init_le_generic() local
45 crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0); in crc32init_le_generic()
47 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic()
50 crc = tab[0][i]; in crc32init_le_generic()
52 crc = tab[0][crc & 0xff] ^ (crc >> 8); in crc32init_le_generic()
53 tab[j][i] = crc; in crc32init_le_generic()
74 uint32_t crc = 0x80000000; in crc32init_be() local
79 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0); in crc32init_be()
81 crc32table_be[0][i + j] = crc ^ crc32table_be[0][j]; in crc32init_be()
84 crc = crc32table_be[0][i]; in crc32init_be()
[all …]
Dcrc32test.c552 u32 crc; /* random starting crc */ member
674 static u32 crc; in crc32c_test() local
680 crc ^= __crc32c_le(test[i].crc, test_buf + in crc32c_test()
690 if (test[i].crc32c_le != __crc32c_le(test[i].crc, test_buf + in crc32c_test()
719 crc_full = __crc32c_le(test[i].crc, test_buf + test[i].start, in crc32c_combine_test()
725 crc1 = __crc32c_le(test[i].crc, test_buf + in crc32c_combine_test()
756 static u32 crc; in crc32_test() local
762 crc ^= crc32_le(test[i].crc, test_buf + in crc32_test()
765 crc ^= crc32_be(test[i].crc, test_buf + in crc32_test()
775 if (test[i].crc_le != crc32_le(test[i].crc, test_buf + in crc32_test()
[all …]
Dcrc16.c57 u16 crc16(u16 crc, u8 const *buffer, size_t len) in crc16() argument
60 crc = crc16_byte(crc, *buffer++); in crc16()
61 return crc; in crc16()
Dcrc7.c67 u8 crc7_be(u8 crc, const u8 *buffer, size_t len) in crc7_be() argument
70 crc = crc7_be_byte(crc, *buffer++); in crc7_be()
71 return crc; in crc7_be()
Dcrc-ccitt.c60 u16 crc_ccitt(u16 crc, u8 const *buffer, size_t len) in crc_ccitt() argument
63 crc = crc_ccitt_byte(crc, *buffer++); in crc_ccitt()
64 return crc; in crc_ccitt()
Dcrc-itu-t.c59 u16 crc_itu_t(u16 crc, const u8 *buffer, size_t len) in crc_itu_t() argument
62 crc = crc_itu_t_byte(crc, *buffer++); in crc_itu_t()
63 return crc; in crc_itu_t()
Dcrc8.c74 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc) in crc8() argument
78 crc = table[(crc ^ *pdata++) & 0xff]; in crc8()
80 return crc; in crc8()
Dcrc-t10dif.c22 __u16 crc_t10dif_update(__u16 crc, const unsigned char *buffer, size_t len) in crc_t10dif_update() argument
31 return crc_t10dif_generic(crc, buffer, len); in crc_t10dif_update()
35 *(__u16 *)desc.ctx = crc; in crc_t10dif_update()
Dlibcrc32c.c43 u32 crc32c(u32 crc, const void *address, unsigned int length) in crc32c() argument
51 *ctx = crc; in crc32c()
DMakefile109 obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o
111 obj-$(CONFIG_CRC_T10DIF)+= crc-t10dif.o
112 obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o
Dinflate.c1138 static ulg crc; /* initialized in makecrc() so it'll reside in bss */ variable
1139 #define CRC_VALUE (crc ^ 0xffffffffUL)
1179 crc = (ulg)0xffffffffUL; /* shift register contents */ in makecrc()
/lib/xz/
Dxz_crc32.c49 XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc) in xz_crc32() argument
51 crc = ~crc; in xz_crc32()
54 crc = xz_crc32_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8); in xz_crc32()
58 return ~crc; in xz_crc32()
Dxz_dec_test.c62 static uint32_t crc; variable
73 crc = 0xFFFFFFFF; in xz_dec_test_open()
134 crc = crc32(crc, buffer_out, buffers.out_pos); in xz_dec_test_write()
144 "CRC32 = 0x%08X\n", ~crc); in xz_dec_test_write()
Dxz_stream.h16 # define xz_crc32(buf, size, crc) \ argument
17 (~crc32_le(~(uint32_t)(crc), buf, size))
/lib/842/
D842_decompress.c292 u64 crc; in sw842_decompress() local
387 ret = next_bits(&p, &crc, CRC_BITS); in sw842_decompress()
394 if (crc != (u64)crc32_be(0, out, total - p.olen)) { in sw842_decompress()
D842_compress.c493 u32 crc; in sw842_compress() local
591 crc = crc32_be(0, in, ilen); in sw842_compress()
592 ret = add_bits(p, crc, CRC_BITS); in sw842_compress()