[2019.3.17]x265更新日志之场景切换后降低后边帧的Qp

http://hg.videolan.org/x265/rev/d178be3b2b67

连续多个b帧cost相同,判断为blank帧,那接下来的帧也成为场景切换帧,在checkAndResetABR()函数内,满足条件的情况下选择缩放m_cplxrSum

官方的解释是为了降低blank帧后面帧的qp,提升质量

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.

--- a/source/encoder/ratecontrol.cpp	Fri Aug 23 11:33:05 2019 +0530
+++ b/source/encoder/ratecontrol.cpp	Sun Mar 17 15:29:45 2019 +0530
@@ -2116,6 +2116,9 @@ void RateControl::checkAndResetABR(RateC
             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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值