[x265] [PATCH] Reduce QP for the scene changes that is followed by black frames
pooja at multicorewareinc.com
pooja at multicorewareinc.com
Tue May 21 09:05:14 CEST 2019
# HG changeset patch
# User Pooja Venkatesan <pooja at multicorewareinc.com>
# Date 1552816785 -19800
# Sun Mar 17 15:29:45 2019 +0530
# Node ID ec5de1f484fc53867a23486672290712f34afe4e
# Parent 39b35ea862834f05e7437e1670e55de595c8f875
Reduce QP for the scene changes that is followed by black frames
During a scenecut, the transition from black frames to a different sequence
gives a high QP value. Reducing tune complexity factor for the scene
change in ABR reduces QP.
diff -r 39b35ea86283 -r ec5de1f484fc source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Tue Mar 26 10:31:41 2019 +0530
+++ b/source/encoder/ratecontrol.cpp Sun Mar 17 15:29:45 2019 +0530
@@ -2113,6 +2113,9 @@
if (underflow < epsilon && !isFrameDone)
{
init(*m_curSlice->m_sps);
+ // Reduce tune complexity factor for scenes that follow blank frames
+ double tuneCplxFactor = (m_ncu > 3600 && m_param->rc.cuTree && !m_param->rc.hevcAq) ? 2.5 : m_param->rc.hevcAq ? 1.5 : m_isGrainEnabled ? 1.9 : 1.0;
+ m_cplxrSum /= tuneCplxFactor;
m_shortTermCplxSum = rce->lastSatd / (CLIP_DURATION(m_frameDuration) / BASE_FRAME_DURATION);
m_shortTermCplxCount = 1;
m_isAbrReset = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190521/f1e3db0e/attachment.bin>
More information about the x265-devel
mailing list