Home
last modified time | relevance | path

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

12345678910>>...19

/external/e2fsprogs/lib/ext2fs/
Dcrc32c.c77 crc32_body(uint32_t crc, unsigned char const *buf, size_t len, in crc32_body() argument
81 # define DO_CRC(x) (crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)) in crc32_body()
87 # define DO_CRC(x) (crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)) in crc32_body()
116 q = crc ^ *++b; /* use pre increment for speed */ in crc32_body()
118 crc = DO_CRC4; in crc32_body()
120 crc = DO_CRC8; in crc32_body()
122 crc ^= DO_CRC4; in crc32_body()
133 return crc; in crc32_body()
147 static inline uint32_t crc32_le_generic(uint32_t crc, unsigned char const *p, in crc32_le_generic() argument
154 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 …]
/external/libaom/libaom/av1/encoder/
Dhash.c76 uint32_t crc; in av1_crc32c_calculator_init() local
79 crc = n; in av1_crc32c_calculator_init()
80 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
81 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
82 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
83 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
84 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
85 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
86 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
87 crc = crc & 1 ? (crc >> 1) ^ POLY : crc >> 1; in av1_crc32c_calculator_init()
[all …]
/external/u-boot/drivers/mtd/ubi/
Dcrc32.c61 u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
69 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
73 crc ^= *p++; in crc32_le()
75 crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); in crc32_le()
77 return crc; in crc32_le()
81 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
88 # define DO_CRC(x) crc = tab[ (crc ^ (x)) & 255 ] ^ (crc>>8) in crc32_le()
90 # define DO_CRC(x) crc = tab[ ((crc >> 24) ^ (x)) & 255] ^ (crc<<8) in crc32_le()
93 crc = __cpu_to_le32(crc); in crc32_le()
108 crc ^= *++b; in crc32_le()
[all …]
/external/aac/libFDK/src/
DFDK_crc.cpp339 USHORT crc = *pCrc; /* get crc value */ in calcCrc_Bits() local
344 tmp ^= ((crc & crcMask) ? 1 : 0); in calcCrc_Bits()
346 crc <<= 1; in calcCrc_Bits()
347 crc ^= tmp; in calcCrc_Bits()
351 USHORT tmp = (crc & crcMask) ? crcPoly : 0; // process single bit in calcCrc_Bits()
352 crc <<= 1; in calcCrc_Bits()
353 crc ^= tmp; in calcCrc_Bits()
356 *pCrc = crc; /* update crc value */ in calcCrc_Bits()
379 USHORT crc = *pCrc; /* get crc value */ in calcCrc_Bytes() local
386 crc = in calcCrc_Bytes()
[all …]
/external/flac/libFLAC/
Dcrc.c114 void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc) in FLAC__crc8_update() argument
116 *crc = FLAC__crc8_table[*crc ^ data]; in FLAC__crc8_update()
119 void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc) in FLAC__crc8_update_block() argument
122 *crc = FLAC__crc8_table[*crc ^ *data++]; in FLAC__crc8_update_block()
127 FLAC__uint8 crc = 0; in FLAC__crc8() local
130 crc = FLAC__crc8_table[crc ^ *data++]; in FLAC__crc8()
132 return crc; in FLAC__crc8()
137 unsigned crc = 0; in FLAC__crc16() local
140 crc = ((crc<<8) ^ FLAC__crc16_table[(crc>>8) ^ *data++]) & 0xffff; in FLAC__crc16()
142 return crc; in FLAC__crc16()
/external/swiftshader/third_party/llvm-7.0/llvm/test/MC/ARM/
Ddirective-arch_extension-crc.s10 .arch_extension crc
12 @ CHECK-V7-NEXT: .arch_extension crc
15 .type crc,%function
16 crc: label
18 @ CHECK-V7: error: instruction requires: crc armv8
20 @ CHECK-V7: error: instruction requires: crc armv8
22 @ CHECK-V7: error: instruction requires: crc armv8
25 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
29 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32-thumb.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
/external/llvm/test/MC/ARM/
Ddirective-arch_extension-crc.s10 .arch_extension crc
12 @ CHECK-V7-NEXT: .arch_extension crc
15 .type crc,%function
16 crc: label
18 @ CHECK-V7: error: instruction requires: crc armv8
20 @ CHECK-V7: error: instruction requires: crc armv8
22 @ CHECK-V7: error: instruction requires: crc armv8
25 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
29 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32-thumb.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
/external/u-boot/common/
Dddr_spd.c71 int crc, i; in crc16() local
73 crc = 0; in crc16()
75 crc = crc ^ (int)*ptr++ << 8; in crc16()
77 if (crc & 0x8000) in crc16()
78 crc = crc << 1 ^ 0x1021; in crc16()
80 crc = crc << 1; in crc16()
82 return crc & 0xffff; in crc16()
106 if (spd->crc[0] == crc_lsb && spd->crc[1] == crc_msb) { in ddr3_spd_check()
112 spd->crc[0], crc_lsb, spd->crc[1], crc_msb); in ddr3_spd_check()
131 if (spd->crc[0] != crc_lsb || spd->crc[1] != crc_msb) { in ddr4_spd_check()
[all …]
/external/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()
/external/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()
/external/libaom/libaom/av1/encoder/x86/
Dhash_sse42.c19 #define CALC_CRC(op, crc, type, buf, len) \ argument
21 (crc) = op((crc), *(type *)(buf)); \
35 uint32_t crc = 0xFFFFFFFF; in av1_get_crc32c_value_sse4_2() local
39 crc = _mm_crc32_u8(crc, *buf); in av1_get_crc32c_value_sse4_2()
43 uint64_t crc64 = crc; in av1_get_crc32c_value_sse4_2()
45 crc = (uint32_t)crc64; in av1_get_crc32c_value_sse4_2()
47 CALC_CRC(_mm_crc32_u32, crc, uint32_t, buf, len); in av1_get_crc32c_value_sse4_2()
48 CALC_CRC(_mm_crc32_u16, crc, uint16_t, buf, len); in av1_get_crc32c_value_sse4_2()
49 CALC_CRC(_mm_crc32_u8, crc, uint8_t, buf, len); in av1_get_crc32c_value_sse4_2()
50 return (crc ^= 0xFFFFFFFF); in av1_get_crc32c_value_sse4_2()
/external/flac/libFLAC/include/private/
Dcrc.h43 #define FLAC__CRC8_UPDATE(data, crc) (crc) = FLAC__crc8_table[(crc) ^ (data)]; argument
44 void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc);
45 void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc);
54 #define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) & 0xffff) ^ FLAC__crc16_table[((crc)>>8) ^ (data… argument
57 #define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) ^ FLAC__crc16_table[((crc)>>8) ^ (data)]) & 0xff…
/external/u-boot/lib/
Dcrc32.c169 # define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)
171 # define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
179 uint32_t ZEXPORT crc32_no_comp(uint32_t crc, const Bytef *buf, uInt len) in crc32_no_comp() argument
188 crc = cpu_to_le32(crc); in crc32_no_comp()
202 crc ^= *++b; /* use pre increment for speed */ in crc32_no_comp()
217 return le32_to_cpu(crc); in crc32_no_comp()
221 uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *p, uInt len) in crc32() argument
223 return crc32_no_comp(crc ^ 0xffffffffL, p, len) ^ 0xffffffffL; in crc32()
230 uint32_t ZEXPORT crc32_wd (uint32_t crc, in crc32_wd() argument
244 crc = crc32 (crc, curr, chunk); in crc32_wd()
[all …]
/external/libtextclassifier/lang_id/common/flatbuffers/
Dmodel-utils.cc154 void UpdateCrc(mobile::Crc32 *crc, const flatbuffers::Vector<T> *s, in UpdateCrc() argument
156 crc->Update("|"); in UpdateCrc()
157 crc->Update(info.data(), info.size()); in UpdateCrc()
158 crc->Update(":"); in UpdateCrc()
160 crc->Update("empty"); in UpdateCrc()
162 crc->Update(reinterpret_cast<const char *>(s->data()), in UpdateCrc()
178 mobile::Crc32 crc; in ComputeCrc2Checksum() local
180 return crc.Get(); in ComputeCrc2Checksum()
182 crc.Update("|Parameters:"); in ComputeCrc2Checksum()
187 UpdateCrc(&crc, p->name(), "name"); in ComputeCrc2Checksum()
[all …]
/external/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()
/external/u-boot/net/
Deth_legacy.c321 u32 crc; in ether_crc() local
322 crc = ~0; in ether_crc()
324 crc ^= *p++; in ether_crc()
326 crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); in ether_crc()
329 crc = (crc >> 16) | (crc << 16); in ether_crc()
330 crc = (crc >> 8 & 0x00ff00ff) | (crc << 8 & 0xff00ff00); in ether_crc()
331 crc = (crc >> 4 & 0x0f0f0f0f) | (crc << 4 & 0xf0f0f0f0); in ether_crc()
332 crc = (crc >> 2 & 0x33333333) | (crc << 2 & 0xcccccccc); in ether_crc()
333 crc = (crc >> 1 & 0x55555555) | (crc << 1 & 0xaaaaaaaa); in ether_crc()
334 return crc; in ether_crc()
/external/lzma/C/
DLzHash.h18 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
23 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
27 hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
30 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
34 temp ^= (p->crc[cur[3]] << 5); \
36 hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; }
39 #define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
43 h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
46 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
51 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
[all …]
/external/u-boot/board/keymile/common/
Divm.c22 unsigned short crc = 0; /* final result */ in ivm_calc_crc() local
32 r1 = crc_tab[crc & 0xF]; in ivm_calc_crc()
33 crc = ((crc) >> 4) & 0x0FFF; in ivm_calc_crc()
34 crc = crc ^ r1 ^ crc_tab[byte & 0xF]; in ivm_calc_crc()
37 r1 = crc_tab[crc & 0xF]; in ivm_calc_crc()
38 crc = (crc >> 4) & 0x0FFF; in ivm_calc_crc()
39 crc = crc ^ r1 ^ crc_tab[(byte >> 4) & 0xF]; in ivm_calc_crc()
41 return crc; in ivm_calc_crc()
174 unsigned long crc; in ivm_check_crc() local
177 crc = ivm_calc_crc(buf, CONFIG_SYS_IVM_EEPROM_PAGE_LEN - 2); in ivm_check_crc()
[all …]
/external/python/cpython2/Modules/zlib/
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 …]

12345678910>>...19