summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/bits.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libfaad/bits.c')
-rw-r--r--apps/codecs/libfaad/bits.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/codecs/libfaad/bits.c b/apps/codecs/libfaad/bits.c
index 781eb4feaa..a3640077d8 100644
--- a/apps/codecs/libfaad/bits.c
+++ b/apps/codecs/libfaad/bits.c
@@ -36,7 +36,7 @@
36 * Samples were observed to need up to 1500 bytes (400 kbps nero aac). 36 * Samples were observed to need up to 1500 bytes (400 kbps nero aac).
37 */ 37 */
38#define BUFFER_SIZE 2048 38#define BUFFER_SIZE 2048
39uint8_t static_buffer[BUFFER_SIZE] IBSS_ATTR; 39static uint8_t static_buffer[BUFFER_SIZE] IBSS_ATTR;
40 40
41/* initialize buffer, call once before first getbits or showbits */ 41/* initialize buffer, call once before first getbits or showbits */
42void faad_initbits(bitfile *ld, const void *_buffer, const uint32_t buffer_size) 42void faad_initbits(bitfile *ld, const void *_buffer, const uint32_t buffer_size)
@@ -111,6 +111,7 @@ uint8_t faad_byte_align(bitfile *ld)
111} 111}
112 112
113/* rewind to beginning */ 113/* rewind to beginning */
114/* not used
114void faad_rewindbits(bitfile *ld) 115void faad_rewindbits(bitfile *ld)
115{ 116{
116 uint32_t tmp; 117 uint32_t tmp;
@@ -131,7 +132,9 @@ void faad_rewindbits(bitfile *ld)
131 ld->bytes_used = 0; 132 ld->bytes_used = 0;
132 ld->no_more_reading = 0; 133 ld->no_more_reading = 0;
133} 134}
135*/
134 136
137#ifdef ERROR_RESILIENCE
135uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits 138uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
136 DEBUGDEC) 139 DEBUGDEC)
137{ 140{
@@ -139,7 +142,7 @@ uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
139 uint8_t temp; 142 uint8_t temp;
140 uint16_t bytes = (uint16_t)bits / 8; 143 uint16_t bytes = (uint16_t)bits / 8;
141 uint8_t remainder = (uint8_t)bits % 8; 144 uint8_t remainder = (uint8_t)bits % 8;
142 145
143 uint8_t *buffer = (uint8_t*)faad_malloc((bytes+1)*sizeof(uint8_t)); 146 uint8_t *buffer = (uint8_t*)faad_malloc((bytes+1)*sizeof(uint8_t));
144 147
145 for (i = 0; i < bytes; i++) 148 for (i = 0; i < bytes; i++)
@@ -156,6 +159,7 @@ uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
156 159
157 return buffer; 160 return buffer;
158} 161}
162#endif
159 163
160#ifdef DRM 164#ifdef DRM
161/* return the original data buffer */ 165/* return the original data buffer */
@@ -172,6 +176,7 @@ uint32_t faad_origbitbuffer_size(bitfile *ld)
172#endif 176#endif
173 177
174/* reversed bit reading routines, used for RVLC and HCR */ 178/* reversed bit reading routines, used for RVLC and HCR */
179/* not used
175void faad_initbits_rev(bitfile *ld, void *buffer, 180void faad_initbits_rev(bitfile *ld, void *buffer,
176 uint32_t bits_in_buffer) 181 uint32_t bits_in_buffer)
177{ 182{
@@ -200,3 +205,4 @@ void faad_initbits_rev(bitfile *ld, void *buffer,
200 ld->no_more_reading = 0; 205 ld->no_more_reading = 0;
201 ld->error = 0; 206 ld->error = 0;
202} 207}
208*/