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