[x265] [PATCH] rc: clip the qp for 2-pass with grain
Divya Manivannan
divya at multicorewareinc.com
Wed May 18 13:22:59 CEST 2016
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1463112131 -19800
# Fri May 13 09:32:11 2016 +0530
# Node ID 329b538407431a06ce12a65950151c9215ba3c59
# Parent 28cf9adfc82e3816189b26aaeb907393b2a82ed8
rc: clip the qp for 2-pass with grain
diff -r 28cf9adfc82e -r 329b53840743 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Wed May 18 02:01:34 2016 +0000
+++ b/source/encoder/ratecontrol.cpp Fri May 13 09:32:11 2016 +0530
@@ -1700,6 +1700,9 @@
double w = x265_clip3(0.0, 1.0, curTime * 100);
q *= pow((double)m_totalBits / m_expectedBitsSum, w);
}
+ if (m_framesDone == 0 && m_param->rc.rateControlMode == X265_RC_ABR && m_isGrainEnabled)
+ q = X265_MIN(x265_qp2qScale(ABR_INIT_QP_GRAIN_MAX), q);
+
rce->qpNoVbv = x265_qScale2qp(q);
if (m_isVbv)
{
More information about the x265-devel
mailing list