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

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


Author: ods15
Date: Mon Oct  2 07:55:43 2006
New Revision: 6428

Modified:
   trunk/libavcodec/vorbis_enc.c

Log:
Original Commit: r17 | ods15 | 2006-09-22 12:28:28 +0300 (Fri, 22 Sep 2006) | 2 lines

bug fixes in codebook header syntax

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	(original)
+++ trunk/libavcodec/vorbis_enc.c	Mon Oct  2 07:55:43 2006
@@ -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);




More information about the ffmpeg-cvslog mailing list