[x265] [PATCH: Release_3.3 branch] hme: Perform check for search range only if hme is enabled.

Pooja Venkatesan pooja at multicorewareinc.com
Tue Aug 25 11:03:32 CEST 2020


Hi,
The patch is to be applied on the Release_3.3 branch

>From acea099ac4e3834716cc7a474d9035553eac3a72 Mon Sep 17 00:00:00 2001
From: Pooja Venkatesan <pooja at multicorewareinc.com>
Date: Tue, 25 Aug 2020 14:23:23 +0530
Subject: [PATCH] hme: Perform check for search range only if hme is enabled.

---
 source/common/param.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/source/common/param.cpp b/source/common/param.cpp
index d2cab5b3d..7bac55316 100644
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -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");
-- 
2.24.0.windows.2

Regards,
*Pooja Venkatesan*,
Video Codec Engineer,
Media & AI analytics BU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200825/dfe9f688/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hme_check.diff
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200825/dfe9f688/attachment.obj>


More information about the x265-devel mailing list