changeset 3867:edd2496ee02a libavcodec

Original Commit: r67 | ods15 | 2006-09-25 20:33:06 +0300 (Mon, 25 Sep 2006) | 2 lines horrible off-by-one causing lots of troubles...
author ods15
date Mon, 02 Oct 2006 06:08:01 +0000
parents 4d5f73f10198
children 46441c25abdc
files vorbis_enc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 06:07:59 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 06:08:01 2006 +0000
@@ -847,7 +847,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. * win[window_len - i] / n;
+                offset[i] = audio[j] / 32768. / n * win[window_len - i - 1];
         }
     } else {
         for (channel = 0; channel < venc->channels; channel++) {
@@ -864,7 +864,7 @@
             float * offset = venc->saved + channel*window_len;
             j = channel;
             for (i = 0; i < samples; i++, j += venc->channels)
-                offset[i] = audio[j] / 32768. * win[i] / n;
+                offset[i] = audio[j] / 32768. / n * win[i];
         }
         venc->have_saved = 1;
     } else {