summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:55:55 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:55:55 +0000
commit0df46aa2161f505f4b8befdd5d871dfab348d506 (patch)
tree3fee2d7e5b9c7eab71d0bb7fb96f72f0b8a2c1b2 /libavcodec/vorbis_enc.c
parente185750ab784ff12760d0fa30b250f0f5fb95ce1 (diff)
Original Commit: r22 | ods15 | 2006-09-22 13:49:56 +0300 (Fri, 22 Sep 2006) | 2 lines
add residue generation Originally committed as revision 6433 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r--libavcodec/vorbis_enc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 530f63b071..d2d3003709 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -165,6 +165,7 @@ static void ready_codebook(codebook_t * cb) {
static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccontext) {
codebook_t * cb;
floor_t * fc;
+ residue_t * rc;
int i, book;
venc->channels = avccontext->channels;
@@ -251,6 +252,17 @@ static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccon
venc->nresidues = 1;
venc->residues = av_malloc(sizeof(residue_t) * venc->nresidues);
+ // single residue
+ rc = &venc->residues[0];
+ rc->type = 0;
+ rc->begin = 0;
+ rc->end = 1 << venc->blocksize[0];
+ rc->partition_size = 64;
+ rc->classifications = 1;
+ rc->classbook = 1;
+ rc->books = av_malloc(sizeof(int[8]) * rc->classifications);
+ for (i = 0; i < 8; i++) rc->books[0][i] = 2 + i;
+
venc->nmappings = 1;
venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings);