Original Commit: r86 | ods15 | 2006-09-29 21:08:42 +0300 (Fri, 29 Sep 2006) | 2 lines
make put_vector ignore unused codebook entries Originally committed as revision 6491 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5e93d002e5
commit
8b33748c45
1 changed files with 1 additions and 0 deletions
|
|
@ -915,6 +915,7 @@ static float * put_vector(codebook_t * book, PutBitContext * pb, float * num) {
|
|||
for (i = 0; i < book->nentries; i++) {
|
||||
float d = 0.;
|
||||
int j;
|
||||
if (!book->entries[i].len) continue;
|
||||
for (j = 0; j < book->ndimentions; j++) {
|
||||
float a = (book->dimentions[i * book->ndimentions + j] - num[j]);
|
||||
d += a*a;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue