]> granicus.if.org Git - handbrake/commitdiff
qsv: full mode only when needed
authoragalin89 <artem.galin@gmail.com>
Wed, 16 Oct 2019 20:49:08 +0000 (21:49 +0100)
committerBradley Sepos <bradley@bradleysepos.com>
Thu, 24 Oct 2019 15:30:14 +0000 (11:30 -0400)
Squashed:

- qsv: check filter_count instead of variable
- fix: remove unchanged files from review
- qsv: simplified code

libhb/hb_json.c
libhb/qsv_common.c

index 8ad0a720dd16d6950711c393b6542b785010fa5b..64e953f5d7021a593a8fd8d93625bf0c7dae0d96 100644 (file)
@@ -1394,16 +1394,7 @@ hb_job_t* hb_dict_to_job( hb_handle_t * h, hb_dict_t *dict )
             {
                 hb_filter_object_t *filter;
                 filter = hb_filter_init(filter_id);
-#if HB_PROJECT_FEATURE_QSV
-                if(hb_qsv_full_path_is_enabled(job))
-                {
-                    hb_log("Filter with ID=%d is disabled", filter_id);
-                }
-                else
-#endif
-                {
-                    hb_add_filter_dict(job, filter, filter_settings);
-                }
+                hb_add_filter_dict(job, filter, filter_settings);
             }
         }
     }
index 93fb60bd9748159189c29e962c6e996e066ad5ea..b5998ef668f0028fb5375f605101d9e6cee83d83 100644 (file)
@@ -1004,13 +1004,18 @@ int hb_qsv_full_path_is_enabled(hb_job_t *job)
 {
     static int device_check_completed = 0;
     static int device_check_succeded = 0;
+    int filter_count = hb_list_count(job->list_filter);
+
     if(!device_check_completed)
     {
        device_check_succeded = ((hb_d3d11va_device_check() >= 0)
         || (hb_dxva2_device_check() == 0)) ? 1 : 0;
        device_check_completed = 1;
     }
-    return (hb_qsv_decode_is_enabled(job) && hb_qsv_info_get(job->vcodec) && device_check_succeded);
+    return (hb_qsv_decode_is_enabled(job) &&
+        hb_qsv_info_get(job->vcodec) &&
+        device_check_succeded &&
+        (filter_count == 0));
 }
 
 int hb_qsv_copyframe_is_slow(int encoder)