diff options
author | Jean-Marc Valin <jean-marc.valin@octasic.com> | 2011-03-21 18:32:50 +0300 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@octasic.com> | 2011-03-21 18:32:50 +0300 |
commit | ff96b165feadf5c0bb5c75c3013d3447bd57298a (patch) | |
tree | d074ee4f37f7aa14d972aab65c0d2c37a0ecb8b1 /tools | |
parent | d6bf19d22db8b4f758307cbb1666426254e22201 (diff) |
Removes the celt_mode_info() call.
Adds a CELT_GET_LOOKAHEAD() ctl() call instead. Other uses of
celt_mode_info() should not be needed anymore.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/celtdec.c | 4 | ||||
-rw-r--r-- | tools/celtenc.c | 15 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tools/celtdec.c b/tools/celtdec.c index 5edbd48..30cc87d 100644 --- a/tools/celtdec.c +++ b/tools/celtdec.c @@ -304,8 +304,8 @@ static CELTDecoder *process_header(ogg_packet *op, celt_int32 enh_enabled, celt_ return NULL; } - - celt_mode_info(*mode, CELT_GET_BITSTREAM_VERSION, &bitstream); + /* FIXME: Set that to zero when we freeze */ + bitstream = 0x80001000; if (bitstream!=header.version_id) fprintf(stderr, "WARNING: Input was encoded with a CELT bitstream version %d. This decoder uses %d. Output will probably be corrupted.\n",header.version_id,bitstream); diff --git a/tools/celtenc.c b/tools/celtenc.c index 1f92607..685c62c 100644 --- a/tools/celtenc.c +++ b/tools/celtenc.c @@ -308,8 +308,7 @@ int main(int argc, char **argv) celt_int32 lookahead = 0; int bytes_per_packet=-1; int complexity=-127; - int prediction=2; - int bitstream; + int prediction=2; /*Process command-line options*/ @@ -483,9 +482,7 @@ int main(int argc, char **argv) if (!mode) return 1; - celt_mode_info(mode,CELT_GET_BITSTREAM_VERSION,&bitstream); - - snprintf(vendor_string, sizeof(vendor_string), "Encoded with CELT %s (bitstream: %d)\n",CELT_VERSION,bitstream); + snprintf(vendor_string, sizeof(vendor_string), "Encoded with CELT %s\n",CELT_VERSION); comment_init(&comments, &comments_length, vendor_string); /*celt_mode_info(mode, CELT_GET_FRAME_SIZE, &frame_size);*/ @@ -499,11 +496,11 @@ int main(int argc, char **argv) st_string="stereo"; if (!quiet) if (with_cbr) - fprintf (stderr, "Encoding %.0f kHz %s audio in %.0fms packets at %0.3fkbit/sec (%d bytes per packet, CBR) with bitstream version %d\n", - header.sample_rate/1000., st_string, frame_size/(float)header.sample_rate*1000., bitrate, bytes_per_packet,bitstream); + fprintf (stderr, "Encoding %.0f kHz %s audio in %.0fms packets at %0.3fkbit/sec (%d bytes per packet, CBR)\n", + header.sample_rate/1000., st_string, frame_size/(float)header.sample_rate*1000., bitrate, bytes_per_packet); else - fprintf (stderr, "Encoding %.0f kHz %s audio in %.0fms packets at %0.3fkbit/sec (%d bytes per packet maximum) with bitstream version %d\n", - header.sample_rate/1000., st_string, frame_size/(float)header.sample_rate*1000., bitrate, bytes_per_packet,bitstream); + fprintf (stderr, "Encoding %.0f kHz %s audio in %.0fms packets at %0.3fkbit/sec (%d bytes per packet maximum)\n", + header.sample_rate/1000., st_string, frame_size/(float)header.sample_rate*1000., bitrate, bytes_per_packet); } /*Initialize CELT encoder*/ |