changeset 12685:412af0d0e756 Release_3.4

hme: Perform check for search range only if hme is enabled.
author Pooja Venkatesan <pooja@multicorewareinc.com>
date Tue, 25 Aug 2020 19:36:01 +0530
parents bf1d42cca919
children 7152c92d55ee
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:51 2020 +0530
+++ b/source/common/param.cpp	Tue Aug 25 19:36:01 2020 +0530
@@ -1772,9 +1772,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");