changeset 11768:b02a8a91e27d libavcodec

Do not invert samples when encoding Vorbis. Patch by Frank Barchard, fbarchard google
author cehoyos
date Tue, 25 May 2010 22:53:22 +0000
parents 572bf2d9931e
children 847502a2f850
files vorbis_enc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Tue May 25 21:51:27 2010 +0000
+++ b/vorbis_enc.c	Tue May 25 22:53:22 2010 +0000
@@ -915,7 +915,7 @@
             float * offset = venc->samples + channel*window_len*2 + window_len;
             j = channel;
             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 {
         for (channel = 0; channel < venc->channels; channel++)
@@ -932,7 +932,7 @@
             float *offset = venc->saved + channel * window_len;
             j = channel;
             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;
     } else {