[x265] [PATCH 4/14] Modify dpb to handle mcstf frames

Snehaa Giridharan snehaa at multicorewareinc.com
Wed Oct 19 07:29:37 UTC 2022


>From bc1a43b4c2d851e3496d59fe4d9b73d289f52bd7 Mon Sep 17 00:00:00 2001
From: ashok2022 <ashok at multicorewareinc.com>
Date: Wed, 21 Sep 2022 17:51:35 +0530
Subject: [PATCH] Modify dpb to handle mcstf frames

---
 source/encoder/dpb.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/source/encoder/dpb.cpp b/source/encoder/dpb.cpp
index d6a43a8df..2fdcd6a92 100644
--- a/source/encoder/dpb.cpp
+++ b/source/encoder/dpb.cpp
@@ -70,10 +70,18 @@ void DPB::recycleUnreferenced()
     {
         Frame *curFrame = iterFrame;
         iterFrame = iterFrame->m_next;
-        if (!curFrame->m_encData->m_bHasReferences &&
!curFrame->m_countRefEncoders)
+        bool isMCSTFReferenced = false;
+
+        if (curFrame->m_param->bEnableGopBasedTemporalFilter)
+            isMCSTFReferenced = curFrame->m_refPicCnt[1];
+
+        if (!curFrame->m_encData->m_bHasReferences &&
!curFrame->m_countRefEncoders && !isMCSTFReferenced)
         {
             curFrame->m_bChromaExtended = false;

+            if (curFrame->m_param->bEnableGopBasedTemporalFilter)
+                *curFrame->m_isSubSampled = false;
+
             // Reset column counter
             X265_CHECK(curFrame->m_reconRowFlag != NULL,
"curFrame->m_reconRowFlag check failure");
             X265_CHECK(curFrame->m_reconColCount != NULL,
"curFrame->m_reconColCount check failure");
-- 
2.34.1.windows.1

*Thanks and Regards,*





*Snehaa.GVideo Codec Engineer,Media & AI analytics
<https://multicorewareinc.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20221019/be13c079/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcstf_patch_04.diff
Type: application/octet-stream
Size: 1397 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20221019/be13c079/attachment.obj>


More information about the x265-devel mailing list