changeset 3829:e8e340cbc7f2 libavcodec

Original Commit: r23 | ods15 | 2006-09-22 13:55:48 +0300 (Fri, 22 Sep 2006) | 2 lines mapping generation
author ods15
date Mon, 02 Oct 2006 05:55:57 +0000
parents f9c449155a0e
children 477ee30c6fc6
files vorbis_enc.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 05:55:55 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 05:55:57 2006 +0000
@@ -166,6 +166,7 @@
     codebook_t * cb;
     floor_t * fc;
     residue_t * rc;
+    mapping_t * mc;
     int i, book;
 
     venc->channels = avccontext->channels;
@@ -266,6 +267,18 @@
     venc->nmappings = 1;
     venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings);
 
+    // single mapping
+    mc = &venc->mappings[0];
+    mc->submaps = 1;
+    mc->mux = av_malloc(sizeof(int) * venc->channels);
+    for (i = 0; i < venc->channels; i++) mc->mux[i] = 0;
+    mc->floor = av_malloc(sizeof(int) * mc->submaps);
+    mc->residue = av_malloc(sizeof(int) * mc->submaps);
+    for (i = 0; i < mc->submaps; i++) {
+        mc->floor[i] = 0;
+        mc->residue[i] = 0;
+    }
+
     venc->nmodes = 1;
     venc->modes = av_malloc(sizeof(vorbis_mode_t) * venc->nmodes);
 }