Mercurial > libavcodec.hg
comparison dca.c @ 6350:8e63d869a904 libavcodec
typo fix: inited --> initialized
author | diego |
---|---|
date | Wed, 13 Feb 2008 09:26:10 +0000 |
parents | b2c3654e562d |
children | 9f397992ddff |
comparison
equal
deleted
inserted
replaced
6349:aed237dd11d8 | 6350:8e63d869a904 |
---|---|
177 DSPContext dsp; | 177 DSPContext dsp; |
178 } DCAContext; | 178 } DCAContext; |
179 | 179 |
180 static void dca_init_vlcs(void) | 180 static void dca_init_vlcs(void) |
181 { | 181 { |
182 static int vlcs_inited = 0; | 182 static int vlcs_initialized = 0; |
183 int i, j; | 183 int i, j; |
184 | 184 |
185 if (vlcs_inited) | 185 if (vlcs_initialized) |
186 return; | 186 return; |
187 | 187 |
188 dca_bitalloc_index.offset = 1; | 188 dca_bitalloc_index.offset = 1; |
189 dca_bitalloc_index.wrap = 2; | 189 dca_bitalloc_index.wrap = 2; |
190 for (i = 0; i < 5; i++) | 190 for (i = 0; i < 5; i++) |
212 init_vlc(&dca_smpl_bitalloc[i+1].vlc[j], bitalloc_maxbits[i][j], | 212 init_vlc(&dca_smpl_bitalloc[i+1].vlc[j], bitalloc_maxbits[i][j], |
213 bitalloc_sizes[i], | 213 bitalloc_sizes[i], |
214 bitalloc_bits[i][j], 1, 1, | 214 bitalloc_bits[i][j], 1, 1, |
215 bitalloc_codes[i][j], 2, 2, 1); | 215 bitalloc_codes[i][j], 2, 2, 1); |
216 } | 216 } |
217 vlcs_inited = 1; | 217 vlcs_initialized = 1; |
218 } | 218 } |
219 | 219 |
220 static inline void get_array(GetBitContext *gb, int *dst, int len, int bits) | 220 static inline void get_array(GetBitContext *gb, int *dst, int len, int bits) |
221 { | 221 { |
222 while(len--) | 222 while(len--) |
1193 */ | 1193 */ |
1194 | 1194 |
1195 static void pre_calc_cosmod(DCAContext * s) | 1195 static void pre_calc_cosmod(DCAContext * s) |
1196 { | 1196 { |
1197 int i, j, k; | 1197 int i, j, k; |
1198 static int cosmod_inited = 0; | 1198 static int cosmod_initialized = 0; |
1199 | 1199 |
1200 if(cosmod_inited) return; | 1200 if(cosmod_initialized) return; |
1201 for (j = 0, k = 0; k < 16; k++) | 1201 for (j = 0, k = 0; k < 16; k++) |
1202 for (i = 0; i < 16; i++) | 1202 for (i = 0; i < 16; i++) |
1203 cos_mod[j++] = cos((2 * i + 1) * (2 * k + 1) * M_PI / 64); | 1203 cos_mod[j++] = cos((2 * i + 1) * (2 * k + 1) * M_PI / 64); |
1204 | 1204 |
1205 for (k = 0; k < 16; k++) | 1205 for (k = 0; k < 16; k++) |
1210 cos_mod[j++] = 0.25 / (2 * cos((2 * k + 1) * M_PI / 128)); | 1210 cos_mod[j++] = 0.25 / (2 * cos((2 * k + 1) * M_PI / 128)); |
1211 | 1211 |
1212 for (k = 0; k < 16; k++) | 1212 for (k = 0; k < 16; k++) |
1213 cos_mod[j++] = -0.25 / (2.0 * sin((2 * k + 1) * M_PI / 128)); | 1213 cos_mod[j++] = -0.25 / (2.0 * sin((2 * k + 1) * M_PI / 128)); |
1214 | 1214 |
1215 cosmod_inited = 1; | 1215 cosmod_initialized = 1; |
1216 } | 1216 } |
1217 | 1217 |
1218 | 1218 |
1219 /** | 1219 /** |
1220 * DCA initialization | 1220 * DCA initialization |