diff options
author | Rodeo <[email protected]> | 2012-03-28 23:22:17 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-03-28 23:22:17 +0000 |
commit | 39425d02862f054e3ef87ef45b789254c64511ad (patch) | |
tree | 30583795947cec54860e51a8b675bfd29f03a26a /test | |
parent | cca9c898d2f57047ab2cdabee8c794ddf2775aa7 (diff) |
libhb: use source colorimetry information when available.
When source colorimetry can't be determined, guess.
Added code to guess PAL SD content and updated code to guess HD content.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4552 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/test.c b/test/test.c index f8d375b64..504a3507d 100644 --- a/test/test.c +++ b/test/test.c @@ -2898,9 +2898,9 @@ static void ShowHelp() " --modulus Set the number you want the scaled pixel dimensions\n" " <number> to divide cleanly by. Does not affect strict\n" " anamorphic mode, which is always mod 2 (default: 16)\n" - " -M --color-matrix Set the color space signaled by the output\n" - " <601 or 709> (Bt.601 is mostly for SD content, Bt.709 for HD,\n" - " default: set by resolution)\n" + " -M, --color-matrix Set the color space signaled by the output\n" + " Values: 709, pal, ntsc, 601 (same as ntsc)\n" + " (default: detected from source)\n" "\n" "### Filters---------------------------------------------------------\n\n" @@ -3725,11 +3725,16 @@ static int ParseOptions( int argc, char ** argv ) acodec_fallback = strdup( optarg ); break; case 'M': - if( atoi( optarg ) == 601 ) - color_matrix_code = 1; - else if( atoi( optarg ) == 709 ) - color_matrix_code = 2; - break; + if( optarg != NULL ) + { + if( !strcmp( optarg, "601" ) || + !strcmp( optarg, "ntsc" ) ) + color_matrix_code = 1; + else if( !strcmp( optarg, "pal" ) ) + color_matrix_code = 2; + else if( !strcmp( optarg, "709" ) ) + color_matrix_code = 3; + } break; case MIN_DURATION: min_title_duration = strtol( optarg, NULL, 0 ); break; |