diff options
author | jbrjake <[email protected]> | 2007-01-04 19:48:54 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2007-01-04 19:48:54 +0000 |
commit | 6481b2d707275c582b9cf90dbe96598082a1fe33 (patch) | |
tree | 4b1e8d56bb73b9e7c03e21532687f59d948e44a3 /test/test.c | |
parent | b30e6cee64f1005cd31f5deb00ca5120c9852d23 (diff) |
Added CRF x264 rate control method to HBTest.
Constant quantizer is maintained as the default so nothing changes:
HBTest -i input -o output -e x264 -q 0.60
Switch to constant rate factor by throwing a -Q on the end:
HBTest -i input -o output -e x264 -q 0.60 -Q
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@89 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/test.c b/test/test.c index de499f4fd..9d6543006 100644 --- a/test/test.c +++ b/test/test.c @@ -41,6 +41,7 @@ static int mux = 0; static int acodec = 0; static int chapter_start = 0; static int chapter_end = 0; +static int crf = 0; /* Exit cleanly on Ctrl-C */ static volatile int die = 0; @@ -412,6 +413,11 @@ static int HandleEvents( hb_handle_t * h ) } job->file = strdup( output ); + if( crf ) + { + job->crf = 1; + } + if( twoPass ) { job->pass = 1; @@ -538,6 +544,7 @@ static void ShowHelp() fprintf( stderr, " kHz)\n" " -b, --vb <kb/s> Set video bitrate (default: 1000)\n" " -q, --quality <float> Set video quality (0.0..1.0)\n" + " -Q, --crf Use with -q for CRF instead of CQP\n" " -S, --size <MB> Set target size\n" " -B, --ab <kb/s> Set audio bitrate (default: 128)\n" " -w, --width <number> Set picture width\n" @@ -583,7 +590,8 @@ static int ParseOptions( int argc, char ** argv ) { "ab", required_argument, NULL, 'B' }, { "rate", required_argument, NULL, 'r' }, { "arate", required_argument, NULL, 'R' }, - + { "crf", no_argument, NULL, 'Q' }, + { 0, 0, 0, 0 } }; @@ -591,7 +599,7 @@ static int ParseOptions( int argc, char ** argv ) int c; c = getopt_long( argc, argv, - "hvuC:f:i:o:t:c:a:s:e:E:2dgw:l:n:b:q:S:B:r:R:", + "hvuC:f:i:o:t:c:a:s:e:E:2dgw:l:n:b:q:S:B:r:R:Q", long_options, &option_index ); if( c < 0 ) { @@ -769,6 +777,9 @@ static int ParseOptions( int argc, char ** argv ) case 'B': abitrate = atoi( optarg ); break; + case 'Q': + crf = 1; + break; default: fprintf( stderr, "unknown option (%s)\n", argv[optind] ); |