From 0ac0a2eaa74bff6b9e848cec4acef7185c17421e Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Tue, 12 Feb 2002 23:00:00 +0000 Subject: [PATCH] add --fast and --best flags --- doc/documentation.html | 18 +++++++++++++++++- man/flac.sgml | 18 ++++++++++++++++++ src/flac/main.c | 5 +++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/doc/documentation.html b/doc/documentation.html index 4698756f..4d6a3fbc 100644 --- a/doc/documentation.html +++ b/doc/documentation.html @@ -217,7 +217,7 @@ flac assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files; this may be overridden with a command-line option; it also assumes that files ending in ".ogg" are Ogg-FLAC files. Other than this, flac makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient file systems like FAT-16).

- Before going into the full command-line description, a few other things help to sort it out: 1) flac encodes by default, so you must use -d to decode; 2) the options -0 .. -8 that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options; 3) flac behaves similarly to gzip in the way it handles input and output files. + Before going into the full command-line description, a few other things help to sort it out: 1) flac encodes by default, so you must use -d to decode; 2) the options -0 .. -8 (or --fast and --best) that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options; 3) flac behaves similarly to gzip in the way it handles input and output files.

flac will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing: @@ -556,6 +556,22 @@ Synonymous with -l 12 -b 4608 -m -e -r 6 + + + --fast + + + Fastest compression. Currently synonymous with -0 + + + + + --best + + + Highest compression. Currently synonymous with -8 + + -e diff --git a/man/flac.sgml b/man/flac.sgml index 89193242..61298d1c 100644 --- a/man/flac.sgml +++ b/man/flac.sgml @@ -397,6 +397,24 @@ + + + + + Fastest compression. Currently + synonymous with -0. + + + + + + + + Highest compression. Currently + synonymous with -8. + + + diff --git a/src/flac/main.c b/src/flac/main.c index b1b6f078..fa515411 100644 --- a/src/flac/main.c +++ b/src/flac/main.c @@ -230,7 +230,7 @@ int main(int argc, char *argv[]) aopts.do_residual_text = true; else if(0 == strcmp(argv[i], "--a-rtext-")) aopts.do_residual_text = false; - else if(0 == strcmp(argv[i], "-0")) { + else if(0 == strcmp(argv[i], "-0") || 0 == strcmp(argv[i], "--fast")) { do_exhaustive_model_search = false; do_escape_coding = false; do_mid_side = false; @@ -313,7 +313,7 @@ int main(int argc, char *argv[]) rice_parameter_search_dist = 0; max_lpc_order = 8; } - else if(0 == strcmp(argv[i], "-8")) { + else if(0 == strcmp(argv[i], "-8") || 0 == strcmp(argv[i], "--best")) { do_exhaustive_model_search = true; do_escape_coding = false; do_mid_side = true; @@ -614,6 +614,7 @@ int long_usage(const char *message, ...) fprintf(out, " -6 : synonymous with -l 8 -b 4608 -m -r 4\n"); fprintf(out, " -7 : synonymous with -l 8 -b 4608 -m -e -r 6\n"); fprintf(out, " -8 : synonymous with -l 12 -b 4608 -m -e -r 6\n"); + fprintf(out, " --fast, --best : synonymous with -0 and -8 respectively\n"); fprintf(out, " -e : do exhaustive model search (expensive!)\n"); fprintf(out, " -E : include escape coding in the entropy coder\n"); fprintf(out, " -l # : specify max LPC order; 0 => use only fixed predictors\n");