aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:55:43 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:55:43 +0000
commit128c0dfe9ad7ea9fae8798a36760d85f91cd9af0 (patch)
tree411ec3fcd8039a499b0d70c938d9363a901750f5 /libavcodec/vorbis_enc.c
parent1495689c5b32794d1e453da805eaa1e98a118390 (diff)
downloadffmpeg-128c0dfe9ad7ea9fae8798a36760d85f91cd9af0.tar.gz
Original Commit: r17 | ods15 | 2006-09-22 12:28:28 +0300 (Fri, 22 Sep 2006) | 2 lines
bug fixes in codebook header syntax Originally committed as revision 6428 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r--libavcodec/vorbis_enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 11ed57a689..1616099ce5 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -252,7 +252,7 @@ static void put_codebook_header(PutBitContext * pb, codebook_t * cb) {
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 @@ static void put_codebook_header(PutBitContext * pb, codebook_t * cb) {
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);