]> granicus.if.org Git - handbrake/commitdiff
QSV: hb_qsv_info_init, don't set software-only features as available if hardware...
authorRodeo <tdskywalker@gmail.com>
Sun, 23 Jun 2013 17:52:01 +0000 (17:52 +0000)
committerRodeo <tdskywalker@gmail.com>
Sun, 23 Jun 2013 17:52:01 +0000 (17:52 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5597 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/hb.c

index 7d999a51d99589f7ab3a02c8b3eb5d87e329bc26..0664e08f8743e33647f99570e7a2a593dc6b3f18 100644 (file)
@@ -408,10 +408,22 @@ static int hb_qsv_info_init()
                                   hb_qsv_info->software_available);
 
     // check for version-dependent features
-    if (HB_QSV_MIN_SOFTWARE(1, 6) || HB_QSV_MIN_HARDWARE(1, 6))
+    // we only use software as a fallback, so check hardware first
+    if (hb_qsv_info->hardware_available)
     {
-        hb_qsv_info->features |= HB_QSV_FEATURE_DECODE_TIMESTAMPS;
-        hb_qsv_info->features |= HB_QSV_FEATURE_CODEC_OPTIONS_2;
+        if (HB_QSV_MIN_HARDWARE(1, 6))
+        {
+            hb_qsv_info->features |= HB_QSV_FEATURE_DECODE_TIMESTAMPS;
+            hb_qsv_info->features |= HB_QSV_FEATURE_CODEC_OPTIONS_2;
+        }
+    }
+    else
+    {
+        if (HB_QSV_MIN_SOFTWARE(1, 6))
+        {
+            hb_qsv_info->features |= HB_QSV_FEATURE_DECODE_TIMESTAMPS;
+            hb_qsv_info->features |= HB_QSV_FEATURE_CODEC_OPTIONS_2;
+        }
     }
 
     if (av_get_cpu_flags() & AV_CPU_FLAG_SSE)