summaryrefslogtreecommitdiff
path: root/apps/codecs/libFLAC/include/private
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libFLAC/include/private')
-rw-r--r--apps/codecs/libFLAC/include/private/all.h48
-rw-r--r--apps/codecs/libFLAC/include/private/bitbuffer.h161
-rw-r--r--apps/codecs/libFLAC/include/private/bitmath.h42
-rw-r--r--apps/codecs/libFLAC/include/private/coldfire.h10
-rw-r--r--apps/codecs/libFLAC/include/private/cpu.h94
-rw-r--r--apps/codecs/libFLAC/include/private/crc.h57
-rw-r--r--apps/codecs/libFLAC/include/private/fixed.h97
-rw-r--r--apps/codecs/libFLAC/include/private/float.h97
-rw-r--r--apps/codecs/libFLAC/include/private/format.h44
-rw-r--r--apps/codecs/libFLAC/include/private/lpc.h197
-rw-r--r--apps/codecs/libFLAC/include/private/md5.h54
-rw-r--r--apps/codecs/libFLAC/include/private/memory.h56
-rw-r--r--apps/codecs/libFLAC/include/private/metadata.h40
-rw-r--r--apps/codecs/libFLAC/include/private/stream_encoder_framing.h45
14 files changed, 0 insertions, 1042 deletions
diff --git a/apps/codecs/libFLAC/include/private/all.h b/apps/codecs/libFLAC/include/private/all.h
deleted file mode 100644
index 5c9e9842e1..0000000000
--- a/apps/codecs/libFLAC/include/private/all.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__ALL_H
33#define FLAC__PRIVATE__ALL_H
34
35#include "bitbuffer.h"
36#include "bitmath.h"
37#include "cpu.h"
38#include "crc.h"
39#include "fixed.h"
40#include "float.h"
41#include "format.h"
42#include "lpc.h"
43#include "md5.h"
44#include "memory.h"
45#include "metadata.h"
46#include "stream_encoder_framing.h"
47
48#endif
diff --git a/apps/codecs/libFLAC/include/private/bitbuffer.h b/apps/codecs/libFLAC/include/private/bitbuffer.h
deleted file mode 100644
index 18c812c039..0000000000
--- a/apps/codecs/libFLAC/include/private/bitbuffer.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__BITBUFFER_H
33#define FLAC__PRIVATE__BITBUFFER_H
34
35#include <stdio.h> /* for FILE */
36#include "FLAC/ordinals.h"
37
38/* @@@ This should be configurable. Valid values are currently 8 and 32. */
39/* @@@ WATCHOUT! do not use 32 with a little endian system yet. */
40#define FLAC__BITS_PER_BLURB 8
41
42#if FLAC__BITS_PER_BLURB == 8
43typedef FLAC__byte FLAC__blurb;
44#elif FLAC__BITS_PER_BLURB == 32
45typedef FLAC__uint32 FLAC__blurb;
46#else
47/* ERROR, only sizes of 8 and 32 are supported */
48#endif
49
50/*
51 * opaque structure definition
52 */
53struct FLAC__BitBuffer;
54typedef struct FLAC__BitBuffer FLAC__BitBuffer;
55
56/*
57 * construction, deletion, initialization, cloning functions
58 */
59FLAC__BitBuffer *FLAC__bitbuffer_new(void);
60void FLAC__bitbuffer_delete(FLAC__BitBuffer *bb);
61FLAC__bool FLAC__bitbuffer_init(FLAC__BitBuffer *bb);
62FLAC__bool FLAC__bitbuffer_init_from(FLAC__BitBuffer *bb, const FLAC__byte buffer[], unsigned bytes);
63FLAC__bool FLAC__bitbuffer_concatenate_aligned(FLAC__BitBuffer *dest, const FLAC__BitBuffer *src);
64void FLAC__bitbuffer_free(FLAC__BitBuffer *bb); /* does not 'free(buffer)' */
65FLAC__bool FLAC__bitbuffer_clear(FLAC__BitBuffer *bb);
66FLAC__bool FLAC__bitbuffer_clone(FLAC__BitBuffer *dest, const FLAC__BitBuffer *src);
67
68/*
69 * CRC functions
70 */
71void FLAC__bitbuffer_reset_read_crc16(FLAC__BitBuffer *bb, FLAC__uint16 seed);
72FLAC__uint16 FLAC__bitbuffer_get_read_crc16(FLAC__BitBuffer *bb);
73FLAC__uint16 FLAC__bitbuffer_get_write_crc16(const FLAC__BitBuffer *bb);
74FLAC__byte FLAC__bitbuffer_get_write_crc8(const FLAC__BitBuffer *bb);
75
76/*
77 * info functions
78 */
79FLAC__bool FLAC__bitbuffer_is_byte_aligned(const FLAC__BitBuffer *bb);
80FLAC__bool FLAC__bitbuffer_is_consumed_byte_aligned(const FLAC__BitBuffer *bb);
81unsigned FLAC__bitbuffer_bits_left_for_byte_alignment(const FLAC__BitBuffer *bb);
82unsigned FLAC__bitbuffer_get_input_bytes_unconsumed(const FLAC__BitBuffer *bb); /* do not call unless byte-aligned */
83
84/*
85 * direct buffer access
86 */
87void FLAC__bitbuffer_get_buffer(FLAC__BitBuffer *bb, const FLAC__byte **buffer, unsigned *bytes);
88void FLAC__bitbuffer_release_buffer(FLAC__BitBuffer *bb);
89
90/*
91 * write functions
92 */
93FLAC__bool FLAC__bitbuffer_write_zeroes(FLAC__BitBuffer *bb, unsigned bits);
94FLAC__bool FLAC__bitbuffer_write_raw_uint32(FLAC__BitBuffer *bb, FLAC__uint32 val, unsigned bits);
95FLAC__bool FLAC__bitbuffer_write_raw_int32(FLAC__BitBuffer *bb, FLAC__int32 val, unsigned bits);
96FLAC__bool FLAC__bitbuffer_write_raw_uint64(FLAC__BitBuffer *bb, FLAC__uint64 val, unsigned bits);
97#if 0 /* UNUSED */
98FLAC__bool FLAC__bitbuffer_write_raw_int64(FLAC__BitBuffer *bb, FLAC__int64 val, unsigned bits);
99#endif
100FLAC__bool FLAC__bitbuffer_write_raw_uint32_little_endian(FLAC__BitBuffer *bb, FLAC__uint32 val); /*only for bits=32*/
101FLAC__bool FLAC__bitbuffer_write_byte_block(FLAC__BitBuffer *bb, const FLAC__byte vals[], unsigned nvals);
102FLAC__bool FLAC__bitbuffer_write_unary_unsigned(FLAC__BitBuffer *bb, unsigned val);
103unsigned FLAC__bitbuffer_rice_bits(int val, unsigned parameter);
104#if 0 /* UNUSED */
105unsigned FLAC__bitbuffer_golomb_bits_signed(int val, unsigned parameter);
106unsigned FLAC__bitbuffer_golomb_bits_unsigned(unsigned val, unsigned parameter);
107#endif
108#ifdef FLAC__SYMMETRIC_RICE
109FLAC__bool FLAC__bitbuffer_write_symmetric_rice_signed(FLAC__BitBuffer *bb, int val, unsigned parameter);
110#if 0 /* UNUSED */
111FLAC__bool FLAC__bitbuffer_write_symmetric_rice_signed_guarded(FLAC__BitBuffer *bb, int val, unsigned parameter, unsigned max_bits, FLAC__bool *overflow);
112#endif
113FLAC__bool FLAC__bitbuffer_write_symmetric_rice_signed_escape(FLAC__BitBuffer *bb, int val, unsigned parameter);
114#endif
115FLAC__bool FLAC__bitbuffer_write_rice_signed(FLAC__BitBuffer *bb, int val, unsigned parameter);
116#if 0 /* UNUSED */
117FLAC__bool FLAC__bitbuffer_write_rice_signed_guarded(FLAC__BitBuffer *bb, int val, unsigned parameter, unsigned max_bits, FLAC__bool *overflow);
118#endif
119#if 0 /* UNUSED */
120FLAC__bool FLAC__bitbuffer_write_golomb_signed(FLAC__BitBuffer *bb, int val, unsigned parameter);
121FLAC__bool FLAC__bitbuffer_write_golomb_signed_guarded(FLAC__BitBuffer *bb, int val, unsigned parameter, unsigned max_bits, FLAC__bool *overflow);
122FLAC__bool FLAC__bitbuffer_write_golomb_unsigned(FLAC__BitBuffer *bb, unsigned val, unsigned parameter);
123FLAC__bool FLAC__bitbuffer_write_golomb_unsigned_guarded(FLAC__BitBuffer *bb, unsigned val, unsigned parameter, unsigned max_bits, FLAC__bool *overflow);
124#endif
125FLAC__bool FLAC__bitbuffer_write_utf8_uint32(FLAC__BitBuffer *bb, FLAC__uint32 val);
126FLAC__bool FLAC__bitbuffer_write_utf8_uint64(FLAC__BitBuffer *bb, FLAC__uint64 val);
127FLAC__bool FLAC__bitbuffer_zero_pad_to_byte_boundary(FLAC__BitBuffer *bb);
128
129/*
130 * read functions
131 */
132FLAC__bool FLAC__bitbuffer_peek_bit(FLAC__BitBuffer *bb, unsigned *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
133FLAC__bool FLAC__bitbuffer_read_bit(FLAC__BitBuffer *bb, unsigned *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
134FLAC__bool FLAC__bitbuffer_read_bit_to_uint32(FLAC__BitBuffer *bb, FLAC__uint32 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
135FLAC__bool FLAC__bitbuffer_read_bit_to_uint64(FLAC__BitBuffer *bb, FLAC__uint64 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
136FLAC__bool FLAC__bitbuffer_read_raw_uint32(FLAC__BitBuffer *bb, FLAC__uint32 *val, const unsigned bits, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
137FLAC__bool FLAC__bitbuffer_read_raw_int32(FLAC__BitBuffer *bb, FLAC__int32 *val, const unsigned bits, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
138FLAC__bool FLAC__bitbuffer_read_raw_uint64(FLAC__BitBuffer *bb, FLAC__uint64 *val, const unsigned bits, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
139#if 0 /* UNUSED */
140FLAC__bool FLAC__bitbuffer_read_raw_int64(FLAC__BitBuffer *bb, FLAC__int64 *val, const unsigned bits, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
141#endif
142FLAC__bool FLAC__bitbuffer_read_raw_uint32_little_endian(FLAC__BitBuffer *bb, FLAC__uint32 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data); /*only for bits=32*/
143FLAC__bool FLAC__bitbuffer_skip_bits_no_crc(FLAC__BitBuffer *bb, unsigned bits, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data); /* WATCHOUT: does not CRC the skipped data! */ /*@@@@ add to unit tests */
144FLAC__bool FLAC__bitbuffer_read_byte_block_aligned_no_crc(FLAC__BitBuffer *bb, FLAC__byte *val, unsigned nvals, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data); /* val may be 0 to skip bytes instead of reading them */ /* WATCHOUT: does not CRC the read data! */
145FLAC__bool FLAC__bitbuffer_read_unary_unsigned(FLAC__BitBuffer *bb, FLAC__uint32 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
146#ifdef FLAC__SYMMETRIC_RICE
147FLAC__bool FLAC__bitbuffer_read_symmetric_rice_signed(FLAC__BitBuffer *bb, int *val, unsigned parameter, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
148#endif
149FLAC__bool FLAC__bitbuffer_read_rice_signed(FLAC__BitBuffer *bb, int *val, unsigned parameter, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
150FLAC__bool FLAC__bitbuffer_read_rice_signed_block(FLAC__BitBuffer *bb, FLAC__int32 vals[], unsigned nvals, unsigned parameter, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
151#if 0 /* UNUSED */
152FLAC__bool FLAC__bitbuffer_read_golomb_signed(FLAC__BitBuffer *bb, int *val, unsigned parameter, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
153FLAC__bool FLAC__bitbuffer_read_golomb_unsigned(FLAC__BitBuffer *bb, unsigned *val, unsigned parameter, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data);
154#endif
155FLAC__bool FLAC__bitbuffer_read_utf8_uint32(FLAC__BitBuffer *bb, FLAC__uint32 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data, FLAC__byte *raw, unsigned *rawlen);
156FLAC__bool FLAC__bitbuffer_read_utf8_uint64(FLAC__BitBuffer *bb, FLAC__uint64 *val, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data, FLAC__byte *raw, unsigned *rawlen);
157#if 0
158void FLAC__bitbuffer_dump(const FLAC__BitBuffer *bb, FILE *out);
159#endif
160
161#endif
diff --git a/apps/codecs/libFLAC/include/private/bitmath.h b/apps/codecs/libFLAC/include/private/bitmath.h
deleted file mode 100644
index 1615c338c8..0000000000
--- a/apps/codecs/libFLAC/include/private/bitmath.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__BITMATH_H
33#define FLAC__PRIVATE__BITMATH_H
34
35#include "FLAC/ordinals.h"
36
37unsigned FLAC__bitmath_ilog2(FLAC__uint32 v);
38unsigned FLAC__bitmath_ilog2_wide(FLAC__uint64 v);
39unsigned FLAC__bitmath_silog2(int v);
40unsigned FLAC__bitmath_silog2_wide(FLAC__int64 v);
41
42#endif
diff --git a/apps/codecs/libFLAC/include/private/coldfire.h b/apps/codecs/libFLAC/include/private/coldfire.h
deleted file mode 100644
index 37fa3e2bd7..0000000000
--- a/apps/codecs/libFLAC/include/private/coldfire.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef SIMULATOR
2#ifndef _FLAC_COLDFIRE_H
3#define _FLAC_COLDFIRE_H
4
5#include <FLAC/ordinals.h>
6
7void FLAC__lpc_restore_signal_mcf5249(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
8
9#endif
10#endif
diff --git a/apps/codecs/libFLAC/include/private/cpu.h b/apps/codecs/libFLAC/include/private/cpu.h
deleted file mode 100644
index a57936051f..0000000000
--- a/apps/codecs/libFLAC/include/private/cpu.h
+++ /dev/null
@@ -1,94 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__CPU_H
33#define FLAC__PRIVATE__CPU_H
34
35#include "FLAC/ordinals.h"
36
37#ifdef HAVE_CONFIG_H
38#include <config.h>
39#endif
40
41typedef enum {
42 FLAC__CPUINFO_TYPE_IA32,
43 FLAC__CPUINFO_TYPE_PPC,
44 FLAC__CPUINFO_TYPE_UNKNOWN
45} FLAC__CPUInfo_Type;
46
47typedef struct {
48 FLAC__bool cmov;
49 FLAC__bool mmx;
50 FLAC__bool fxsr;
51 FLAC__bool sse;
52 FLAC__bool sse2;
53 FLAC__bool _3dnow;
54 FLAC__bool ext3dnow;
55 FLAC__bool extmmx;
56} FLAC__CPUInfo_IA32;
57
58typedef struct {
59 FLAC__bool altivec;
60 FLAC__bool ppc64;
61} FLAC__CPUInfo_PPC;
62
63extern const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV;
64extern const unsigned FLAC__CPUINFO_IA32_CPUID_MMX;
65extern const unsigned FLAC__CPUINFO_IA32_CPUID_FXSR;
66extern const unsigned FLAC__CPUINFO_IA32_CPUID_SSE;
67extern const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2;
68
69extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_3DNOW;
70extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXT3DNOW;
71extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX;
72
73typedef struct {
74 FLAC__bool use_asm;
75 FLAC__CPUInfo_Type type;
76 union {
77 FLAC__CPUInfo_IA32 ia32;
78 FLAC__CPUInfo_PPC ppc;
79 } data;
80} FLAC__CPUInfo;
81
82void FLAC__cpu_info(FLAC__CPUInfo *info);
83
84#ifndef FLAC__NO_ASM
85#ifdef FLAC__CPU_IA32
86#ifdef FLAC__HAS_NASM
87unsigned FLAC__cpu_info_asm_ia32();
88unsigned FLAC__cpu_info_extended_amd_asm_ia32();
89unsigned FLAC__cpu_info_sse_test_asm_ia32();
90#endif
91#endif
92#endif
93
94#endif
diff --git a/apps/codecs/libFLAC/include/private/crc.h b/apps/codecs/libFLAC/include/private/crc.h
deleted file mode 100644
index 487ed04010..0000000000
--- a/apps/codecs/libFLAC/include/private/crc.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__CRC_H
33#define FLAC__PRIVATE__CRC_H
34
35#include "FLAC/ordinals.h"
36
37/* 8 bit CRC generator, MSB shifted first
38** polynomial = x^8 + x^2 + x^1 + x^0
39** init = 0
40*/
41extern FLAC__byte const FLAC__crc8_table[256];
42#define FLAC__CRC8_UPDATE(data, crc) (crc) = FLAC__crc8_table[(crc) ^ (data)];
43void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc);
44void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc);
45FLAC__uint8 FLAC__crc8(const FLAC__byte *data, unsigned len);
46
47/* 16 bit CRC generator, MSB shifted first
48** polynomial = x^16 + x^15 + x^2 + x^0
49** init = 0
50*/
51extern FLAC__uint16 FLAC__crc16_table[256];
52#define FLAC__CRC16_UPDATE(data, crc) (crc) = ((crc)<<8) ^ FLAC__crc16_table[((crc)>>8) ^ (data)];
53void FLAC__crc16_update(const FLAC__byte data, FLAC__uint16 *crc);
54void FLAC__crc16_update_block(const FLAC__byte *data, unsigned len, FLAC__uint16 *crc);
55FLAC__uint16 FLAC__crc16(const FLAC__byte *data, unsigned len);
56
57#endif
diff --git a/apps/codecs/libFLAC/include/private/fixed.h b/apps/codecs/libFLAC/include/private/fixed.h
deleted file mode 100644
index 8401ffa8ee..0000000000
--- a/apps/codecs/libFLAC/include/private/fixed.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__FIXED_H
33#define FLAC__PRIVATE__FIXED_H
34
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38
39#include "private/float.h"
40#include "FLAC/format.h"
41
42/*
43 * FLAC__fixed_compute_best_predictor()
44 * --------------------------------------------------------------------
45 * Compute the best fixed predictor and the expected bits-per-sample
46 * of the residual signal for each order. The _wide() version uses
47 * 64-bit integers which is statistically necessary when bits-per-
48 * sample + log2(blocksize) > 30
49 *
50 * IN data[0,data_len-1]
51 * IN data_len
52 * OUT residual_bits_per_sample[0,FLAC__MAX_FIXED_ORDER]
53 */
54#ifndef FLAC__INTEGER_ONLY_LIBRARY
55unsigned FLAC__fixed_compute_best_predictor(const FLAC__int32 data[], unsigned data_len, FLAC__float residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
56# ifndef FLAC__NO_ASM
57# ifdef FLAC__CPU_IA32
58# ifdef FLAC__HAS_NASM
59unsigned FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov(const FLAC__int32 data[], unsigned data_len, FLAC__float residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
60# endif
61# endif
62# endif
63unsigned FLAC__fixed_compute_best_predictor_wide(const FLAC__int32 data[], unsigned data_len, FLAC__float residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
64#else
65unsigned FLAC__fixed_compute_best_predictor(const FLAC__int32 data[], unsigned data_len, FLAC__fixedpoint residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
66unsigned FLAC__fixed_compute_best_predictor_wide(const FLAC__int32 data[], unsigned data_len, FLAC__fixedpoint residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
67#endif
68
69/*
70 * FLAC__fixed_compute_residual()
71 * --------------------------------------------------------------------
72 * Compute the residual signal obtained from sutracting the predicted
73 * signal from the original.
74 *
75 * IN data[-order,data_len-1] original signal (NOTE THE INDICES!)
76 * IN data_len length of original signal
77 * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order
78 * OUT residual[0,data_len-1] residual signal
79 */
80void FLAC__fixed_compute_residual(const FLAC__int32 data[], unsigned data_len, unsigned order, FLAC__int32 residual[]);
81
82/*
83 * FLAC__fixed_restore_signal()
84 * --------------------------------------------------------------------
85 * Restore the original signal by summing the residual and the
86 * predictor.
87 *
88 * IN residual[0,data_len-1] residual signal
89 * IN data_len length of original signal
90 * IN order <= FLAC__MAX_FIXED_ORDER fixed-predictor order
91 * *** IMPORTANT: the caller must pass in the historical samples:
92 * IN data[-order,-1] previously-reconstructed historical samples
93 * OUT data[0,data_len-1] original signal
94 */
95void FLAC__fixed_restore_signal(const FLAC__int32 residual[], unsigned data_len, unsigned order, FLAC__int32 data[]);
96
97#endif
diff --git a/apps/codecs/libFLAC/include/private/float.h b/apps/codecs/libFLAC/include/private/float.h
deleted file mode 100644
index 67a5f266e8..0000000000
--- a/apps/codecs/libFLAC/include/private/float.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__FLOAT_H
33#define FLAC__PRIVATE__FLOAT_H
34
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38
39#include "FLAC/ordinals.h"
40
41/*
42 * These typedefs make it easier to ensure that integer versions of
43 * the library really only contain integer operations. All the code
44 * in libFLAC should use FLAC__float and FLAC__double in place of
45 * float and double, and be protected by checks of the macro
46 * FLAC__INTEGER_ONLY_LIBRARY.
47 *
48 * FLAC__real is the basic floating point type used in LPC analysis.
49 */
50#ifndef FLAC__INTEGER_ONLY_LIBRARY
51typedef double FLAC__double;
52typedef float FLAC__float;
53/*
54 * WATCHOUT: changing FLAC__real will change the signatures of many
55 * functions that have assembly language equivalents and break them.
56 */
57typedef float FLAC__real;
58#else
59/*
60 * The convention for FLAC__fixedpoint is to use the upper 16 bits
61 * for the integer part and lower 16 bits for the fractional part.
62 */
63typedef FLAC__int32 FLAC__fixedpoint;
64extern const FLAC__fixedpoint FLAC__FP_ZERO;
65extern const FLAC__fixedpoint FLAC__FP_ONE_HALF;
66extern const FLAC__fixedpoint FLAC__FP_ONE;
67extern const FLAC__fixedpoint FLAC__FP_LN2;
68extern const FLAC__fixedpoint FLAC__FP_E;
69
70#define FLAC__fixedpoint_trunc(x) ((x)>>16)
71
72#define FLAC__fixedpoint_mul(x, y) ( (FLAC__fixedpoint) ( ((FLAC__int64)(x)*(FLAC__int64)(y)) >> 16 ) )
73
74#define FLAC__fixedpoint_div(x, y) ( (FLAC__fixedpoint) ( ( ((FLAC__int64)(x)<<32) / (FLAC__int64)(y) ) >> 16 ) )
75
76/*
77 * FLAC__fixedpoint_log2()
78 * --------------------------------------------------------------------
79 * Returns the base-2 logarithm of the fixed-point number 'x' using an
80 * algorithm by Knuth for x >= 1.0
81 *
82 * 'fracbits' is the number of fractional bits of 'x'. 'fracbits' must
83 * be < 32 and evenly divisible by 4 (0 is OK but not very precise).
84 *
85 * 'precision' roughly limits the number of iterations that are done;
86 * use (unsigned)(-1) for maximum precision.
87 *
88 * If 'x' is less than one -- that is, x < (1<<fracbits) -- then this
89 * function will punt and return 0.
90 *
91 * The return value will also have 'fracbits' fractional bits.
92 */
93FLAC__uint32 FLAC__fixedpoint_log2(FLAC__uint32 x, unsigned fracbits, unsigned precision);
94
95#endif
96
97#endif
diff --git a/apps/codecs/libFLAC/include/private/format.h b/apps/codecs/libFLAC/include/private/format.h
deleted file mode 100644
index 69589c873c..0000000000
--- a/apps/codecs/libFLAC/include/private/format.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__FORMAT_H
33#define FLAC__PRIVATE__FORMAT_H
34
35#include "FLAC/format.h"
36
37unsigned FLAC__format_get_max_rice_partition_order(unsigned blocksize, unsigned predictor_order);
38unsigned FLAC__format_get_max_rice_partition_order_from_blocksize(unsigned blocksize);
39unsigned FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order(unsigned limit, unsigned blocksize, unsigned predictor_order);
40void FLAC__format_entropy_coding_method_partitioned_rice_contents_init(FLAC__EntropyCodingMethod_PartitionedRiceContents *object);
41void FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(FLAC__EntropyCodingMethod_PartitionedRiceContents *object);
42FLAC__bool FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size(FLAC__EntropyCodingMethod_PartitionedRiceContents *object, unsigned max_partition_order);
43
44#endif
diff --git a/apps/codecs/libFLAC/include/private/lpc.h b/apps/codecs/libFLAC/include/private/lpc.h
deleted file mode 100644
index 37286f5185..0000000000
--- a/apps/codecs/libFLAC/include/private/lpc.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__LPC_H
33#define FLAC__PRIVATE__LPC_H
34
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38
39#include "private/float.h"
40#include "FLAC/format.h"
41
42#ifndef FLAC__INTEGER_ONLY_LIBRARY
43
44/*
45 * FLAC__lpc_compute_autocorrelation()
46 * --------------------------------------------------------------------
47 * Compute the autocorrelation for lags between 0 and lag-1.
48 * Assumes data[] outside of [0,data_len-1] == 0.
49 * Asserts that lag > 0.
50 *
51 * IN data[0,data_len-1]
52 * IN data_len
53 * IN 0 < lag <= data_len
54 * OUT autoc[0,lag-1]
55 */
56void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
57#ifndef FLAC__NO_ASM
58# ifdef FLAC__CPU_IA32
59# ifdef FLAC__HAS_NASM
60void FLAC__lpc_compute_autocorrelation_asm_ia32(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
61void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_4(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
62void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_8(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
63void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
64void FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
65# endif
66# endif
67#endif
68
69/*
70 * FLAC__lpc_compute_lp_coefficients()
71 * --------------------------------------------------------------------
72 * Computes LP coefficients for orders 1..max_order.
73 * Do not call if autoc[0] == 0.0. This means the signal is zero
74 * and there is no point in calculating a predictor.
75 *
76 * IN autoc[0,max_order] autocorrelation values
77 * IN 0 < max_order <= FLAC__MAX_LPC_ORDER max LP order to compute
78 * OUT lp_coeff[0,max_order-1][0,max_order-1] LP coefficients for each order
79 * *** IMPORTANT:
80 * *** lp_coeff[0,max_order-1][max_order,FLAC__MAX_LPC_ORDER-1] are untouched
81 * OUT error[0,max_order-1] error for each order
82 *
83 * Example: if max_order is 9, the LP coefficients for order 9 will be
84 * in lp_coeff[8][0,8], the LP coefficients for order 8 will be
85 * in lp_coeff[7][0,7], etc.
86 */
87void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]);
88
89/*
90 * FLAC__lpc_quantize_coefficients()
91 * --------------------------------------------------------------------
92 * Quantizes the LP coefficients. NOTE: precision + bits_per_sample
93 * must be less than 32 (sizeof(FLAC__int32)*8).
94 *
95 * IN lp_coeff[0,order-1] LP coefficients
96 * IN order LP order
97 * IN FLAC__MIN_QLP_COEFF_PRECISION < precision
98 * desired precision (in bits, including sign
99 * bit) of largest coefficient
100 * OUT qlp_coeff[0,order-1] quantized coefficients
101 * OUT shift # of bits to shift right to get approximated
102 * LP coefficients. NOTE: could be negative.
103 * RETURN 0 => quantization OK
104 * 1 => coefficients require too much shifting for *shift to
105 * fit in the LPC subframe header. 'shift' is unset.
106 * 2 => coefficients are all zero, which is bad. 'shift' is
107 * unset.
108 */
109int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], unsigned order, unsigned precision, FLAC__int32 qlp_coeff[], int *shift);
110
111/*
112 * FLAC__lpc_compute_residual_from_qlp_coefficients()
113 * --------------------------------------------------------------------
114 * Compute the residual signal obtained from sutracting the predicted
115 * signal from the original.
116 *
117 * IN data[-order,data_len-1] original signal (NOTE THE INDICES!)
118 * IN data_len length of original signal
119 * IN qlp_coeff[0,order-1] quantized LP coefficients
120 * IN order > 0 LP order
121 * IN lp_quantization quantization of LP coefficients in bits
122 * OUT residual[0,data_len-1] residual signal
123 */
124void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]);
125void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]);
126#ifndef FLAC__NO_ASM
127# ifdef FLAC__CPU_IA32
128# ifdef FLAC__HAS_NASM
129void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]);
130void FLAC__lpc_compute_residual_from_qlp_coefficients_asm_ia32_mmx(const FLAC__int32 *data, unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 residual[]);
131# endif
132# endif
133#endif
134
135#endif /* !defined FLAC__INTEGER_ONLY_LIBRARY */
136
137/*
138 * FLAC__lpc_restore_signal()
139 * --------------------------------------------------------------------
140 * Restore the original signal by summing the residual and the
141 * predictor.
142 *
143 * IN residual[0,data_len-1] residual signal
144 * IN data_len length of original signal
145 * IN qlp_coeff[0,order-1] quantized LP coefficients
146 * IN order > 0 LP order
147 * IN lp_quantization quantization of LP coefficients in bits
148 * *** IMPORTANT: the caller must pass in the historical samples:
149 * IN data[-order,-1] previously-reconstructed historical samples
150 * OUT data[0,data_len-1] original signal
151 */
152void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
153void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
154#ifndef FLAC__NO_ASM
155# ifdef FLAC__CPU_IA32
156# ifdef FLAC__HAS_NASM
157void FLAC__lpc_restore_signal_asm_ia32(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
158void FLAC__lpc_restore_signal_asm_ia32_mmx(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
159# endif /* FLAC__HAS_NASM */
160# elif defined FLAC__CPU_PPC
161void FLAC__lpc_restore_signal_asm_ppc_altivec_16(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
162void FLAC__lpc_restore_signal_asm_ppc_altivec_16_order8(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
163# endif/* FLAC__CPU_IA32 || FLAC__CPU_PPC */
164#endif /* FLAC__NO_ASM */
165
166#ifndef FLAC__INTEGER_ONLY_LIBRARY
167
168/*
169 * FLAC__lpc_compute_expected_bits_per_residual_sample()
170 * --------------------------------------------------------------------
171 * Compute the expected number of bits per residual signal sample
172 * based on the LP error (which is related to the residual variance).
173 *
174 * IN lpc_error >= 0.0 error returned from calculating LP coefficients
175 * IN total_samples > 0 # of samples in residual signal
176 * RETURN expected bits per sample
177 */
178FLAC__double FLAC__lpc_compute_expected_bits_per_residual_sample(FLAC__double lpc_error, unsigned total_samples);
179FLAC__double FLAC__lpc_compute_expected_bits_per_residual_sample_with_error_scale(FLAC__double lpc_error, FLAC__double error_scale);
180
181/*
182 * FLAC__lpc_compute_best_order()
183 * --------------------------------------------------------------------
184 * Compute the best order from the array of signal errors returned
185 * during coefficient computation.
186 *
187 * IN lpc_error[0,max_order-1] >= 0.0 error returned from calculating LP coefficients
188 * IN max_order > 0 max LP order
189 * IN total_samples > 0 # of samples in residual signal
190 * IN bits_per_signal_sample # of bits per sample in the original signal
191 * RETURN [1,max_order] best order
192 */
193unsigned FLAC__lpc_compute_best_order(const FLAC__double lpc_error[], unsigned max_order, unsigned total_samples, unsigned bits_per_signal_sample);
194
195#endif /* !defined FLAC__INTEGER_ONLY_LIBRARY */
196
197#endif
diff --git a/apps/codecs/libFLAC/include/private/md5.h b/apps/codecs/libFLAC/include/private/md5.h
deleted file mode 100644
index e85326015f..0000000000
--- a/apps/codecs/libFLAC/include/private/md5.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * This is the header file for the MD5 message-digest algorithm.
3 * The algorithm is due to Ron Rivest. This code was
4 * written by Colin Plumb in 1993, no copyright is claimed.
5 * This code is in the public domain; do with it what you wish.
6 *
7 * Equivalent code is available from RSA Data Security, Inc.
8 * This code has been tested against that, and is equivalent,
9 * except that you don't need to include two pages of legalese
10 * with every copy.
11 *
12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which
15 * will fill a supplied 16-byte array with the digest.
16 *
17 * Changed so as no longer to depend on Colin Plumb's `usual.h'
18 * header definitions; now uses stuff from dpkg's config.h
19 * - Ian Jackson <ijackson@nyx.cs.du.edu>.
20 * Still in the public domain.
21 *
22 * Josh Coalson: made some changes to integrate with libFLAC.
23 * Still in the public domain.
24 */
25
26#ifndef FLAC__PRIVATE__MD5_H
27#define FLAC__PRIVATE__MD5_H
28
29#define md5byte unsigned char
30
31/*
32 * Due to an unholy abomination in libOggFLAC (it requires access to
33 * these internal MD5 functions) we have to #include "FLAC/export.h"
34 * and export them when building a DLL
35 */
36#include "FLAC/export.h"
37#include "FLAC/ordinals.h"
38
39struct FLAC__MD5Context {
40 FLAC__uint32 buf[4];
41 FLAC__uint32 bytes[2];
42 FLAC__uint32 in[16];
43 FLAC__byte *internal_buf;
44 unsigned capacity;
45};
46
47FLAC_API void FLAC__MD5Init(struct FLAC__MD5Context *context);
48FLAC_API void FLAC__MD5Update(struct FLAC__MD5Context *context, md5byte const *buf, unsigned len);
49FLAC_API void FLAC__MD5Final(md5byte digest[16], struct FLAC__MD5Context *context);
50void FLAC__MD5Transform(FLAC__uint32 buf[4], FLAC__uint32 const in[16]);
51
52FLAC_API FLAC__bool FLAC__MD5Accumulate(struct FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample);
53
54#endif /* !MD5_H */
diff --git a/apps/codecs/libFLAC/include/private/memory.h b/apps/codecs/libFLAC/include/private/memory.h
deleted file mode 100644
index fc6b7aeb35..0000000000
--- a/apps/codecs/libFLAC/include/private/memory.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__MEMORY_H
33#define FLAC__PRIVATE__MEMORY_H
34
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38
39#include <sys/types.h> /* for size_t */
40
41#include "private/float.h"
42#include "FLAC/ordinals.h" /* for FLAC__bool */
43
44/* Returns the unaligned address returned by malloc.
45 * Use free() on this address to deallocate.
46 */
47void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address);
48FLAC__bool FLAC__memory_alloc_aligned_int32_array(unsigned elements, FLAC__int32 **unaligned_pointer, FLAC__int32 **aligned_pointer);
49FLAC__bool FLAC__memory_alloc_aligned_uint32_array(unsigned elements, FLAC__uint32 **unaligned_pointer, FLAC__uint32 **aligned_pointer);
50FLAC__bool FLAC__memory_alloc_aligned_uint64_array(unsigned elements, FLAC__uint64 **unaligned_pointer, FLAC__uint64 **aligned_pointer);
51FLAC__bool FLAC__memory_alloc_aligned_unsigned_array(unsigned elements, unsigned **unaligned_pointer, unsigned **aligned_pointer);
52#ifndef FLAC__INTEGER_ONLY_LIBRARY
53FLAC__bool FLAC__memory_alloc_aligned_real_array(unsigned elements, FLAC__real **unaligned_pointer, FLAC__real **aligned_pointer);
54#endif
55
56#endif
diff --git a/apps/codecs/libFLAC/include/private/metadata.h b/apps/codecs/libFLAC/include/private/metadata.h
deleted file mode 100644
index f95e2deab5..0000000000
--- a/apps/codecs/libFLAC/include/private/metadata.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__METADATA_H
33#define FLAC__PRIVATE__METADATA_H
34
35#include "FLAC/metadata.h"
36
37void FLAC__metadata_object_delete_data(FLAC__StreamMetadata *object);
38void FLAC__metadata_object_cuesheet_track_delete_data(FLAC__StreamMetadata_CueSheet_Track *object);
39
40#endif
diff --git a/apps/codecs/libFLAC/include/private/stream_encoder_framing.h b/apps/codecs/libFLAC/include/private/stream_encoder_framing.h
deleted file mode 100644
index 5b5426a3e1..0000000000
--- a/apps/codecs/libFLAC/include/private/stream_encoder_framing.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of the Xiph.org Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#ifndef FLAC__PRIVATE__STREAM_ENCODER_FRAMING_H
33#define FLAC__PRIVATE__STREAM_ENCODER_FRAMING_H
34
35#include "FLAC/format.h"
36#include "bitbuffer.h"
37
38FLAC__bool FLAC__add_metadata_block(const FLAC__StreamMetadata *metadata, FLAC__BitBuffer *bb);
39FLAC__bool FLAC__frame_add_header(const FLAC__FrameHeader *header, FLAC__bool streamable_subset, FLAC__BitBuffer *bb);
40FLAC__bool FLAC__subframe_add_constant(const FLAC__Subframe_Constant *subframe, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitBuffer *bb);
41FLAC__bool FLAC__subframe_add_fixed(const FLAC__Subframe_Fixed *subframe, unsigned residual_samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitBuffer *bb);
42FLAC__bool FLAC__subframe_add_lpc(const FLAC__Subframe_LPC *subframe, unsigned residual_samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitBuffer *bb);
43FLAC__bool FLAC__subframe_add_verbatim(const FLAC__Subframe_Verbatim *subframe, unsigned samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitBuffer *bb);
44
45#endif