[x265] [PATCH] rc: fix inconsistency in pass 2 when weightp and cutree are enabled

aruna at multicorewareinc.com aruna at multicorewareinc.com
Tue Jan 30 11:40:31 CET 2018


# HG changeset patch
# User Aruna Matheswaran <aruna at multicorewareinc.com>
# Date 1517058921 -19800
#      Sat Jan 27 18:45:21 2018 +0530
# Branch stable
# Node ID 1b214cda9acf85e8c617195f1a1613601d7d673a
# Parent  c373f947f086fe8764a44a4fdb582641cef3ad49
rc: fix inconsistency in pass 2 when weightp and cutree are enabled.

diff -r c373f947f086 -r 1b214cda9acf source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Wed Dec 27 19:05:56 2017 +0530
+++ b/source/encoder/slicetype.cpp	Sat Jan 27 18:45:21 2018 +0530
@@ -154,7 +154,7 @@
     int blockXY = 0;
     int blockX = 0, blockY = 0;
     double strength = 0.f;
-    if (param->rc.aqMode == X265_AQ_NONE || param->rc.aqStrength == 0)
+    if ((param->rc.aqMode == X265_AQ_NONE || param->rc.aqStrength == 0) || (param->rc.bStatRead && param->rc.cuTree && IS_REFERENCED(curFrame)))
     {
         /* Need to init it anyways for CU tree */
         int cuCount = blockCount;
@@ -984,9 +984,7 @@
         m_lock.release();
 
         preFrame->m_lowres.init(preFrame->m_fencPic, preFrame->m_poc);
-        if (m_lookahead.m_param->rc.bStatRead && m_lookahead.m_param->rc.cuTree && IS_REFERENCED(preFrame))
-            /* cu-tree offsets were read from stats file */;
-        else if (m_lookahead.m_bAdaptiveQuant)
+        if (m_lookahead.m_bAdaptiveQuant)
             tld.calcAdaptiveQuantFrame(preFrame, m_lookahead.m_param);
         tld.lowresIntraEstimate(preFrame->m_lowres, m_lookahead.m_param->rc.qgSize);
         preFrame->m_lowresInit = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265_clone.patch
Type: text/x-patch
Size: 1519 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180130/143d2ce9/attachment.bin>


More information about the x265-devel mailing list