Browse Source

Original Commit: r44 | ods15 | 2006-09-23 10:54:43 +0300 (Sat, 23 Sep 2006) | 2 lines

some bug fixes for window()

Originally committed as revision 6452 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Oded Shimon 19 years ago
parent
commit
f4e5e657b8
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/vorbis_enc.c

+ 3
- 2
libavcodec/vorbis_enc.c View File

@@ -633,7 +633,7 @@ static int window(venc_context_t * venc, signed short * audio, int samples) {


if (samples) { if (samples) {
for (channel = 0; channel < venc->channels; channel++) { for (channel = 0; channel < venc->channels; channel++) {
float * offset = venc->saved + channel*window_len*2 + window_len;
float * offset = venc->samples + channel*window_len*2 + window_len;
j = channel; j = channel;
for (i = 0; i < samples; i++, j += venc->channels) for (i = 0; i < samples; i++, j += venc->channels)
offset[i] = audio[j] / 32768. * win[window_len - i]; offset[i] = audio[j] / 32768. * win[window_len - i];
@@ -650,9 +650,10 @@ static int window(venc_context_t * venc, signed short * audio, int samples) {


if (samples) { if (samples) {
for (channel = 0; channel < venc->channels; channel++) { for (channel = 0; channel < venc->channels; channel++) {
float * offset = venc->saved + channel*window_len;
j = channel; j = channel;
for (i = 0; i < samples; i++, j += venc->channels) for (i = 0; i < samples; i++, j += venc->channels)
venc->saved[i] = audio[j] / 32768. * win[i];
offset[i] = audio[j] / 32768. * win[i];
} }
venc->have_saved = 1; venc->have_saved = 1;
} else { } else {


Loading…
Cancel
Save