Mercurial > libavcodec.hg
comparison aacenc.c @ 7672:1c01b74dc78c libavcodec
Do not pass unnecessary arguments to AAC encoder functions
author | kostya |
---|---|
date | Sat, 23 Aug 2008 15:25:57 +0000 |
parents | 681e7430fbeb |
children | bcc058a7b12e |
comparison
equal
deleted
inserted
replaced
7671:1bdb37f93bd2 | 7672:1c01b74dc78c |
---|---|
262 } | 262 } |
263 | 263 |
264 /** | 264 /** |
265 * Encode pulse data. | 265 * Encode pulse data. |
266 */ | 266 */ |
267 static void encode_pulses(AACEncContext *s, Pulse *pulse, int channel) | 267 static void encode_pulses(AACEncContext *s, Pulse *pulse) |
268 { | 268 { |
269 int i; | 269 int i; |
270 | 270 |
271 put_bits(&s->pb, 1, !!pulse->num_pulse); | 271 put_bits(&s->pb, 1, !!pulse->num_pulse); |
272 if(!pulse->num_pulse) return; | 272 if(!pulse->num_pulse) return; |
280 } | 280 } |
281 | 281 |
282 /** | 282 /** |
283 * Encode spectral coefficients processed by psychoacoustic model. | 283 * Encode spectral coefficients processed by psychoacoustic model. |
284 */ | 284 */ |
285 static void encode_spectral_coeffs(AACEncContext *s, ChannelElement *cpe, int channel) | 285 static void encode_spectral_coeffs(AACEncContext *s, SingleChannelElement *sce) |
286 { | 286 { |
287 int start, i, w, w2, wg; | 287 int start, i, w, w2, wg; |
288 | 288 |
289 w = 0; | 289 w = 0; |
290 for(wg = 0; wg < cpe->ch[channel].ics.num_window_groups; wg++){ | 290 for(wg = 0; wg < sce->ics.num_window_groups; wg++){ |
291 start = 0; | 291 start = 0; |
292 for(i = 0; i < cpe->ch[channel].ics.max_sfb; i++){ | 292 for(i = 0; i < sce->ics.max_sfb; i++){ |
293 if(cpe->ch[channel].zeroes[w*16 + i]){ | 293 if(sce->zeroes[w*16 + i]){ |
294 start += cpe->ch[channel].ics.swb_sizes[i]; | 294 start += sce->ics.swb_sizes[i]; |
295 continue; | 295 continue; |
296 } | 296 } |
297 for(w2 = w; w2 < w + cpe->ch[channel].ics.group_len[wg]; w2++){ | 297 for(w2 = w; w2 < w + sce->ics.group_len[wg]; w2++){ |
298 encode_band_coeffs(s, cpe, channel, start + w2*128, | 298 encode_band_coeffs(s, cpe, channel, start + w2*128, |
299 cpe->ch[channel].ics.swb_sizes[i], | 299 sce->ics.swb_sizes[i], |
300 cpe->ch[channel].band_type[w*16 + i]); | 300 sce->band_type[w*16 + i]); |
301 } | 301 } |
302 start += cpe->ch[channel].ics.swb_sizes[i]; | 302 start += sce->ics.swb_sizes[i]; |
303 } | 303 } |
304 w += cpe->ch[channel].ics.group_len[wg]; | 304 w += sce->ics.group_len[wg]; |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 /** | 308 /** |
309 * Write some auxiliary information about the created AAC file. | 309 * Write some auxiliary information about the created AAC file. |