Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3847:9cf71c2ff770 libavcodec
Original Commit: r44 | ods15 | 2006-09-23 10:54:43 +0300 (Sat, 23 Sep 2006) | 2 lines
some bug fixes for window()
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 05:56:37 +0000 |
parents | afbeb215e56f |
children | 4d9aba494478 |
comparison
equal
deleted
inserted
replaced
3846:afbeb215e56f | 3847:9cf71c2ff770 |
---|---|
631 } | 631 } |
632 } | 632 } |
633 | 633 |
634 if (samples) { | 634 if (samples) { |
635 for (channel = 0; channel < venc->channels; channel++) { | 635 for (channel = 0; channel < venc->channels; channel++) { |
636 float * offset = venc->saved + channel*window_len*2 + window_len; | 636 float * offset = venc->samples + channel*window_len*2 + window_len; |
637 j = channel; | 637 j = channel; |
638 for (i = 0; i < samples; i++, j += venc->channels) | 638 for (i = 0; i < samples; i++, j += venc->channels) |
639 offset[i] = audio[j] / 32768. * win[window_len - i]; | 639 offset[i] = audio[j] / 32768. * win[window_len - i]; |
640 } | 640 } |
641 } else { | 641 } else { |
648 ff_mdct_calc(&venc->mdct[0], venc->coeffs + channel*window_len, venc->samples + channel*window_len*2, venc->floor/*tmp*/); | 648 ff_mdct_calc(&venc->mdct[0], venc->coeffs + channel*window_len, venc->samples + channel*window_len*2, venc->floor/*tmp*/); |
649 } | 649 } |
650 | 650 |
651 if (samples) { | 651 if (samples) { |
652 for (channel = 0; channel < venc->channels; channel++) { | 652 for (channel = 0; channel < venc->channels; channel++) { |
653 float * offset = venc->saved + channel*window_len; | |
653 j = channel; | 654 j = channel; |
654 for (i = 0; i < samples; i++, j += venc->channels) | 655 for (i = 0; i < samples; i++, j += venc->channels) |
655 venc->saved[i] = audio[j] / 32768. * win[i]; | 656 offset[i] = audio[j] / 32768. * win[i]; |
656 } | 657 } |
657 venc->have_saved = 1; | 658 venc->have_saved = 1; |
658 } else { | 659 } else { |
659 venc->have_saved = 0; | 660 venc->have_saved = 0; |
660 } | 661 } |