summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitrichenko, Max <[email protected]>2020-07-06 22:44:39 +0200
committerScott <[email protected]>2020-07-11 21:16:27 +0100
commit73681c07cef1b65278a382a01dc27cdf09d04970 (patch)
tree2235ee848ad6febaeb7174439c046e4d8d81cc71
parentdbe9b5d670eda4a8aaf9dee268214711bae84e2e (diff)
qsv: more depth helps for better performance
-rw-r--r--libhb/common.c2
-rw-r--r--libhb/handbrake/preset_builtin.h79
-rw-r--r--libhb/handbrake/qsv_common.h19
-rw-r--r--libhb/qsv_common.c28
-rw-r--r--preset/preset_cli_default.json1
-rw-r--r--preset/preset_template.json1
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs1
7 files changed, 29 insertions, 102 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 3c0cc0cb5..4110e8987 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -3814,7 +3814,7 @@ static void job_setup(hb_job_t * job, hb_title_t * title)
#if HB_PROJECT_FEATURE_QSV
job->qsv.enc_info.is_init_done = 0;
- job->qsv.async_depth = HB_QSV_ASYNC_DEPTH_DEFAULT;
+ job->qsv.async_depth = qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G7 ? 6 : HB_QSV_ASYNC_DEPTH_DEFAULT;
job->qsv.decode = !!(title->video_decode_support &
HB_DECODE_SUPPORT_QSV);
#endif
diff --git a/libhb/handbrake/preset_builtin.h b/libhb/handbrake/preset_builtin.h
index 792ed3dad..64cce1585 100644
--- a/libhb/handbrake/preset_builtin.h
+++ b/libhb/handbrake/preset_builtin.h
@@ -98,7 +98,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"veryfast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -204,7 +203,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"veryfast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 23.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -310,7 +308,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"veryfast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -416,7 +413,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"veryfast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -522,7 +518,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -628,7 +623,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -734,7 +728,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -840,7 +833,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -960,7 +952,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1080,7 +1071,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 19.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1200,7 +1190,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 18.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1320,7 +1309,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 18.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1440,7 +1428,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"ref=5:bframes=5\", \n"
" \"VideoPreset\": \"veryslow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 18.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1560,7 +1547,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"ref=5:bframes=5\", \n"
" \"VideoPreset\": \"veryslow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 17.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1680,7 +1666,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"ref=5:bframes=5\", \n"
" \"VideoPreset\": \"veryslow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 16.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1800,7 +1785,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"ref=5:bframes=5\", \n"
" \"VideoPreset\": \"veryslow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 16.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -1913,7 +1897,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=21000:vbv-maxrate=2100:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2019,7 +2002,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=12500:vbv-maxrate=1250:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2125,7 +2107,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=5500:vbv-maxrate=550:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2231,7 +2212,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=4500:vbv-maxrate=450:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2337,7 +2317,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=1650:vbv-maxrate=165:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=5,4:psy-rd=2.0:0.3:ref=5:bframes=5\", \n"
" \"VideoPreset\": \"veryslow\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 25.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2443,7 +2422,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=9000:vbv-maxrate=900:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 23.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2549,7 +2527,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=5000:vbv-maxrate=500:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 23.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2655,7 +2632,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"vbv-bufsize=2500:vbv-maxrate=250:aq-mode=2:aq-strength=0.8:direct=auto:analyse=all:deblock=3,2\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 23.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2761,7 +2737,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=30:min-keyint=15:ref=1:bframes=2:b-pyramid=none\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2867,7 +2842,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=30:min-keyint=15:ref=1:bframes=2:b-pyramid=none\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -2973,7 +2947,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=30:min-keyint=15:ref=1:bframes=2:b-pyramid=none\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3079,7 +3052,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=30:min-keyint=15:ref=1:bframes=2:b-pyramid=none\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 19.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3185,7 +3157,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=30:min-keyint=15:ref=1:bframes=2:b-pyramid=none\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3312,7 +3283,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3432,7 +3402,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3538,7 +3507,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3644,7 +3612,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3750,7 +3717,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3856,7 +3822,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -3962,7 +3927,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4082,7 +4046,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4202,7 +4165,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4322,7 +4284,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4442,7 +4403,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4562,7 +4522,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qpmin=4:cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4682,7 +4641,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4802,7 +4760,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -4922,7 +4879,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5042,7 +4998,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5162,7 +5117,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5268,7 +5222,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5374,7 +5327,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5497,7 +5449,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5617,7 +5568,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5737,7 +5687,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5843,7 +5792,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -5949,7 +5897,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6069,7 +6016,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6182,7 +6128,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6288,7 +6233,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6394,7 +6338,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6500,7 +6443,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6606,7 +6548,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"strong-intra-smoothing=0:rect=0:aq-mode=1\", \n"
" \"VideoPreset\": \"slow\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6712,7 +6653,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6818,7 +6758,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -6924,7 +6863,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -7030,7 +6968,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -7136,7 +7073,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"main\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -7240,7 +7176,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=30\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 24.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7344,7 +7279,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=30\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7448,7 +7382,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=30\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 21.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7552,7 +7485,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=30\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7656,7 +7588,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=30\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7760,7 +7691,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=24\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 4.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7864,7 +7794,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=24\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 4.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -7968,7 +7897,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=24\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 4.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -8072,7 +8000,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"qmin=0:qmax=24\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 4.0, \n"
" \"VideoQualityType\": 1, \n"
@@ -8185,7 +8112,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=12:min-keyint=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5:dct-decimate=0:fast-pskip=0:deblock=-2,-2\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 2.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -8291,7 +8217,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=12:min-keyint=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5:dct-decimate=0:fast-pskip=0:deblock=-2,-2\", \n"
" \"VideoPreset\": \"fast\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 10.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -8397,7 +8322,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=1:min-keyint=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5\", \n"
" \"VideoPreset\": \"superfast\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 18.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -8503,7 +8427,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"keyint=1:min-keyint=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5\", \n"
" \"VideoPreset\": \"superfast\", \n"
" \"VideoProfile\": \"high\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 16.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -8623,7 +8546,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 22.0, \n"
" \"VideoQualityType\": 2, \n"
@@ -8745,7 +8667,6 @@ const char hb_builtin_presets_json[] =
" \"VideoOptionExtra\": \"\", \n"
" \"VideoPreset\": \"medium\", \n"
" \"VideoProfile\": \"auto\", \n"
-" \"VideoQSVAsyncDepth\": 4, \n"
" \"VideoQSVDecode\": false, \n"
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
diff --git a/libhb/handbrake/qsv_common.h b/libhb/handbrake/qsv_common.h
index 611762fa6..cdd48935a 100644
--- a/libhb/handbrake/qsv_common.h
+++ b/libhb/handbrake/qsv_common.h
@@ -85,6 +85,7 @@ int hb_qsv_audio_encoder_is_enabled(int encoder);
int hb_qsv_info_init();
void hb_qsv_info_print();
hb_qsv_info_t* hb_qsv_info_get(int encoder);
+int qsv_hardware_generation(int cpu_platform);
/* Automatically load and unload any required MFX plug-ins */
hb_list_t* hb_qsv_load_plugins (hb_qsv_info_t *info, mfxSession session, mfxVersion version);
@@ -110,6 +111,24 @@ enum
HB_QSV_PARAM_UNSUPPORTED,
};
+/*
+ * * Determine the "generation" of QSV hardware based on the CPU microarchitecture.
+ * * Anything unknown is assumed to be more recent than the latest known generation.
+ * * This avoids having to order the hb_cpu_platform enum depending on QSV hardware.
+ * */
+enum
+{
+ QSV_G0, // third party hardware
+ QSV_G1, // Sandy Bridge or equivalent
+ QSV_G2, // Ivy Bridge or equivalent
+ QSV_G3, // Haswell or equivalent
+ QSV_G4, // Broadwell or equivalent
+ QSV_G5, // Skylake or equivalent
+ QSV_G6, // Kaby Lake or equivalent
+ QSV_G7, // Ice Lake or equivalent
+ QSV_FU, // always last (future processors)
+};
+
typedef struct
{
/*
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index 6989fb5f0..72e75ec6d 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -106,24 +106,7 @@ static hb_triplet_t hb_qsv_h265_levels[] =
#define HB_CHECK_MFX_VERSION(MFX_VERSION, MAJOR, MINOR) \
(MFX_VERSION.Major == MAJOR && MFX_VERSION.Minor >= MINOR)
-/*
- * Determine the "generation" of QSV hardware based on the CPU microarchitecture.
- * Anything unknown is assumed to be more recent than the latest known generation.
- * This avoids having to order the hb_cpu_platform enum depending on QSV hardware.
- */
-enum
-{
- QSV_G0, // third party hardware
- QSV_G1, // Sandy Bridge or equivalent
- QSV_G2, // Ivy Bridge or equivalent
- QSV_G3, // Haswell or equivalent
- QSV_G4, // Broadwell or equivalent
- QSV_G5, // Skylake or equivalent
- QSV_G6, // Kaby Lake or equivalent
- QSV_G7, // Ice Lake or equivalent
- QSV_FU, // always last (future processors)
-};
-static int qsv_hardware_generation(int cpu_platform)
+int qsv_hardware_generation(int cpu_platform)
{
switch (cpu_platform)
{
@@ -2034,7 +2017,14 @@ int hb_qsv_param_default(hb_qsv_param_t *param, mfxVideoParam *videoParam,
param->videoParam->mfx.GopRefDist = 0; // use Media SDK default
param->videoParam->mfx.LowPower = MFX_CODINGOPTION_OFF; // use Media SDK default
// introduced in API 1.1
- param->videoParam->AsyncDepth = HB_QSV_ASYNC_DEPTH_DEFAULT;
+ if (qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G7)
+ {
+ param->videoParam->AsyncDepth = 6;
+ }
+ else
+ {
+ param->videoParam->AsyncDepth = HB_QSV_ASYNC_DEPTH_DEFAULT;
+ }
// introduced in API 1.3
param->videoParam->mfx.BRCParamMultiplier = 0; // no multiplier
diff --git a/preset/preset_cli_default.json b/preset/preset_cli_default.json
index 412b9e625..f43f34420 100644
--- a/preset/preset_cli_default.json
+++ b/preset/preset_cli_default.json
@@ -109,7 +109,6 @@
"VideoQualityType": 2,
"VideoQualitySlider": 22.0,
"VideoQSVDecode": false,
- "VideoQSVAsyncDepth": 4,
"VideoTwoPass": false,
"VideoTurboTwoPass": false,
"x264Option": "",
diff --git a/preset/preset_template.json b/preset/preset_template.json
index 3f4698869..d418cb339 100644
--- a/preset/preset_template.json
+++ b/preset/preset_template.json
@@ -109,7 +109,6 @@
"VideoQualityType": 2,
"VideoQualitySlider": 20.0,
"VideoQSVDecode": false,
- "VideoQSVAsyncDepth": 4,
"VideoTwoPass": false,
"VideoTurboTwoPass": false,
"x264Option": "",
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index e2fa48ce9..50f257424 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -653,7 +653,6 @@ namespace HandBrakeWPF.Services.Presets.Factories
preset.VideoOptionExtra = export.Task.ExtraAdvancedArguments;
preset.VideoPreset = export.Task.VideoPreset != null ? export.Task.VideoPreset.ShortName : null;
preset.VideoProfile = export.Task.VideoProfile != null ? export.Task.VideoProfile.ShortName : null;
- preset.VideoQSVAsyncDepth = 4; // Defaulted to 4 for now.
preset.VideoQSVDecode = config.EnableQuickSyncDecoding;
preset.VideoQualitySlider = export.Task.Quality.HasValue ? export.Task.Quality.Value : 0;
preset.VideoQualityType = (int)export.Task.VideoEncodeRateType;