Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3855:d692105e5a58 libavcodec
Original Commit: r54 | ods15 | 2006-09-24 13:54:12 +0300 (Sun, 24 Sep 2006) | 2 lines
change floor value to lower residue
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:07:36 +0000 |
parents | 8de41fcc6500 |
children | 5812c2d48dbd |
comparison
equal
deleted
inserted
replaced
3854:8de41fcc6500 | 3855:d692105e5a58 |
---|---|
323 rc->classbook = 1; | 323 rc->classbook = 1; |
324 rc->books = av_malloc(sizeof(int[8]) * rc->classifications); | 324 rc->books = av_malloc(sizeof(int[8]) * rc->classifications); |
325 for (i = 0; i < rc->classifications; i++) { | 325 for (i = 0; i < rc->classifications; i++) { |
326 int j; | 326 int j; |
327 for (j = 0; j < 8; j++) rc->books[i][j] = 2 + j; | 327 for (j = 0; j < 8; j++) rc->books[i][j] = 2 + j; |
328 rc->books[i][0] = rc->books[i][1] = rc->books[i][2] = rc->books[i][3] = -1; | |
328 } | 329 } |
329 | 330 |
330 venc->nmappings = 1; | 331 venc->nmappings = 1; |
331 venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings); | 332 venc->mappings = av_malloc(sizeof(mapping_t) * venc->nmappings); |
332 | 333 |
748 for (i = 0; i < venc->channels; i++) { | 749 for (i = 0; i < venc->channels; i++) { |
749 floor_t * fc = &venc->floors[mapping->floor[mapping->mux[i]]]; | 750 floor_t * fc = &venc->floors[mapping->floor[mapping->mux[i]]]; |
750 int range = 255 / fc->multiplier + 1; | 751 int range = 255 / fc->multiplier + 1; |
751 int j; | 752 int j; |
752 put_bits(&pb, 1, 1); // non zero | 753 put_bits(&pb, 1, 1); // non zero |
753 put_bits(&pb, ilog(range - 1), 113); // magic value - 3.7180282E-05 | 754 put_bits(&pb, ilog(range - 1), 180); // magic value - 3.7180282E-05 |
754 put_bits(&pb, ilog(range - 1), 113); // both sides of X | 755 put_bits(&pb, ilog(range - 1), 180); // both sides of X |
755 for (j = 0; j < fc->partitions; j++) { | 756 for (j = 0; j < fc->partitions; j++) { |
756 floor_class_t * c = &fc->classes[fc->partition_to_class[j]]; | 757 floor_class_t * c = &fc->classes[fc->partition_to_class[j]]; |
757 codebook_t * book = &venc->codebooks[c->books[0]]; | 758 codebook_t * book = &venc->codebooks[c->books[0]]; |
758 int entry = 0; | 759 int entry = 0; |
759 int k; | 760 int k; |
761 put_bits(&pb, book->entries[entry].len, book->entries[entry].codeword); | 762 put_bits(&pb, book->entries[entry].len, book->entries[entry].codeword); |
762 } | 763 } |
763 } | 764 } |
764 | 765 |
765 for (j = 0; j < samples; j++) { | 766 for (j = 0; j < samples; j++) { |
766 venc->floor[i * samples + j] = floor1_inverse_db_table[113]; | 767 venc->floor[i * samples + j] = floor1_inverse_db_table[180]; |
767 } | 768 } |
768 } | 769 } |
769 | 770 |
770 for (i = 0; i < venc->channels; i++) { | 771 for (i = 0; i < venc->channels; i++) { |
771 int j; | 772 int j; |