From d0edb97a4637eaffbe51c5092e84bf056caabf0f Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Sat, 7 Oct 2006 06:50:08 +0000 Subject: [PATCH] limit subset further if sample rate is <=48kHz: max blocksize is 4608 and max LPC order is 12 --- doc/html/changelog.html | 5 +-- doc/html/documentation.html | 4 +-- doc/html/faq.html | 2 +- doc/html/format.html | 5 ++- include/FLAC/format.h | 8 +++++ include/FLAC/stream_encoder.h | 8 ++--- man/flac.sgml | 4 +-- src/flac/encode.c | 5 +-- src/flac/main.c | 8 +++-- .../include/private/stream_encoder_framing.h | 2 +- src/libFLAC/stream_encoder.c | 13 +++++-- src/libFLAC/stream_encoder_framing.c | 10 +----- test/test_streams.sh | 34 +++++++++---------- 13 files changed, 62 insertions(+), 46 deletions(-) diff --git a/doc/html/changelog.html b/doc/html/changelog.html index 82cfe8c9..459c06c1 100644 --- a/doc/html/changelog.html +++ b/doc/html/changelog.html @@ -78,8 +78,9 @@
  • FLAC format:
  • diff --git a/doc/html/documentation.html b/doc/html/documentation.html index f31c9bc9..52dc5c2f 100644 --- a/doc/html/documentation.html +++ b/doc/html/documentation.html @@ -642,7 +642,7 @@ -b #, --blocksize=# - Specify the block size in samples. The default is 1152 for -l 0, otherwise 4608. Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768. The reference encoder uses the same block size for the entire stream. + Specify the block size in samples. The default is 1152 for -l 0, otherwise 4608. Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096 (and 8192/16384 if the sample rate is >48kHz). The reference encoder uses the same block size for the entire stream. @@ -799,7 +799,7 @@ -l #, --max-lpc-order=# - Specifies the maximum LPC order. This number must be <= 32. If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors. Using fixed predictors is faster but usually results in files being 5-10% larger. + Specifies the maximum LPC order. This number must be <= 32. For Subset streams, it must be <=12 if the sample rate is <=48kHz. If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors. Using fixed predictors is faster but usually results in files being 5-10% larger. diff --git a/doc/html/faq.html b/doc/html/faq.html index fa13f600..18fc085a 100644 --- a/doc/html/faq.html +++ b/doc/html/faq.html @@ -304,7 +304,7 @@
    Why did I get "ERROR initializing encoder, state = FLAC__STREAM_ENCODER_NOT_STREAMABLE"?

    - You specified encoding options that are outside the Streamable subset. If that is what you really wanted, you must also use flac --lax.
    + You specified encoding options that are outside the Streamable subset. If that is what you really wanted and you understand the consequences, you can use flac --lax to generate a non-Subset stream. The resulting file may not be streamable or play in all players.

    Why doesn't the same file compressed on different machines with the same options yield the same FLAC file?

    diff --git a/doc/html/format.html b/doc/html/format.html index 415d0461..dc9e3acc 100644 --- a/doc/html/format.html +++ b/doc/html/format.html @@ -286,7 +286,7 @@ FLAC specifies a subset of itself as the Subset format. The purpose of this is to ensure that any streams encoded according to the Subset are truly "streamable", meaning that a decoder that cannot seek within the stream can still pick up in the middle of the stream and start decoding. It also makes hardware decoder implementations more practical by limiting the encoding parameters such that decoder buffer sizes and other resource requirements can be easily determined. "flac" generates Subset streams by default unless the "--lax" command-line option is used. The Subset makes the following limitations on what may be used in the stream: