diff options
author | Robert Kausch <robert.kausch@freac.org> | 2018-04-30 11:39:28 +0200 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2018-05-20 10:29:48 +1000 |
commit | fcec829b2ee060b07f21ffc55d026185ab392009 (patch) | |
tree | ce60abc8db12e1703b2710e132a50dc0cc03a78f /src/libFLAC | |
parent | 85fca3c9ecba424c41d45da8ee04a258a3ac50b4 (diff) | |
download | flac-fcec829b2ee060b07f21ffc55d026185ab392009.tar.gz |
Remove unused CRC8 functions.
Diffstat (limited to 'src/libFLAC')
-rw-r--r-- | src/libFLAC/crc.c | 15 | ||||
-rw-r--r-- | src/libFLAC/include/private/crc.h | 6 |
2 files changed, 3 insertions, 18 deletions
diff --git a/src/libFLAC/crc.c b/src/libFLAC/crc.c index a36d9470..7df3b4f3 100644 --- a/src/libFLAC/crc.c +++ b/src/libFLAC/crc.c @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2016 Xiph.Org Foundation + * Copyright (C) 2011-2018 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -38,7 +38,7 @@ /* CRC-8, poly = x^8 + x^2 + x^1 + x^0, init = 0 */ -FLAC__byte const FLAC__crc8_table[256] = { +FLAC__uint8 const FLAC__crc8_table[256] = { 0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15, 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D, 0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65, @@ -111,17 +111,6 @@ uint32_t const FLAC__crc16_table[256] = { }; -void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc) -{ - *crc = FLAC__crc8_table[*crc ^ data]; -} - -void FLAC__crc8_update_block(const FLAC__byte *data, uint32_t len, FLAC__uint8 *crc) -{ - while(len--) - *crc = FLAC__crc8_table[*crc ^ *data++]; -} - FLAC__uint8 FLAC__crc8(const FLAC__byte *data, uint32_t len) { FLAC__uint8 crc = 0; diff --git a/src/libFLAC/include/private/crc.h b/src/libFLAC/include/private/crc.h index f783dcc2..81df92a7 100644 --- a/src/libFLAC/include/private/crc.h +++ b/src/libFLAC/include/private/crc.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2016 Xiph.Org Foundation + * Copyright (C) 2011-2018 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,10 +39,6 @@ ** polynomial = x^8 + x^2 + x^1 + x^0 ** init = 0 */ -extern FLAC__byte const FLAC__crc8_table[256]; -#define FLAC__CRC8_UPDATE(data, crc) (crc) = FLAC__crc8_table[(crc) ^ (data)]; -void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc); -void FLAC__crc8_update_block(const FLAC__byte *data, uint32_t len, FLAC__uint8 *crc); FLAC__uint8 FLAC__crc8(const FLAC__byte *data, uint32_t len); /* 16 bit CRC generator, MSB shifted first |