[x265] [PATCH] rc: change the number of rows for updating rc stats
Divya Manivannan
divya at multicorewareinc.com
Tue Mar 29 12:54:14 CEST 2016
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1459171242 -19800
# Mon Mar 28 18:50:42 2016 +0530
# Node ID bd7aa9c1e98a1233f2a36154f67e7a44e66a53f3
# Parent 5dbd6a0c8e17481a0c4d31243ebc8b46ad59e15d
rc: change the number of rows for updating rc stats
diff -r 5dbd6a0c8e17 -r bd7aa9c1e98a source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Mar 28 12:53:40 2016 +0530
+++ b/source/encoder/frameencoder.cpp Mon Mar 28 18:50:42 2016 +0530
@@ -1207,14 +1207,15 @@
/* If encoding with ABR, update update bits and complexity in rate control
* after a number of rows so the next frame's rateControlStart has more
* accurate data for estimation. At the start of the encode we update stats
- * after half the frame is encoded, but after this initial period we update
+ * after 20% of the frame is encoded in 4k video and half the frame is encoded
+ * in other resolutions, but after this initial period we update
* after refLagRows (the number of rows reference frames must have completed
* before referencees may begin encoding) */
uint32_t rowCount = 0;
if (m_param->rc.rateControlMode == X265_RC_ABR || bIsVbv)
{
if ((uint32_t)m_rce.encodeOrder <= 2 * (m_param->fpsNum / m_param->fpsDenom))
- rowCount = X265_MIN((m_numRows + 1) / 2, m_numRows - 1);
+ rowCount = X265_MIN((m_param->sourceHeight > 2000 ? (m_numRows + 1) / 5 : (m_numRows + 1) / 2), m_numRows - 1);
else
rowCount = X265_MIN(m_refLagRows, m_numRows - 1);
if (row == rowCount)
More information about the x265-devel
mailing list