[x265] dpb: cleanup, use param->maxReferences

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Mar 2 18:22:53 CET 2016


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1456919771 -19800
#      Wed Mar 02 17:26:11 2016 +0530
# Node ID 9cc9920bf82be1b43efd2a3628e28a3a78ab3b2f
# Parent  09897438eb2c4d95ff773ae716b4f211f5d3e1b3
dpb: cleanup, use param->maxReferences

diff -r 09897438eb2c -r 9cc9920bf82b source/encoder/dpb.cpp
--- a/source/encoder/dpb.cpp Wed Mar 02 15:48:15 2016 +0530
+++ b/source/encoder/dpb.cpp Wed Mar 02 17:26:11 2016 +0530
@@ -146,8 +146,8 @@
     // Mark pictures in m_piclist as unreferenced if they are not included
in RPS
     applyReferencePictureSet(&slice->m_rps, pocCurr);

-    slice->m_numRefIdx[0] = X265_MIN(m_maxRefL0,
slice->m_rps.numberOfNegativePictures); // Ensuring L0 contains just the
-ve POC
-    slice->m_numRefIdx[1] = X265_MIN(m_maxRefL1,
slice->m_rps.numberOfPositivePictures);
+    slice->m_numRefIdx[0] = X265_MIN(newFrame->m_param->maxNumReferences,
slice->m_rps.numberOfNegativePictures); // Ensuring L0 contains just the
-ve POC
+    slice->m_numRefIdx[1] = X265_MIN(newFrame->m_param->bBPyramid ? 2 : 1,
slice->m_rps.numberOfPositivePictures);
     slice->setRefPicList(m_picList);

     X265_CHECK(slice->m_sliceType != B_SLICE || slice->m_numRefIdx[1], "B
slice without L1 references (non-fatal)\n");
diff -r 09897438eb2c -r 9cc9920bf82b source/encoder/dpb.h
--- a/source/encoder/dpb.h Wed Mar 02 15:48:15 2016 +0530
+++ b/source/encoder/dpb.h Wed Mar 02 17:26:11 2016 +0530
@@ -39,8 +39,6 @@

     int                m_lastIDR;
     int                m_pocCRA;
-    int                m_maxRefL0;
-    int                m_maxRefL1;
     int                m_bOpenGOP;
     bool               m_bRefreshPending;
     bool               m_bTemporalSublayer;
@@ -54,8 +52,6 @@
         m_pocCRA = 0;
         m_bRefreshPending = false;
         m_frameDataFreeList = NULL;
-        m_maxRefL0 = param->maxNumReferences;
-        m_maxRefL1 = param->bBPyramid ? 2 : 1;
         m_bOpenGOP = param->bOpenGOP;
         m_bTemporalSublayer = !!param->bEnableTemporalSubLayers;
     }


-- 
Deepthi Nandakumar
Engineering Manager, x265
Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160302/720d8dfa/attachment.html>


More information about the x265-devel mailing list