Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3882:6c03e983f866 libavcodec
Original Commit: r82 | ods15 | 2006-09-29 21:03:43 +0300 (Fri, 29 Sep 2006) | 2 lines
fix channels to be correct for rc->type==2 before classes[] decleration
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:08:39 +0000 |
parents | b272797e8149 |
children | 6d15c93bce65 |
comparison
equal
deleted
inserted
replaced
3881:b272797e8149 | 3882:6c03e983f866 |
---|---|
921 } | 921 } |
922 put_bits(pb, book->entries[entry].len, book->entries[entry].codeword); | 922 put_bits(pb, book->entries[entry].len, book->entries[entry].codeword); |
923 return &book->dimentions[entry * book->ndimentions]; | 923 return &book->dimentions[entry * book->ndimentions]; |
924 } | 924 } |
925 | 925 |
926 static void residue_encode(venc_context_t * venc, residue_t * rc, PutBitContext * pb, float * coeffs, int samples, int channels) { | 926 static void residue_encode(venc_context_t * venc, residue_t * rc, PutBitContext * pb, float * coeffs, int samples, int real_ch) { |
927 int pass, i, j, p, k; | 927 int pass, i, j, p, k; |
928 int psize = rc->partition_size; | 928 int psize = rc->partition_size; |
929 int partitions = (rc->end - rc->begin) / psize; | 929 int partitions = (rc->end - rc->begin) / psize; |
930 int channels = (rc->type == 2) ? 1 : real_ch; | |
930 int classes[channels][partitions]; | 931 int classes[channels][partitions]; |
931 int classwords = venc->codebooks[rc->classbook].ndimentions; | 932 int classwords = venc->codebooks[rc->classbook].ndimentions; |
932 int real_ch = channels; | |
933 | 933 |
934 if (rc->type == 2) channels = 1; | 934 if (rc->type == 2) channels = 1; |
935 | 935 |
936 assert(rc->type == 2); | 936 assert(rc->type == 2); |
937 assert(real_ch == 2); | 937 assert(real_ch == 2); |