diff options
author | Rodeo <[email protected]> | 2014-01-12 23:30:19 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2014-01-12 23:30:19 +0000 |
commit | 17917becc0cbf9ed402e9071935ae32b1d78fef7 (patch) | |
tree | 8a3ea65a7c681c4e62c6356f6e19a5b824b706d8 /test | |
parent | d4fdf932d85c988bae5a9046730a98f71c2364a5 (diff) |
QSV: add an option to select the preferred implementation at runtime.
This is intended for developers only; having to rebuild just to compare software to hardware is annoying as hell.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5964 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c index 6fcc2e404..282788abe 100644 --- a/test/test.c +++ b/test/test.c @@ -3765,6 +3765,7 @@ static int ParseOptions( int argc, char ** argv ) #define QSV_BASELINE 290 #define QSV_ASYNC_DEPTH 291 #define QSV_PRESET 292 + #define QSV_IMPLEMENTATION 293 for( ;; ) { @@ -3780,6 +3781,7 @@ static int ParseOptions( int argc, char ** argv ) { "qsv-preset", required_argument, NULL, QSV_PRESET, }, { "qsv-baseline", no_argument, NULL, QSV_BASELINE, }, { "qsv-async-depth", required_argument, NULL, QSV_ASYNC_DEPTH, }, + { "qsv-implementation", required_argument, NULL, QSV_IMPLEMENTATION, }, { "disable-qsv-decoding", no_argument, &qsv_decode, 0, }, #endif @@ -4427,6 +4429,46 @@ static int ParseOptions( int argc, char ** argv ) case QSV_PRESET: qsv_preset = strdup(optarg); break; + case QSV_IMPLEMENTATION: + if( optarg != NULL ) + { + if (!strcasecmp(optarg, "auto")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_AUTO_ANY|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "auto1")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_AUTO|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "software")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_SOFTWARE); + } + else if (!strcasecmp(optarg, "hardware")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_HARDWARE_ANY|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "hardware1")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_HARDWARE|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "hardware2")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_HARDWARE2|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "hardware3")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_HARDWARE3|MFX_IMPL_VIA_ANY); + } + else if (!strcasecmp(optarg, "hardware4")) + { + hb_qsv_impl_set_preferred(MFX_IMPL_HARDWARE4|MFX_IMPL_VIA_ANY); + } + else + { + hb_qsv_impl_set_preferred(atoi(optarg)); + } + } break; #endif default: fprintf( stderr, "unknown option (%s)\n", argv[cur_optind] ); |