# HG changeset patch
# User Pooja Venkatesan <[email protected]>
# Date 1552816785 -19800
# Sun Mar 17 15:29:45 2019 +0530
# Node ID f0b531ade27567f539d80e2592de146475f68080
# Parent de920e0a31831f52599f3937c3ee6945e88ed851
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 de920e0a3183 -r f0b531ade275 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Tue Jul 23 17:03:51 2019 +0530
+++ b/source/encoder/ratecontrol.cpp Sun Mar 17 15:29:45 2019 +0530
@@ -2116,6 +2116,9 @@
if ((underflow < epsilon || rce->isFadeEnd) && !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 f0b531ade27567f539d80e2592de146475f68080
# Parent de920e0a31831f52599f3937c3ee6945e88ed851
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 de920e0a3183 -r f0b531ade275 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Tue Jul 23 17:03:51 2019 +0530
+++ b/source/encoder/ratecontrol.cpp Sun Mar 17 15:29:45 2019 +0530
@@ -2116,6 +2116,9 @@
if ((underflow < epsilon || rce->isFadeEnd) && !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