[x265] [PATCH] Reduce QP for the scene changes that is followed by black frames
pooja at multicorewareinc.com
pooja at multicorewareinc.com
Mon Aug 19 07:04:55 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 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190819/95039871/attachment.bin>
More information about the x265-devel
mailing list