summaryrefslogtreecommitdiffstats
path: root/libhb/preset.c
diff options
context:
space:
mode:
authormaximd33 <[email protected]>2019-05-18 20:49:10 +0200
committerScott <[email protected]>2019-05-26 19:28:57 +0100
commitec37ce222d4baaf13b0c5f5efedf350d5f28fc8f (patch)
treef168442ca71caa5d99929bca4e0d5c838df2f3ca /libhb/preset.c
parentacbeba350a2067b716c5867296e4d9396be37657 (diff)
qsv: zero-copy re-implementation
Diffstat (limited to 'libhb/preset.c')
-rw-r--r--libhb/preset.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/libhb/preset.c b/libhb/preset.c
index 4eb45254c..b60a0ff7e 100644
--- a/libhb/preset.c
+++ b/libhb/preset.c
@@ -12,6 +12,10 @@
#include "hb_dict.h"
#include "plist.h"
+#if HB_PROJECT_FEATURE_QSV
+#include "qsv_common.h"
+#endif
+
#if defined(SYS_LINUX)
#define HB_PRESET_PLIST_FILE "ghb/presets"
#define HB_PRESET_JSON_FILE "ghb/presets.json"
@@ -1601,8 +1605,16 @@ int hb_preset_apply_filters(const hb_dict_t *preset, hb_dict_t *job_dict)
filter_dict = hb_dict_init();
hb_dict_set(filter_dict, "ID", hb_value_int(HB_FILTER_VFR));
hb_dict_set(filter_dict, "Settings", filter_settings);
- hb_add_filter2(filter_list, filter_dict);
-
+#if HB_PROJECT_FEATURE_QSV
+ if(hb_qsv_preset_is_zero_copy_enabled(job_dict))
+ {
+ hb_log("HB_FILTER_VFR filter is disabled");
+ }
+ else
+#endif
+ {
+ hb_add_filter2(filter_list, filter_dict);
+ }
return 0;
}
@@ -1977,8 +1989,16 @@ int hb_preset_apply_title(hb_handle_t *h, int title_index,
filter_dict = hb_dict_init();
hb_dict_set(filter_dict, "ID", hb_value_int(HB_FILTER_CROP_SCALE));
hb_dict_set(filter_dict, "Settings", filter_settings);
- hb_add_filter2(filter_list, filter_dict);
-
+#if HB_PROJECT_FEATURE_QSV
+ if(hb_qsv_preset_is_zero_copy_enabled(job_dict))
+ {
+ hb_log("HB_FILTER_CROP_SCALE filter is disabled");
+ }
+ else
+#endif
+ {
+ hb_add_filter2(filter_list, filter_dict);
+ }
// Audio settings
if (hb_preset_job_add_audio(h, title_index, preset, job_dict) != 0)
{