[SCM] libav/experimental: Original Commit: r9 | ods15 | 2006-09-17 18:56:41 +0300 (Sun, 17 Sep 2006) | 2 lines

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:51:20 UTC 2013


The following commit has been merged in the experimental branch:
commit 6f133df1ea7a0d5362e1a779335b45a6a92015fc
Author: Oded Shimon <ods15 at ods15.dyndns.org>
Date:   Mon Oct 2 05:55:26 2006 +0000

    Original Commit: r9 | ods15 | 2006-09-17 18:56:41 +0300 (Sun, 17 Sep 2006) | 2 lines
    
    add residue header syntax
    
    Originally committed as revision 6420 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 6d82a44..7f441b3 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -70,6 +70,13 @@ typedef struct {
 } floor_t;
 
 typedef struct {
+    int type;
+    int begin;
+    int end;
+    int partition_size;
+    int classifications;
+    int classbook;
+    int (*books)[8];
 } residue_t;
 
 typedef struct {
@@ -198,6 +205,32 @@ static void put_floor_header(PutBitContext * pb, floor_t * fc) {
 }
 
 static void put_residue_header(PutBitContext * pb, residue_t * rc) {
+    int i;
+
+    put_bits(pb, 16, rc->type);
+
+    put_bits(pb, 24, rc->begin);
+    put_bits(pb, 24, rc->end);
+    put_bits(pb, 24, rc->partition_size - 1);
+    put_bits(pb, 6, rc->classifications);
+    put_bits(pb, 8, rc->classbook);
+
+    for (i = 0; i < rc->classifications; i++) {
+        int j, tmp = 0;
+        for (j = 0; j < 8; j++) tmp |= (!!rc->books[i][j]) << j;
+
+        put_bits(pb, 3, tmp & 7);
+        put_bits(pb, 1, tmp > 7);
+
+        if (tmp > 7) put_bits(pb, 5, tmp >> 3);
+    }
+
+    for (i = 0; i < rc->classifications; i++) {
+        int j;
+        for (j = 0; j < 8; j++)
+            if (rc->books[i][j])
+                put_bits(pb, 8, rc->books[i][j]);
+    }
 }
 
 static int put_main_header(venc_context_t * venc, uint8_t ** out) {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list