annotate libfaad2/bits.c @ 12308:e76abd2a803c

new configuration structure, multi-card support
author nicodvb
date Mon, 26 Apr 2004 21:20:37 +0000
parents 3185f64f6350
children 4a370c80fe5c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
1 /*
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
3 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
4 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
5 ** This program is free software; you can redistribute it and/or modify
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
6 ** it under the terms of the GNU General Public License as published by
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
7 ** the Free Software Foundation; either version 2 of the License, or
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
8 ** (at your option) any later version.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
9 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
10 ** This program is distributed in the hope that it will be useful,
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
13 ** GNU General Public License for more details.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
14 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
15 ** You should have received a copy of the GNU General Public License
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
16 ** along with this program; if not, write to the Free Software
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
18 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
19 ** Any non-GPL usage of this software or parts of this software is strictly
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
20 ** forbidden.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
21 **
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
22 ** Commercial non-GPL licensing of this software is possible.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
24 **
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
25 ** $Id: bits.c,v 1.1 2003/08/30 22:30:21 arpi Exp $
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
26 **/
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
27
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
28 #include "common.h"
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
29 #include "structs.h"
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
30
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
31 #include <stdlib.h>
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
32 #include <string.h>
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
33 #include "bits.h"
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
34
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
35 /* initialize buffer, call once before first getbits or showbits */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
36 void faad_initbits(bitfile *ld, void *_buffer, uint32_t buffer_size)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
37 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
38 uint32_t tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
39
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
40 if (ld == NULL)
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
41 return;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
42
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
43 memset(ld, 0, sizeof(bitfile));
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
44
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
45 if (buffer_size == 0 || _buffer == NULL)
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
46 {
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
47 ld->error = 1;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
48 ld->no_more_reading = 1;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
49 return;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
50 }
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
51
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
52 ld->buffer = malloc((buffer_size+12)*sizeof(uint8_t));
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
53 memset(ld->buffer, 0, (buffer_size+12)*sizeof(uint8_t));
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
54 memcpy(ld->buffer, _buffer, buffer_size*sizeof(uint8_t));
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
55
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
56 ld->buffer_size = buffer_size;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
57
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
58 tmp = getdword((uint32_t*)ld->buffer);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
59 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
60 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
61 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
62 ld->bufa = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
63
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
64 tmp = getdword((uint32_t*)ld->buffer + 1);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
65 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
66 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
67 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
68 ld->bufb = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
69
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
70 ld->start = (uint32_t*)ld->buffer;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
71 ld->tail = ((uint32_t*)ld->buffer + 2);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
72
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
73 ld->bits_left = 32;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
74
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
75 ld->bytes_used = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
76 ld->no_more_reading = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
77 ld->error = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
78 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
79
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
80 void faad_endbits(bitfile *ld)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
81 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
82 if (ld)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
83 if (ld->buffer) free(ld->buffer);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
84 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
85
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
86 uint32_t faad_get_processed_bits(bitfile *ld)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
87 {
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
88 return (uint32_t)(8 * (4*(ld->tail - ld->start) - 4) - (ld->bits_left));
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
89 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
90
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
91 uint8_t faad_byte_align(bitfile *ld)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
92 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
93 uint8_t remainder = (uint8_t)((32 - ld->bits_left) % 8);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
94
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
95 if (remainder)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
96 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
97 faad_flushbits(ld, 8 - remainder);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
98 return (8 - remainder);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
99 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
100 return 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
101 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
102
10989
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
103 void faad_flushbits_ex(bitfile *ld, uint32_t bits)
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
104 {
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
105 uint32_t tmp;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
106
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
107 ld->bufa = ld->bufb;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
108 tmp = getdword(ld->tail);
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
109 ld->tail++;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
110 #ifndef ARCH_IS_BIG_ENDIAN
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
111 BSWAP(tmp);
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
112 #endif
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
113 ld->bufb = tmp;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
114 ld->bits_left += (32 - bits);
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
115 ld->bytes_used += 4;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
116 if (ld->bytes_used == ld->buffer_size)
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
117 ld->no_more_reading = 1;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
118 if (ld->bytes_used > ld->buffer_size)
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
119 ld->error = 1;
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
120 }
3185f64f6350 synced with current cvs
alex
parents: 10725
diff changeset
121
10725
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
122 /* rewind to beginning */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
123 void faad_rewindbits(bitfile *ld)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
124 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
125 uint32_t tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
126
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
127 tmp = ld->start[0];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
128 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
129 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
130 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
131 ld->bufa = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
132
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
133 tmp = ld->start[1];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
134 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
135 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
136 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
137 ld->bufb = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
138 ld->bits_left = 32;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
139 ld->tail = &ld->start[2];
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
140 ld->bytes_used = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
141 ld->no_more_reading = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
142 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
143
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
144 uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
145 DEBUGDEC)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
146 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
147 uint16_t i;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
148 uint8_t temp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
149 uint16_t bytes = (uint16_t)bits / 8;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
150 uint8_t remainder = (uint8_t)bits % 8;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
151
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
152 uint8_t *buffer = (uint8_t*)malloc((bytes+1)*sizeof(uint8_t));
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
153
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
154 for (i = 0; i < bytes; i++)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
155 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
156 buffer[i] = (uint8_t)faad_getbits(ld, 8 DEBUGVAR(print,var,dbg));
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
157 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
158
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
159 if (remainder)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
160 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
161 temp = (uint8_t)faad_getbits(ld, remainder DEBUGVAR(print,var,dbg)) << (8-remainder);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
162
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
163 buffer[bytes] = temp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
164 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
165
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
166 return buffer;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
167 }
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
168
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
169 /* reversed bit reading routines, used for RVLC and HCR */
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
170 void faad_initbits_rev(bitfile *ld, void *buffer,
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
171 uint32_t bits_in_buffer)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
172 {
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
173 uint32_t tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
174 int32_t index;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
175
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
176 ld->buffer_size = bit2byte(bits_in_buffer);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
177
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
178 index = (bits_in_buffer+31)/32 - 1;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
179
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
180 ld->start = (uint32_t*)buffer + index - 2;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
181
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
182 tmp = getdword((uint32_t*)buffer + index);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
183 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
184 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
185 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
186 ld->bufa = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
187
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
188 tmp = getdword((uint32_t*)buffer + index - 1);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
189 #ifndef ARCH_IS_BIG_ENDIAN
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
190 BSWAP(tmp);
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
191 #endif
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
192 ld->bufb = tmp;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
193
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
194 ld->tail = (uint32_t*)buffer + index;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
195
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
196 ld->bits_left = bits_in_buffer % 32;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
197 if (ld->bits_left == 0)
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
198 ld->bits_left = 32;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
199
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
200 ld->bytes_used = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
201 ld->no_more_reading = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
202 ld->error = 0;
e989150f8216 libfaad2 v2.0rc1 imported
arpi
parents:
diff changeset
203 }