[x265] [X265][PATCH] Fix encode hang issue when using maximum reference

Ponsanthini Arunachalam ponsanthini.arunachalam at multicorewareinc.com
Fri Sep 13 10:48:36 UTC 2024


>From 2c75f9426ec716313482ef47f33e2015d3a95e78 Mon Sep 17 00:00:00 2001
From: Ponsanthini <ponsanthini.arunachalam at multicorewareinc.com>
Date: Fri, 13 Sep 2024 12:35:34 +0530
Subject: [PATCH] Fix encode hang issue when using maximum reference

---
 source/encoder/level.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source/encoder/level.cpp b/source/encoder/level.cpp
index a87b49d90..defcc7950 100644
--- a/source/encoder/level.cpp
+++ b/source/encoder/level.cpp
@@ -528,6 +528,7 @@ bool enforceLevel(x265_param& param, VPS& vps)
     int savedRefCount = param.maxNumReferences;
     while (vps.maxDecPicBuffering[vps.maxTempSubLayers - 1] > maxDpbSize
&& param.maxNumReferences > 1)
     {
+        param.maxNumReferences--;
         vps.maxDecPicBuffering[vps.maxTempSubLayers - 1] =
X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics[vps.maxTempSubLayers - 1]
+ 1, (uint32_t)param.maxNumReferences) + 1 + !!param.bEnableSCC);
     }
     if (param.maxNumReferences != savedRefCount)
-- 
2.41.0.windows.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240913/950bbd94/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-encode-hang-issue-when-using-maximum-reference.diff
Type: application/octet-stream
Size: 1017 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240913/950bbd94/attachment.obj>


More information about the x265-devel mailing list