]> granicus.if.org Git - handbrake/commitdiff
QSV: add undocumented "--qsv-baseline" option for testing workarounds on newer platforms.
authorRodeo <tdskywalker@gmail.com>
Wed, 5 Jun 2013 15:20:30 +0000 (15:20 +0000)
committerRodeo <tdskywalker@gmail.com>
Wed, 5 Jun 2013 15:20:30 +0000 (15:20 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5556 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 5555ab4df7420a6ba00241d2fc61ec6141b3c102..48b68a17840eafabd92c261ec46afcf2c6e4ed0a 100644 (file)
@@ -3570,6 +3570,7 @@ static int ParseOptions( int argc, char ** argv )
     #define H264_LEVEL          286
     #define NORMALIZE_MIX       287
     #define AUDIO_DITHER        288
+    #define QSV_BASELINE        289
 
     for( ;; )
     {
@@ -3578,7 +3579,10 @@ static int ParseOptions( int argc, char ** argv )
             { "help",        no_argument,       NULL,    'h' },
             { "update",      no_argument,       NULL,    'u' },
             { "verbose",     optional_argument, NULL,    'v' },
-            { "no-dvdnav",      no_argument,       NULL,    DVDNAV },
+            { "no-dvdnav",   no_argument,       NULL,    DVDNAV },
+#ifdef USE_QSV
+            { "qsv-baseline", no_argument,      NULL,    QSV_BASELINE },
+#endif
 
             { "format",      required_argument, NULL,    'f' },
             { "input",       required_argument, NULL,    'i' },
@@ -4199,6 +4203,30 @@ static int ParseOptions( int argc, char ** argv )
             case MIN_DURATION:
                 min_title_duration = strtol( optarg, NULL, 0 );
                 break;
+            case QSV_BASELINE:
+#ifdef USE_QSV
+                if (hb_qsv_available())
+                {
+                    /* XXX: for testing workarounds */
+                    hb_qsv_info->features     = 0;
+                    hb_qsv_info->cpu_platform = HB_CPU_PLATFORM_UNSPECIFIED;
+                    if (hb_qsv_info->hardware_available)
+                    {
+                        hb_qsv_info->hardware_version.Major =
+                            hb_qsv_info->minimum_version.Major;
+                        hb_qsv_info->hardware_version.Minor =
+                            hb_qsv_info->minimum_version.Minor;
+                    }
+                    if (hb_qsv_info->software_available)
+                    {
+                        hb_qsv_info->software_version.Major =
+                            hb_qsv_info->minimum_version.Major;
+                        hb_qsv_info->software_version.Minor =
+                            hb_qsv_info->minimum_version.Minor;
+                    }
+                }
+#endif
+                break;
             default:
                 fprintf( stderr, "unknown option (%s)\n", argv[cur_optind] );
                 return -1;