changeset 4498:2832b65bd37e libavcodec

vorbis suffers from the same sign flip issue as wma (so this lame workaround, though it arguably doesnt matter much where the sign is fliped back)
author michael
date Wed, 07 Feb 2007 16:59:10 +0000
parents 3975e734e07e
children 40395b1feedb
files vorbis_enc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Wed Feb 07 14:53:25 2007 +0000
+++ b/vorbis_enc.c	Wed Feb 07 16:59:10 2007 +0000
@@ -906,7 +906,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];
+                offset[i] = -audio[j] / 32768. / n * win[window_len - i - 1]; //FIXME find out why the sign has to be fliped
         }
     } else {
         for (channel = 0; channel < venc->channels; channel++) {
@@ -923,7 +923,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];
+                offset[i] = -audio[j] / 32768. / n * win[i]; //FIXME find out why the sign has to be fliped
         }
         venc->have_saved = 1;
     } else {