changeset 12682:a3056c058d1a Release_3.3

hme: Perform check for search range only if hme is enabled.
author Pooja Venkatesan <pooja@multicorewareinc.com>
date Tue, 25 Aug 2020 19:35:37 +0530
parents a12bdab5706d
children c9ae991bcf58
files source/common/param.cpp
diffstat 1 files changed, 6 insertions(+-), 3 deletions(-) [+]
line wrap: on
line diff
--- a/source/common/param.cpp	Tue Aug 25 19:35:30 2020 +0530
+++ b/source/common/param.cpp	Tue Aug 25 19:35:37 2020 +0530
@@ -1761,9 +1761,12 @@ int x265_check_params(x265_param* param)
         "Invalid scenecut Window duration. Value must be between 0 and 1000(inclusive)");
     CHECK(param->maxQpDelta < 0 || param->maxQpDelta > 10,
         "Invalid maxQpDelta value. Value must be between 0 and 10 (inclusive)");
-    for(int level = 0; level < 3; level++)
-        CHECK(param->hmeRange[level] < 0 || param->hmeRange[level] >= 32768,
-            "Search Range for HME levels must be between 0 and 32768");
+    if (param->bEnableHME)
+    {
+        for (int level = 0; level < 3; level++)
+            CHECK(param->hmeRange[level] < 0 || param->hmeRange[level] >= 32768,
+                "Search Range for HME levels must be between 0 and 32768");
+    }
 #if !X86_64
     CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || param->sourceHeight > 480),
         "SEA motion search does not support resolutions greater than 480p in 32 bit build");