# HG changeset patch
# User Aruna Matheswaran <[email protected]>
# 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;
# HG changeset patch
# User Aruna Matheswaran <[email protected]>
# 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;
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to