changeset 12688:87d6d3234de2

hme: Perform check for search range only if hme is enabled.
author Pooja Venkatesan <pooja@multicorewareinc.com>
date Tue, 25 Aug 2020 19:36:26 +0530
parents 480749fe68b4
children d92c251b6cd2
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:36:17 2020 +0530
+++ b/source/common/param.cpp	Tue Aug 25 19:36:26 2020 +0530
@@ -1781,9 +1781,12 @@ int x265_check_params(x265_param* param)
         "Invalid refQpDelta value. Value must be between 0 and 10 (inclusive)");
     CHECK(param->nonRefQpDelta < 0 || param->nonRefQpDelta > 10,
         "Invalid nonRefQpDelta 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");