changeset 3892:4fb6be21be4b libavcodec

Original Commit: r93 | ods15 | 2006-09-30 22:02:21 +0300 (Sat, 30 Sep 2006) | 2 lines update to change made in vorbis.h/vorbis_data.c
author ods15
date Mon, 02 Oct 2006 06:09:02 +0000
parents 50e912426a32
children 7c51248a63d3
files vorbis_enc.c
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 06:08:59 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 06:09:02 2006 +0000
@@ -23,10 +23,7 @@
  */
 
 #include "avcodec.h"
-
-#define BITSTREAM_H // don't include this
-typedef int VLC;
-typedef int GetBitContext;
+#include "dsputil.h"
 #include "vorbis.h"
 
 #undef NDEBUG
@@ -523,11 +520,8 @@
     venc->floor = av_malloc(sizeof(float) * venc->channels * (1 << venc->blocksize[1]) / 2);
     venc->coeffs = av_malloc(sizeof(float) * venc->channels * (1 << venc->blocksize[1]) / 2);
 
-    {
-        const float *vwin[8]={ vwin64, vwin128, vwin256, vwin512, vwin1024, vwin2048, vwin4096, vwin8192 };
-        venc->win[0] = vwin[venc->blocksize[0] - 6];
-        venc->win[1] = vwin[venc->blocksize[1] - 6];
-    }
+    venc->win[0] = ff_vorbis_vwin[venc->blocksize[0] - 6];
+    venc->win[1] = ff_vorbis_vwin[venc->blocksize[1] - 6];
 
     ff_mdct_init(&venc->mdct[0], venc->blocksize[0], 0);
     ff_mdct_init(&venc->mdct[1], venc->blocksize[1], 0);
@@ -796,7 +790,7 @@
         int j;
 
         average /= pow(average, 0.5) / tot_average * pow(0.8, position/200.); // MAGIC!
-        for (j = 0; j < range - 1; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
+        for (j = 0; j < range - 1; j++) if (ff_vorbis_floor1_inverse_db_table[j * fc->multiplier] > average) break;
         posts[fc->list[i].sort] = j;
     }
 }
@@ -818,7 +812,7 @@
     else sy = base + 1;
     ady = ady - FFMAX(base, -base) * adx;
     if (x >= n) return;
-    buf[x] = floor1_inverse_db_table[y];
+    buf[x] = ff_vorbis_floor1_inverse_db_table[y];
     for (x = x0 + 1; x < x1; x++) {
         if (x >= n) return;
         err += ady;
@@ -828,7 +822,7 @@
         } else {
             y += base;
         }
-        buf[x] = floor1_inverse_db_table[y];
+        buf[x] = ff_vorbis_floor1_inverse_db_table[y];
     }
 }