summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-10-20 17:28:54 +0000
committerjbrjake <[email protected]>2007-10-20 17:28:54 +0000
commit7e868ebe809a3ad5046e3db2c4d9c57ab59ba17d (patch)
treed8daca79178ba0500a4d74081e1cc0612f707c99
parent37f0464f607dc7b905ed34048faf41d01e4aba7c (diff)
Adds short parameter names for denoising and deinterlacing in the CLI.
--denoise=weak , --deinterlace=slower, etc. Denoise options are weak, medium, and strong. Deinterlace options are fast, slow, slower, slowest. Both use the same parameters as the MacGUI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1032 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--test/test.c44
1 files changed, 41 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c
index ac3af6f72..9c6d35816 100644
--- a/test/test.c
+++ b/test/test.c
@@ -884,11 +884,15 @@ static void ShowHelp()
"\n"
" -2, --two-pass Use two-pass mode\n"
" -d, --deinterlace Deinterlace video with yadif/mcdeint filter\n"
- " <YM:FD:MM:QP> (default 0:-1:-1:1)\n"
+ " <YM:FD:MM:QP> (default 0:-1:-1:1)\n"
+ " or\n"
+ " <fast/slow/slower/slowest>\n"
" -7, --deblock Deblock video with pp7 filter\n"
" <QP:M> (default 0:2)\n"
" -8, --denoise Denoise video with hqdn3d filter\n"
" <SL:SC:TL:TC> (default 4:3:6:4.5)\n"
+ " or\n"
+ " <weak/medium/strong>\n"
" -9, --detelecine Detelecine video with pullup filter\n"
" <L:R:T:B:SB:MP> (default 1:1:4:4:0:0)\n"
" -g, --grayscale Grayscale encoding\n"
@@ -1108,7 +1112,26 @@ static int ParseOptions( int argc, char ** argv )
case 'd':
if( optarg != NULL )
{
- deinterlace_opt = strdup( optarg );
+ if (!( strcmp( optarg, "fast" ) ))
+ {
+ deinterlace_opt = "-1";
+ }
+ else if (!( strcmp( optarg, "slow" ) ))
+ {
+ deinterlace_opt = "0";
+ }
+ else if (!( strcmp( optarg, "slower" ) ))
+ {
+ deinterlace_opt = "2:-1:1";
+ }
+ else if (!( strcmp( optarg, "slowest" ) ))
+ {
+ deinterlace_opt = "1:-1:1";
+ }
+ else
+ {
+ deinterlace_opt = strdup( optarg );
+ }
}
deinterlace = 1;
break;
@@ -1122,7 +1145,22 @@ static int ParseOptions( int argc, char ** argv )
case '8':
if( optarg != NULL )
{
- denoise_opt = strdup( optarg );
+ if (!( strcmp( optarg, "weak" ) ))
+ {
+ denoise_opt = "2:1:2:3";
+ }
+ else if (!( strcmp( optarg, "medium" ) ))
+ {
+ denoise_opt = "3:2:2:3";
+ }
+ else if (!( strcmp( optarg, "strong" ) ))
+ {
+ denoise_opt = "7:7:5:5";
+ }
+ else
+ {
+ denoise_opt = strdup( optarg );
+ }
}
denoise = 1;
break;