/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
/* Table-driven software version as a fall-back. This is about 15 times slower than using the hardware instructions. This assumes little-endian integers,
as is the case on Intel processors that the assembler code here is for. */
uint32_t av1_get_crc32c_value_c(void *c, uint8_t *buf, size_t len) { const uint8_t *next = (const uint8_t *)(buf);
uint64_t crc;
CRC32C *p = (CRC32C *)c;
crc = 0 ^ 0xffffffff; while (len && ((uintptr_t)next & 7) != 0) {
crc = p->table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
len--;
} while (len >= 8) {
crc ^= *(uint64_t *)next;
crc = p->table[7][crc & 0xff] ^ p->table[6][(crc >> 8) & 0xff] ^
p->table[5][(crc >> 16) & 0xff] ^ p->table[4][(crc >> 24) & 0xff] ^
p->table[3][(crc >> 32) & 0xff] ^ p->table[2][(crc >> 40) & 0xff] ^
p->table[1][(crc >> 48) & 0xff] ^ p->table[0][crc >> 56];
next += 8;
len -= 8;
} while (len) {
crc = p->table[0][(crc ^ *next++) & 0xff] ^ (crc >> 8);
len--;
} return (uint32_t)crc ^ 0xffffffff;
}
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.