summaryrefslogtreecommitdiffstats
path: root/libhb/preset.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-06-12 10:21:46 -0700
committerGitHub <[email protected]>2017-06-12 10:21:46 -0700
commite8e6af1ec69651c540fd04ae5417c77a8dc1c9ae (patch)
treea1cbcad17a6b9742dd208b38a2d5295550cba9cd /libhb/preset.c
parentc72396f91d2b9535f3873d8dd5dc8b7ea1b4c28e (diff)
opencl: removit it (#777)
It was only used for scaling, it fails far too often and is only faster on a limited selectoin of hardware.
Diffstat (limited to 'libhb/preset.c')
-rw-r--r--libhb/preset.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/libhb/preset.c b/libhb/preset.c
index 5ad3dbf76..d31805a63 100644
--- a/libhb/preset.c
+++ b/libhb/preset.c
@@ -1681,15 +1681,6 @@ int hb_preset_apply_video(const hb_dict_t *preset, hb_dict_t *job_dict)
hb_value_xform(value, HB_VALUE_TYPE_INT));
}
- if ((value = hb_dict_get(preset, "VideoScaler")) != NULL)
- {
- const char *s = hb_value_get_string(value);
- if (!strcasecmp(s, "opencl"))
- {
- hb_dict_set(video_dict, "OpenCL", hb_value_bool(1));
- }
- }
-
return 0;
}
@@ -2221,6 +2212,11 @@ void hb_presets_clean(hb_value_t *preset)
presets_clean(preset, hb_preset_template);
}
+static void import_video_scaler_25_0_0(hb_value_t *preset)
+{
+ hb_dict_set(preset, "VideoScaler", hb_value_string("swscale"));
+}
+
static void import_anamorphic_20_0_0(hb_value_t *preset)
{
hb_value_t *val = hb_dict_get(preset, "PicturePAR");
@@ -2833,9 +2829,16 @@ static void import_video_0_0_0(hb_value_t *preset)
}
}
+static void import_25_0_0(hb_value_t *preset)
+{
+ import_video_scaler_25_0_0(preset);
+}
+
static void import_20_0_0(hb_value_t *preset)
{
import_anamorphic_20_0_0(preset);
+
+ import_25_0_0(preset);
}
static void import_12_0_0(hb_value_t *preset)
@@ -2931,6 +2934,11 @@ static int preset_import(hb_value_t *preset, int major, int minor, int micro)
import_20_0_0(preset);
result = 1;
}
+ else if (cmpVersion(major, minor, micro, 25, 0, 0) <= 0)
+ {
+ import_25_0_0(preset);
+ result = 1;
+ }
preset_clean(preset, hb_preset_template);
}
return result;