Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
flac
Commits
fcec829b
Commit
fcec829b
authored
Apr 30, 2018
by
Robert Kausch
Committed by
Erik de Castro Lopo
May 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused CRC8 functions.
parent
85fca3c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
18 deletions
+3
-18
src/libFLAC/crc.c
src/libFLAC/crc.c
+2
-13
src/libFLAC/include/private/crc.h
src/libFLAC/include/private/crc.h
+1
-5
No files found.
src/libFLAC/crc.c
View file @
fcec829b
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-201
6
Xiph.Org Foundation
* Copyright (C) 2011-201
8
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
;
...
...
src/libFLAC/include/private/crc.h
View file @
fcec829b
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-201
6
Xiph.Org Foundation
* Copyright (C) 2011-201
8
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment