Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3905:557b95209664 libavcodec
Original Commit: r106 | ods15 | 2006-10-01 18:11:55 +0200 (Sun, 01 Oct 2006) | 2 lines
window -> apply_window_and_mdct
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:09:33 +0000 |
parents | 24e73ad62e40 |
children | 5ae5224790d3 |
comparison
equal
deleted
inserted
replaced
3904:24e73ad62e40 | 3905:557b95209664 |
---|---|
1306 } | 1306 } |
1307 } | 1307 } |
1308 } | 1308 } |
1309 } | 1309 } |
1310 | 1310 |
1311 static int window(venc_context_t * venc, signed short * audio, int samples) { | 1311 static int apply_window_and_mdct(venc_context_t * venc, signed short * audio, int samples) { |
1312 int i, j, channel; | 1312 int i, j, channel; |
1313 const float * win = venc->win[0]; | 1313 const float * win = venc->win[0]; |
1314 int window_len = 1 << (venc->blocksize[0] - 1); | 1314 int window_len = 1 << (venc->blocksize[0] - 1); |
1315 float n = (float)(1 << venc->blocksize[0]) / 4.; | 1315 float n = (float)(1 << venc->blocksize[0]) / 4.; |
1316 // FIXME use dsp | 1316 // FIXME use dsp |
1387 vorbis_mode_t * mode; | 1387 vorbis_mode_t * mode; |
1388 mapping_t * mapping; | 1388 mapping_t * mapping; |
1389 PutBitContext pb; | 1389 PutBitContext pb; |
1390 int i; | 1390 int i; |
1391 | 1391 |
1392 if (!window(venc, audio, samples)) return 0; | 1392 if (!apply_window_and_mdct(venc, audio, samples)) return 0; |
1393 samples = 1 << (venc->blocksize[0] - 1); | 1393 samples = 1 << (venc->blocksize[0] - 1); |
1394 | 1394 |
1395 init_put_bits(&pb, packets, buf_size); | 1395 init_put_bits(&pb, packets, buf_size); |
1396 | 1396 |
1397 put_bits(&pb, 1, 0); // magic bit | 1397 put_bits(&pb, 1, 0); // magic bit |