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

ods15 subversion
Mon Oct 2 08:07:39 CEST 2006


Author: ods15
Date: Mon Oct  2 08:07:38 2006
New Revision: 6461

Modified:
   trunk/libavcodec/vorbis_enc.c

Log:
Original Commit: r55 | ods15 | 2006-09-24 13:54:43 +0300 (Sun, 24 Sep 2006) | 2 lines

bug fixes for residue with no books in all passes

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	(original)
+++ trunk/libavcodec/vorbis_enc.c	Mon Oct  2 08:07:38 2006
@@ -480,7 +480,7 @@
     for (i = 0; i < rc->classifications; i++) {
         int j;
         for (j = 0; j < 8; j++)
-            if (rc->books[i][j])
+            if (rc->books[i][j] != -1)
                 put_bits(pb, 8, rc->books[i][j]);
     }
 }
@@ -708,6 +708,7 @@
                     int nbook = rc->books[classes[j][p]][pass];
                     codebook_t * book = &venc->codebooks[nbook];
                     float * buf = coeffs + samples*j + rc->begin + p*psize;
+                    if (nbook == -1) continue;
 
                     assert(rc->type == 0);
                     assert(book->ndimentions == 1);




More information about the ffmpeg-cvslog mailing list