Commit 6cfad115 authored by cehoyos's avatar cehoyos

Do not invert samples when encoding Vorbis.

Patch by Frank Barchard, fbarchard google


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23329 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3af9613f
...@@ -915,7 +915,7 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, signed short *audio, ...@@ -915,7 +915,7 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, signed short *audio,
float * offset = venc->samples + 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. / n * win[window_len - i - 1]; //FIXME find out why the sign has to be fliped offset[i] = audio[j] / 32768. / n * win[window_len - i - 1];
} }
} else { } else {
for (channel = 0; channel < venc->channels; channel++) for (channel = 0; channel < venc->channels; channel++)
...@@ -932,7 +932,7 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, signed short *audio, ...@@ -932,7 +932,7 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, signed short *audio,
float *offset = venc->saved + channel * window_len; 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)
offset[i] = -audio[j] / 32768. / n * win[i]; //FIXME find out why the sign has to be fliped offset[i] = audio[j] / 32768. / n * win[i];
} }
venc->have_saved = 1; venc->have_saved = 1;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment