summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 06:07:24 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 06:07:24 +0000
commit174476cd7dd106a212ea99f8fca1a67123e95943 (patch)
tree739c86b78e2edf1d8efb8ec9633da39c5e40d4b2 /libavcodec/vorbis_enc.c
parent227878354730ce79d76408db8e97145bea4d5b89 (diff)
Original Commit: r47 | ods15 | 2006-09-23 12:34:48 +0300 (Sat, 23 Sep 2006) | 2 lines
make ffvorbis happy about init stuff, still can't play correctly Originally committed as revision 6454 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r--libavcodec/vorbis_enc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index bbf4d08bd1..05924f6a05 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -266,7 +266,7 @@ static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccon
cb->delta = 1 << ((7 - book) * 2);
cb->min = -cb->delta*2;
cb->seq_p = 0;
- cb->lookup = 2;
+ cb->lookup = 1;
cb->quantlist = av_malloc(sizeof(int) * cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries));
for (i = 0; i < cb->nentries; i++) cb->quantlist[i] = i;
ready_codebook(cb);
@@ -313,10 +313,13 @@ static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccon
rc->begin = 0;
rc->end = 1 << (venc->blocksize[0] - 1);
rc->partition_size = 64;
- rc->classifications = 1;
+ rc->classifications = 2;
rc->classbook = 1;
rc->books = av_malloc(sizeof(int[8]) * rc->classifications);
- for (i = 0; i < 8; i++) rc->books[0][i] = 2 + i;
+ for (i = 0; i < rc->classifications; i++) {
+ int j;
+ for (j = 0; j < 8; j++) rc->books[i][j] = 2 + j;
+ }
venc->nmappings = 1;
venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings);