From ddf217ba146e0ce1202acb9a6ce0adb7a9b5bfe7 Mon Sep 17 00:00:00 2001 From: Oded Shimon Date: Mon, 2 Oct 2006 06:09:02 +0000 Subject: [PATCH] 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 Originally committed as revision 6497 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/vorbis_enc.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 5cf96818d7..1602c7c7c8 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -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 @@ static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccon 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 @@ static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int * 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 @@ static void render_line(int x0, int y0, int x1, int y1, float * buf, int n) { 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 @@ static void render_line(int x0, int y0, int x1, int y1, float * buf, int n) { } else { y += base; } - buf[x] = floor1_inverse_db_table[y]; + buf[x] = ff_vorbis_floor1_inverse_db_table[y]; } }