Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3868:46441c25abdc libavcodec
Original Commit: r68 | ods15 | 2006-09-25 21:15:09 +0300 (Mon, 25 Sep 2006) | 2 lines
slightly more compressing, 50% compression now :)
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:08:03 +0000 |
parents | edd2496ee02a |
children | 9b1217a7e09f |
comparison
equal
deleted
inserted
replaced
3867:edd2496ee02a | 3868:46441c25abdc |
---|---|
370 rc->classbook = 1; | 370 rc->classbook = 1; |
371 rc->books = av_malloc(sizeof(int[8]) * rc->classifications); | 371 rc->books = av_malloc(sizeof(int[8]) * rc->classifications); |
372 for (i = 0; i < rc->classifications; i++) { | 372 for (i = 0; i < rc->classifications; i++) { |
373 int j; | 373 int j; |
374 for (j = 0; j < 8; j++) rc->books[i][j] = 2 + j; | 374 for (j = 0; j < 8; j++) rc->books[i][j] = 2 + j; |
375 //rc->books[i][0] = rc->books[i][1] = rc->books[i][2] = rc->books[i][3] = -1; | 375 rc->books[i][0] = rc->books[i][1] = rc->books[i][2] = rc->books[i][3] = -1; |
376 } | 376 } |
377 | 377 |
378 venc->nmappings = 1; | 378 venc->nmappings = 1; |
379 venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings); | 379 venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings); |
380 | 380 |
658 end = (position + end ) / 2; | 658 end = (position + end ) / 2; |
659 | 659 |
660 assert(end <= samples); | 660 assert(end <= samples); |
661 for (j = begin; j < end; j++) average += fabs(coeffs[j]); | 661 for (j = begin; j < end; j++) average += fabs(coeffs[j]); |
662 average /= end - begin; | 662 average /= end - begin; |
663 average /= 5000; // MAGIC! | 663 average /= 32; // MAGIC! |
664 for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break; | 664 for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break; |
665 posts[fc->list[i].sort] = j; | 665 posts[fc->list[i].sort] = j; |
666 } | 666 } |
667 } | 667 } |
668 | 668 |