changeset 3823:41ad23b61a2c libavcodec

Original Commit: r17 | ods15 | 2006-09-22 12:28:28 +0300 (Fri, 22 Sep 2006) | 2 lines bug fixes in codebook header syntax
author ods15
date Mon, 02 Oct 2006 05:55:43 +0000
parents a7f46bc1fea0
children 61d312116e71
files vorbis_enc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 05:55:41 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 05:55:43 2006 +0000
@@ -252,7 +252,7 @@
         while (i < cb->nentries) {
             int j;
             for (j = 0; j+i < cb->nentries; j++) if (cb->entries[j+i].len != len) break;
-            put_bits(pb, 5, j);
+            put_bits(pb, ilog(cb->nentries - i), j);
             i += j;
             len++;
         }
@@ -273,7 +273,7 @@
         int tmp = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
         int bits = ilog(cb->quantlist[0]);
 
-        for (i = 1; i < tmp; i++) bits = FFMIN(bits, ilog(cb->quantlist[i]));
+        for (i = 1; i < tmp; i++) bits = FFMAX(bits, ilog(cb->quantlist[i]));
 
         put_float(pb, cb->min);
         put_float(pb, cb->delta);