diff options
author | Nils Wallménius <nils@rockbox.org> | 2011-06-02 20:52:54 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2011-06-02 20:52:54 +0000 |
commit | 73d0e14f4494b98e0c781934fbf19efa8d6d8418 (patch) | |
tree | cd3a80eb069dc81178a5b50020356c741116f103 /apps/codecs/libspeex/speex | |
parent | d860c878003142128f7beb3e38dae38007822364 (diff) | |
download | rockbox-73d0e14f4494b98e0c781934fbf19efa8d6d8418.tar.gz rockbox-73d0e14f4494b98e0c781934fbf19efa8d6d8418.zip |
Disable some unused code in speex to save binsize.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29949 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/speex')
-rw-r--r-- | apps/codecs/libspeex/speex/speex.h | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/speex/speex_bits.h | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/apps/codecs/libspeex/speex/speex.h b/apps/codecs/libspeex/speex/speex.h index ffb0714f1c..086d492670 100644 --- a/apps/codecs/libspeex/speex/speex.h +++ b/apps/codecs/libspeex/speex/speex.h | |||
@@ -263,6 +263,7 @@ typedef struct SpeexMode { | |||
263 | bitstream compatibility*/ | 263 | bitstream compatibility*/ |
264 | int bitstream_version; | 264 | int bitstream_version; |
265 | 265 | ||
266 | #ifndef SPEEX_DISABLE_ENCODER | ||
266 | /** Pointer to encoder initialization function */ | 267 | /** Pointer to encoder initialization function */ |
267 | encoder_init_func enc_init; | 268 | encoder_init_func enc_init; |
268 | 269 | ||
@@ -271,6 +272,7 @@ typedef struct SpeexMode { | |||
271 | 272 | ||
272 | /** Pointer to frame encoding function */ | 273 | /** Pointer to frame encoding function */ |
273 | encode_func enc; | 274 | encode_func enc; |
275 | #endif | ||
274 | 276 | ||
275 | /** Pointer to decoder initialization function */ | 277 | /** Pointer to decoder initialization function */ |
276 | decoder_init_func dec_init; | 278 | decoder_init_func dec_init; |
@@ -281,8 +283,10 @@ typedef struct SpeexMode { | |||
281 | /** Pointer to frame decoding function */ | 283 | /** Pointer to frame decoding function */ |
282 | decode_func dec; | 284 | decode_func dec; |
283 | 285 | ||
286 | #ifndef SPEEX_DISABLE_ENCODER | ||
284 | /** ioctl-like requests for encoder */ | 287 | /** ioctl-like requests for encoder */ |
285 | encoder_ctl_func enc_ctl; | 288 | encoder_ctl_func enc_ctl; |
289 | #endif | ||
286 | 290 | ||
287 | /** ioctl-like requests for decoder */ | 291 | /** ioctl-like requests for decoder */ |
288 | decoder_ctl_func dec_ctl; | 292 | decoder_ctl_func dec_ctl; |
diff --git a/apps/codecs/libspeex/speex/speex_bits.h b/apps/codecs/libspeex/speex/speex_bits.h index a26fb4ce0c..fee2893380 100644 --- a/apps/codecs/libspeex/speex/speex_bits.h +++ b/apps/codecs/libspeex/speex/speex_bits.h | |||
@@ -62,7 +62,9 @@ typedef struct SpeexBits { | |||
62 | void speex_bits_init(SpeexBits *bits); | 62 | void speex_bits_init(SpeexBits *bits); |
63 | 63 | ||
64 | /** Initializes SpeexBits struct using a pre-allocated buffer*/ | 64 | /** Initializes SpeexBits struct using a pre-allocated buffer*/ |
65 | /* Rockbox: unused | ||
65 | void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size); | 66 | void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size); |
67 | */ | ||
66 | 68 | ||
67 | /** Sets the bits in a SpeexBits struct to use data from an existing buffer (for decoding without copying data) */ | 69 | /** Sets the bits in a SpeexBits struct to use data from an existing buffer (for decoding without copying data) */ |
68 | void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size); | 70 | void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size); |
@@ -74,7 +76,9 @@ void speex_bits_destroy(SpeexBits *bits); | |||
74 | void speex_bits_reset(SpeexBits *bits); | 76 | void speex_bits_reset(SpeexBits *bits); |
75 | 77 | ||
76 | /** Rewind the bit-stream to the beginning (ready for read) without erasing the content */ | 78 | /** Rewind the bit-stream to the beginning (ready for read) without erasing the content */ |
79 | /* Rockbox: unused | ||
77 | void speex_bits_rewind(SpeexBits *bits); | 80 | void speex_bits_rewind(SpeexBits *bits); |
81 | */ | ||
78 | 82 | ||
79 | /** Initializes the bit-stream from the data in an area of memory */ | 83 | /** Initializes the bit-stream from the data in an area of memory */ |
80 | void speex_bits_read_from(SpeexBits *bits, char *bytes, int len); | 84 | void speex_bits_read_from(SpeexBits *bits, char *bytes, int len); |
@@ -112,7 +116,9 @@ void speex_bits_pack(SpeexBits *bits, int data, int nbBits); | |||
112 | * @param nbBits Number of bits to interpret | 116 | * @param nbBits Number of bits to interpret |
113 | * @return A signed integer represented by the bits read | 117 | * @return A signed integer represented by the bits read |
114 | */ | 118 | */ |
119 | /* Rockbox: unused | ||
115 | int speex_bits_unpack_signed(SpeexBits *bits, int nbBits); | 120 | int speex_bits_unpack_signed(SpeexBits *bits, int nbBits); |
121 | */ | ||
116 | 122 | ||
117 | /** Interpret the next bits in the bit-stream as an unsigned integer | 123 | /** Interpret the next bits in the bit-stream as an unsigned integer |
118 | * | 124 | * |
@@ -127,7 +133,9 @@ unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits); | |||
127 | * @param bits Bit-stream to operate on | 133 | * @param bits Bit-stream to operate on |
128 | * @return Number of bytes in the stream | 134 | * @return Number of bytes in the stream |
129 | */ | 135 | */ |
136 | /* Rockbox: unused | ||
130 | int speex_bits_nbytes(SpeexBits *bits); | 137 | int speex_bits_nbytes(SpeexBits *bits); |
138 | */ | ||
131 | 139 | ||
132 | /** Same as speex_bits_unpack_unsigned, but without modifying the cursor position | 140 | /** Same as speex_bits_unpack_unsigned, but without modifying the cursor position |
133 | * | 141 | * |
@@ -135,7 +143,9 @@ int speex_bits_nbytes(SpeexBits *bits); | |||
135 | * @param nbBits Number of bits to look for | 143 | * @param nbBits Number of bits to look for |
136 | * @return Value of the bits peeked, interpreted as unsigned | 144 | * @return Value of the bits peeked, interpreted as unsigned |
137 | */ | 145 | */ |
146 | /* Rockbox: unused | ||
138 | unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits); | 147 | unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits); |
148 | */ | ||
139 | 149 | ||
140 | /** Get the value of the next bit in the stream, without modifying the | 150 | /** Get the value of the next bit in the stream, without modifying the |
141 | * "cursor" position | 151 | * "cursor" position |