Commit 6d9dc2d6 authored by ods15's avatar ods15

Original Commit: r77 | ods15 | 2006-09-29 15:12:56 +0300 (Fri, 29 Sep 2006) | 2 lines

fix for book==-1 in floor

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6482 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e9b82a75
......@@ -773,13 +773,14 @@ static void floor_encode(venc_context_t * venc, floor_t * fc, PutBitContext * pb
put_bits(pb, book->entries[cval].len, book->entries[cval].codeword);
}
for (k = 0; k < c->dim; k++) {
codebook_t * book = &venc->codebooks[c->books[cval & (csub-1)]];
int book = c->books[cval & (csub-1)];
int entry = coded[counter++];
cval >>= c->subclass;
if (book == -1) continue;
if (entry == -1) entry = 0;
assert(entry < book->nentries);
assert(entry < venc->codebooks[book].nentries);
assert(entry >= 0);
put_bits(pb, book->entries[entry].len, book->entries[entry].codeword);
put_bits(pb, venc->codebooks[book].entries[entry].len, venc->codebooks[book].entries[entry].codeword);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment