/* * 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. */ #include "av1/encoder/hash.h" #include "config/av1_rtcd.h" static void crc_calculator_process_data(CRC_CALCULATOR *p_crc_calculator, uint8_t *pData, uint32_t dataLength) { … } static void crc_calculator_reset(CRC_CALCULATOR *p_crc_calculator) { … } static uint32_t crc_calculator_get_crc(CRC_CALCULATOR *p_crc_calculator) { … } static void crc_calculator_init_table(CRC_CALCULATOR *p_crc_calculator) { … } void av1_crc_calculator_init(CRC_CALCULATOR *p_crc_calculator, uint32_t bits, uint32_t truncPoly) { … } uint32_t av1_get_crc_value(CRC_CALCULATOR *p_crc_calculator, uint8_t *p, int length) { … } /* CRC-32C (iSCSI) polynomial in reversed bit order. */ #define POLY … /* Construct table for software CRC-32C calculation. */ void av1_crc32c_calculator_init(CRC32C *p_crc32c) { … } /* 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) { … }