diff options
author | agalin89 <[email protected]> | 2019-10-16 21:49:08 +0100 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2019-10-24 11:30:14 -0400 |
commit | 387589be2114ed2981dc8b48c66154da01302565 (patch) | |
tree | 9d73593ae5c833196625ee58c38629b5a880d51d /libhb | |
parent | 085745264a52d8cf8f8849ed55edde485eee91a2 (diff) |
qsv: full mode only when needed
Squashed:
- qsv: check filter_count instead of variable
- fix: remove unchanged files from review
- qsv: simplified code
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/hb_json.c | 11 | ||||
-rw-r--r-- | libhb/qsv_common.c | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/libhb/hb_json.c b/libhb/hb_json.c index 8ad0a720d..64e953f5d 100644 --- a/libhb/hb_json.c +++ b/libhb/hb_json.c @@ -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); } } } diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index 93fb60bd9..b5998ef66 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -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) |