Home
last modified time | relevance | path

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

12345678910>>...16

/third_party/e2fsprogs/lib/ext2fs/
Dcrc32c.c83 crc32_body(uint32_t crc, unsigned char const *buf, size_t len, in crc32_body() argument
87 # define DO_CRC(x) (crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)) in crc32_body()
93 # define DO_CRC(x) (crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)) in crc32_body()
122 q = crc ^ *++b; /* use pre increment for speed */ in crc32_body()
124 crc = DO_CRC4; in crc32_body()
126 crc = DO_CRC8; in crc32_body()
128 crc ^= DO_CRC4; in crc32_body()
139 return crc; in crc32_body()
153 static inline uint32_t crc32_le_generic(uint32_t crc, unsigned char const *p, in crc32_le_generic() argument
160 crc ^= *p++; in crc32_le_generic()
[all …]
Dgen_crc32ctable.c36 uint32_t crc = 1; in crc32cinit_le() local
41 crc = (crc >> 1) ^ ((crc & 1) ? CRC32C_POLY_LE : 0); in crc32cinit_le()
43 crc32ctable_le[0][i + j] = crc ^ crc32ctable_le[0][j]; in crc32cinit_le()
46 crc = crc32ctable_le[0][i]; in crc32cinit_le()
48 crc = crc32ctable_le[0][crc & 0xff] ^ (crc >> 8); in crc32cinit_le()
49 crc32ctable_le[j][i] = crc; in crc32cinit_le()
60 uint32_t crc = 0x80000000; in crc32init_be() local
65 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0); in crc32init_be()
67 crc32table_be[0][i + j] = crc ^ crc32table_be[0][j]; in crc32init_be()
70 crc = crc32table_be[0][i]; in crc32init_be()
[all …]
Dcsum.c64 __u32 crc; in ext2fs_mmp_csum_set() local
69 crc = ext2fs_mmp_csum(fs, mmp); in ext2fs_mmp_csum_set()
70 mmp->mmp_checksum = ext2fs_cpu_to_le32(crc); in ext2fs_mmp_csum_set()
113 __u32 flag, crc; in ext2fs_superblock_csum_set() local
123 crc = ext2fs_superblock_csum(fs, sb); in ext2fs_superblock_csum_set()
124 sb->s_checksum = ext2fs_cpu_to_le32(crc); in ext2fs_superblock_csum_set()
133 __u32 *crc) in ext2fs_ext_attr_block_csum() argument
140 *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&block, in ext2fs_ext_attr_block_csum()
142 *crc = ext2fs_crc32c_le(*crc, (unsigned char *)buf, fs->blocksize); in ext2fs_ext_attr_block_csum()
170 __u32 crc; in ext2fs_ext_attr_block_csum_set() local
[all …]
/third_party/zlib/
Dcrc32.c613 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
614 unsigned long crc; in crc32_z()
633 crc ^= 0xffffffff;
639 __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val));
657 __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0));
663 crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1;
664 crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2;
678 __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0));
685 crc = multmodp(val, crc) ^ crc1;
686 crc = multmodp(val, crc) ^ crc2;
[all …]
/third_party/gptfdisk/
Dcrc32.cc34 unsigned long crc; in chksum_crc32() local
37 crc = 0xFFFFFFFF; in chksum_crc32()
40 crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_tab[(crc ^ *block++) & 0xFF]; in chksum_crc32()
42 return (crc ^ 0xFFFFFFFF); in chksum_crc32()
52 unsigned long crc, poly; in chksum_crc32gentab() local
58 crc = i; in chksum_crc32gentab()
61 if (crc & 1) in chksum_crc32gentab()
63 crc = (crc >> 1) ^ poly; in chksum_crc32gentab()
67 crc >>= 1; in chksum_crc32gentab()
70 crc_tab[i] = crc; in chksum_crc32gentab()
/third_party/gstreamer/gstplugins_bad/ext/sctp/usrsctp/usrsctplib/netinet/
Dsctp_crc32.c544 sctp_crc32c_sb8_64_bit(uint32_t crc, in sctp_crc32c_sb8_64_bit() argument
558 crc = sctp_crc_tableil8_o32[(crc ^ *p_buf++) & 0x000000FF] ^ in sctp_crc32c_sb8_64_bit()
559 (crc >> 8); in sctp_crc32c_sb8_64_bit()
562 crc ^= *p_buf++; in sctp_crc32c_sb8_64_bit()
563 crc ^= (*p_buf++) << 8; in sctp_crc32c_sb8_64_bit()
564 crc ^= (*p_buf++) << 16; in sctp_crc32c_sb8_64_bit()
565 crc ^= (*p_buf++) << 24; in sctp_crc32c_sb8_64_bit()
567 crc ^= *(const uint32_t *) p_buf; in sctp_crc32c_sb8_64_bit()
570 term1 = sctp_crc_tableil8_o88[crc & 0x000000FF] ^ in sctp_crc32c_sb8_64_bit()
571 sctp_crc_tableil8_o80[(crc >> 8) & 0x000000FF]; in sctp_crc32c_sb8_64_bit()
[all …]
/third_party/toybox/toys/posix/
Dcksum.c42 static unsigned cksum_be(unsigned crc, unsigned char c)
44 return (crc<<8)^TT.crc_table[(crc>>24)^c];
47 static unsigned cksum_le(unsigned crc, unsigned char c) in cksum_le() argument
49 return TT.crc_table[(crc^c)&0xff] ^ (crc>>8); in cksum_le()
54 unsigned crc = (toys.optflags & FLAG_P) ? 0xffffffff : 0; in do_cksum() local
56 unsigned (*cksum)(unsigned crc, unsigned char c); in do_cksum()
68 for (i=0; i<len; i++) crc=cksum(crc, toybuf[i]); in do_cksum()
76 crc = cksum(crc, llen); in do_cksum()
82 (toys.optflags & FLAG_I) ? crc : ~crc); in do_cksum()
/third_party/mindspore/mindspore/ccsrc/utils/system/
Dcrc32c.cc274 static inline void CRC32T8(uint32 *crc, const uint8 **p) { in CRC32T8() argument
275 auto c = static_cast<uint32>(*crc ^ LE_LOAD32(*p)); in CRC32T8()
277 …*crc = crc_table_o88[c & 0xff] ^ crc_table_o80[(c >> 8) & 0xff] ^ crc_table_o72[(c >> 16) & 0xff] ^ in CRC32T8()
280 …*crc = (*crc) ^ crc_table_o56[c & 0xff] ^ crc_table_o48[(c >> 8) & 0xff] ^ crc_table_o40[(c >> 16)… in CRC32T8()
288 uint32_t crc = init_crc ^ 0xffffffffu; in MakeCrc32c() local
305 crc = crc_table_o32[(crc & 0xff) ^ (*bp++)] ^ (crc >> 8); in MakeCrc32c()
311 CRC32T8(&crc, &bp); in MakeCrc32c()
316 crc = crc_table_o32[(crc & 0xff) ^ (*bp++)] ^ (crc >> 8); in MakeCrc32c()
318 return crc ^ 0xffffffffu; in MakeCrc32c()
/third_party/ffmpeg/libavcodec/
Dmlp.c90 uint16_t crc; in ff_mlp_checksum16() local
92 crc = av_crc(crc_2D, 0, buf, buf_size - 2); in ff_mlp_checksum16()
93 crc ^= AV_RL16(buf + buf_size - 2); in ff_mlp_checksum16()
94 return crc; in ff_mlp_checksum16()
109 int crc = crc_1D[buf[0] & 0x3f]; in ff_mlp_restart_checksum() local
110 crc = av_crc(crc_1D, crc, buf + 1, num_bytes - 2); in ff_mlp_restart_checksum()
111 crc ^= buf[num_bytes - 1]; in ff_mlp_restart_checksum()
114 crc <<= 1; in ff_mlp_restart_checksum()
115 if (crc & 0x100) in ff_mlp_restart_checksum()
116 crc ^= 0x11D; in ff_mlp_restart_checksum()
[all …]
/third_party/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/
DCalculateCRC32.java38 int crc; in buildCRCTable() local
42 crc = i; in buildCRCTable()
44 if ((crc & 1) == 1) { in buildCRCTable()
45 crc = (crc >>> 1) ^ CRC32_POLYNOMIAL; in buildCRCTable()
47 crc >>>= 1; in buildCRCTable()
50 CRCTable[i] = crc; in buildCRCTable()
62 public static int computeCRC32(String buffer, int crc){ in computeCRC32() argument
63 return computeCRC32(buffer.getBytes(), crc); in computeCRC32()
66 public static int computeCRC32(byte buffer[], int crc) { in computeCRC32() argument
67 return computeCRC32(buffer, 0, buffer.length, crc); in computeCRC32()
/third_party/ffmpeg/libavutil/
Dcrc.c392 uint32_t av_crc(const AVCRC *ctx, uint32_t crc, in av_crc() argument
400 crc = ctx[((uint8_t) crc) ^ *buffer++] ^ (crc >> 8); in av_crc()
403 crc ^= av_le2ne32(*(const uint32_t *) buffer); buffer += 4; in av_crc()
404 crc = ctx[3 * 256 + ( crc & 0xFF)] ^ in av_crc()
405 ctx[2 * 256 + ((crc >> 8 ) & 0xFF)] ^ in av_crc()
406 ctx[1 * 256 + ((crc >> 16) & 0xFF)] ^ in av_crc()
407 ctx[0 * 256 + ((crc >> 24) )]; in av_crc()
412 crc = ctx[((uint8_t) crc) ^ *buffer++] ^ (crc >> 8); in av_crc()
414 return crc; in av_crc()
/third_party/littlefs/
Dlfs_util.c14 uint32_t lfs_crc(uint32_t crc, const void *buffer, size_t size) { in lfs_crc() argument
25 crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 0)) & 0xf]; in lfs_crc()
26 crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 4)) & 0xf]; in lfs_crc()
29 return crc; in lfs_crc()
/third_party/flutter/skia/third_party/externals/zlib/
Dcrc32.c207 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
211 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
212 unsigned long crc; in crc32_z()
236 crc = ~crc32_sse42_simd_(buf, chunk_size, ~(uint32_t)crc);
240 return crc;
261 return crc32_little(crc, buf, len);
263 return crc32_big(crc, buf, len);
266 crc = crc ^ 0xffffffffUL;
274 return crc ^ 0xffffffffUL;
278 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
[all …]
/third_party/skia/third_party/externals/zlib/
Dcrc32.c204 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
208 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
209 unsigned long crc; in crc32_z()
233 crc = ~crc32_sse42_simd_(buf, chunk_size, ~(uint32_t)crc);
237 return crc;
258 return crc32_little(crc, buf, len);
260 return crc32_big(crc, buf, len);
263 crc = crc ^ 0xffffffffUL;
271 return crc ^ 0xffffffffUL;
275 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
[all …]
/third_party/node/deps/zlib/
Dcrc32.c207 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
211 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
212 unsigned long crc; in crc32_z()
236 crc = ~crc32_sse42_simd_(buf, chunk_size, ~(uint32_t)crc);
240 return crc;
261 return crc32_little(crc, buf, len);
263 return crc32_big(crc, buf, len);
266 crc = crc ^ 0xffffffffUL;
274 return crc ^ 0xffffffffUL;
278 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
[all …]
/third_party/ffmpeg/tests/ref/fate/
Dcrc1 crc EDB88320 = 3D5CDD04
2 crc 04C11DB7 = E0BAF5C0
3 crc 00864CFB = 326039
4 crc 0000A001 = BFD8
5 crc 00008005 = BB1F
6 crc 00000007 = E3
7 crc 0000001D = D6
/third_party/boost/libs/beast/test/extern/zlib-1.2.11/
Dcrc32.c198 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
202 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
203 unsigned long crc; in crc32_z()
220 return crc32_little(crc, buf, len);
222 return crc32_big(crc, buf, len);
225 crc = crc ^ 0xffffffffUL;
233 return crc ^ 0xffffffffUL;
237 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
238 unsigned long crc; in crc32()
242 return crc32_z(crc, buf, len);
[all …]
/third_party/boost/tools/boost_install/test/iostreams/zlib-1.2.11/
Dcrc32.c198 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
202 unsigned long ZEXPORT crc32_z(crc, buf, len) in crc32_z() argument
203 unsigned long crc; in crc32_z()
220 return crc32_little(crc, buf, len);
222 return crc32_big(crc, buf, len);
225 crc = crc ^ 0xffffffffUL;
233 return crc ^ 0xffffffffUL;
237 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
238 unsigned long crc; in crc32()
242 return crc32_z(crc, buf, len);
[all …]
/third_party/skia/third_party/externals/libpng/contrib/tools/
Dpng-fix-itxt.c46 unsigned long crc; in main() local
81 crc = crc32(0, Z_NULL, 0); in main()
93 crc = crc32(crc, buf+4, (uInt)length+4); in main()
98 if (((crc >> 24) & 0xffU) == buf[length+8] && in main()
99 ((crc >> 16) & 0xffU) == buf[length+9] && in main()
100 ((crc >> 8) & 0xffU) == buf[length+10] && in main()
101 ((crc ) & 0xffU) == buf[length+11]) in main()
113 crc = crc32(crc, buf+7+length, 1); in main()
/third_party/pixman/test/
Dfilter-reduction-test.c21 test_scale (const pixman_transform_t *xform, uint32_t crc) in test_scale() argument
48 crc = compute_crc32_for_image (crc, dest); in test_scale()
56 return crc; in test_scale()
72 uint32_t crc = 0; in main() local
94 crc = test_scale (&xform, crc); in main()
102 if (crc != CHECKSUM) in main()
104 printf ("filter-reduction-test failed! (checksum=0x%08X, expected 0x%08X)\n", crc, CHECKSUM); in main()
109 printf ("filter-reduction-test passed (checksum=0x%08X)\n", crc); in main()
/third_party/libpng/contrib/tools/
Dpng-fix-itxt.c46 unsigned long crc; in main() local
81 crc = crc32(0, Z_NULL, 0); in main()
93 crc = crc32(crc, buf+4, (uInt)length+4); in main()
98 if (((crc >> 24) & 0xffU) == buf[length+8] && in main()
99 ((crc >> 16) & 0xffU) == buf[length+9] && in main()
100 ((crc >> 8) & 0xffU) == buf[length+10] && in main()
101 ((crc ) & 0xffU) == buf[length+11]) in main()
113 crc = crc32(crc, buf+7+length, 1); in main()
/third_party/flutter/skia/third_party/externals/libpng/contrib/tools/
Dpng-fix-itxt.c46 unsigned long crc; in main() local
81 crc = crc32(0, Z_NULL, 0); in main()
93 crc = crc32(crc, buf+4, (uInt)length+4); in main()
98 if (((crc >> 24) & 0xffU) == buf[length+8] && in main()
99 ((crc >> 16) & 0xffU) == buf[length+9] && in main()
100 ((crc >> 8) & 0xffU) == buf[length+10] && in main()
101 ((crc ) & 0xffU) == buf[length+11]) in main()
113 crc = crc32(crc, buf+7+length, 1); in main()
/third_party/ffmpeg/libavfilter/
Dvf_readvitc.c66 uint8_t crc; in get_vitc_crc() local
68 crc = 0x01 | (line[0] << 2); in get_vitc_crc()
69 crc ^= (line[0] >> 6) | 0x04 | (line[1] << 4); in get_vitc_crc()
70 crc ^= (line[1] >> 4) | 0x10 | (line[2] << 6); in get_vitc_crc()
71 crc ^= (line[2] >> 2) | 0x40; in get_vitc_crc()
72 crc ^= line[3]; in get_vitc_crc()
73 crc ^= 0x01 | (line[4] << 2); in get_vitc_crc()
74 crc ^= (line[4] >> 6) | 0x04 | (line[5] << 4); in get_vitc_crc()
75 crc ^= (line[5] >> 4) | 0x10 | (line[6] << 6); in get_vitc_crc()
76 crc ^= (line[6] >> 2) | 0x40; in get_vitc_crc()
[all …]
/third_party/flutter/skia/third_party/externals/sdl/src/test/
DSDL_test_crc32.c131 register CrcUint32 crc; in SDLTest_Crc32CalcBuffer() local
145 crc = *crc32; in SDLTest_Crc32CalcBuffer()
148 crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; in SDLTest_Crc32CalcBuffer()
150 crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[ (crc ^ *p) & 0xFF ]; in SDLTest_Crc32CalcBuffer()
153 *crc32 = crc; in SDLTest_Crc32CalcBuffer()
/third_party/ffmpeg/libavformat/
Dcrcenc.c33 CRCState *crc = s->priv_data; in crc_write_header() local
36 crc->crcval = 1; in crc_write_header()
43 CRCState *crc = s->priv_data; in crc_write_packet() local
44 crc->crcval = av_adler32_update(crc->crcval, pkt->data, pkt->size); in crc_write_packet()
50 CRCState *crc = s->priv_data; in crc_write_trailer() local
53 snprintf(buf, sizeof(buf), "CRC=0x%08"PRIx32"\n", crc->crcval); in crc_write_trailer()

12345678910>>...16