[Ffmpeg-cvslog] r6422 - trunk/libavcodec/vorbis_enc.c

ods15 subversion
Mon Oct 2 07:55:31 CEST 2006


Author: ods15
Date: Mon Oct  2 07:55:30 2006
New Revision: 6422

Modified:
   trunk/libavcodec/vorbis_enc.c

Log:
Original Commit: r11 | ods15 | 2006-09-17 19:41:28 +0300 (Sun, 17 Sep 2006) | 4 lines

modes header syntax

that's the last of the headers! woo

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	(original)
+++ trunk/libavcodec/vorbis_enc.c	Mon Oct  2 07:55:30 2006
@@ -87,6 +87,11 @@
 } mapping_t;
 
 typedef struct {
+    int blockflag;
+    int mapping;
+} vorbis_mode_t;
+
+typedef struct {
     int channels;
     int sample_rate;
     int blocksize[2];
@@ -102,6 +107,9 @@
 
     int nmappings;
     mapping_t * mappings;
+
+    int nmodes;
+    vorbis_mode_t * modes;
 } venc_context_t;
 
 static inline int ilog(unsigned int a) {
@@ -320,6 +328,15 @@
         }
     }
 
+    // modes
+    put_bits(&pb, 6, venc->nmodes - 1);
+    for (i = 0; i < venc->nmodes; i++) {
+        put_bits(&pb, 1, venc->modes[i].blockflag);
+        put_bits(&pb, 16, 0); // reserved window type
+        put_bits(&pb, 16, 0); // reserved transform type
+        put_bits(&pb, 8, venc->modes[i].mapping);
+    }
+
     flush_put_bits(&pb);
     hlens[2] = (put_bits_count(&pb) + 7) / 8;
 




More information about the ffmpeg-cvslog mailing list