[x265] [PATCH] rc: bug fix to avoid vbv predictor misprediction errors at scenecut
aarthi at multicorewareinc.com
aarthi at multicorewareinc.com
Thu Oct 1 17:29:36 CEST 2015
# HG changeset patch
# User Aarthi Thirumalai
# Date 1443713129 -19800
# Thu Oct 01 20:55:29 2015 +0530
# Branch stable
# Node ID 13cfec40af4fe67c3a82e3d82ea9d289822a4fbc
# Parent 33218e324fec6c0ea04499ebd6ac3b25d7dd91d1
rc: bug fix to avoid vbv predictor misprediction errors at scenecut
diff -r 33218e324fec -r 13cfec40af4f source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Tue Sep 22 13:41:11 2015 +0530
+++ b/source/encoder/ratecontrol.cpp Thu Oct 01 20:55:29 2015 +0530
@@ -1583,8 +1583,9 @@
rce->qpNoVbv = x265_qScale2qp(q);
q = clipQscale(curFrame, rce, q);
/* clip qp to permissible range after vbv-lookahead estimation to avoid possible
- * mispredictions by initial frame size predictors */
- if (!m_2pass && m_isVbv && m_pred[m_predType].count == 1)
+ * mispredictions by initial frame size predictors, after each scenecut */
+ bool isFrameAfterScenecut = m_sliceType!= I_SLICE && m_curSlice->m_refPicList[0][0]->m_lowres.bScenecut;
+ if (!m_2pass && m_isVbv && isFrameAfterScenecut)
q = x265_clip3(lqmin, lqmax, q);
}
m_lastQScaleFor[m_sliceType] = q;
More information about the x265-devel
mailing list