comparison vorbis_enc.c @ 3862:ee9379fc77a9 libavcodec

Original Commit: r62 | ods15 | 2006-09-25 13:12:07 +0300 (Mon, 25 Sep 2006) | 2 lines api change for floor_encode
author ods15
date Mon, 02 Oct 2006 06:07:51 +0000
parents b98ea563e9bc
children 2c8d1cadd86e
comparison
equal deleted inserted replaced
3861:b98ea563e9bc 3862:ee9379fc77a9
662 for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break; 662 for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
663 posts[fc->list[i].sort] = j; 663 posts[fc->list[i].sort] = j;
664 } 664 }
665 } 665 }
666 666
667 static void floor_encode(venc_context_t * venc, floor_t * fc, PutBitContext * pb, float * floor, int samples) { 667 static void floor_encode(venc_context_t * venc, floor_t * fc, PutBitContext * pb, int * posts, float * floor, int samples) {
668 int range = 255 / fc->multiplier + 1; 668 int range = 255 / fc->multiplier + 1;
669 int j; 669 int j;
670 put_bits(pb, 1, 1); // non zero 670 put_bits(pb, 1, 1); // non zero
671 put_bits(pb, ilog(range - 1), 180); // magic value - 3.7180282E-05 671 put_bits(pb, ilog(range - 1), 180); // magic value - 3.7180282E-05
672 put_bits(pb, ilog(range - 1), 180); // both sides of X 672 put_bits(pb, ilog(range - 1), 180); // both sides of X
843 843
844 for (i = 0; i < venc->channels; i++) { 844 for (i = 0; i < venc->channels; i++) {
845 floor_t * fc = &venc->floors[mapping->floor[mapping->mux[i]]]; 845 floor_t * fc = &venc->floors[mapping->floor[mapping->mux[i]]];
846 int posts[fc->values]; 846 int posts[fc->values];
847 floor_fit(venc, fc, &venc->coeffs[i * samples], posts, samples); 847 floor_fit(venc, fc, &venc->coeffs[i * samples], posts, samples);
848 floor_encode(venc, fc, &pb, &venc->floor[i * samples], samples); 848 floor_encode(venc, fc, &pb, posts, &venc->floor[i * samples], samples);
849 } 849 }
850 850
851 for (i = 0; i < venc->channels; i++) { 851 for (i = 0; i < venc->channels; i++) {
852 int j; 852 int j;
853 for (j = 0; j < samples; j++) { 853 for (j = 0; j < samples; j++) {