[x265] [X265][PATCH] Fix: QP offset in scenecut-aware-qp with bi-directional window

Niranjan Bala niranjan at multicorewareinc.com
Fri Dec 11 15:59:56 CET 2020


>From f36f211dd1ec4c3d580416e04c879b695fd3501b Mon Sep 17 00:00:00 2001
From: Niranjan <niranjan at multicorewareinc.com>
Date: Fri, 11 Dec 2020 20:22:53 +0530
Subject: [PATCH] Fix: QP offset in scenecut-aware-qp with bi-directional
 window

---
 source/encoder/ratecontrol.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp
index 554acfe38..2b7ac9423 100644
--- a/source/encoder/ratecontrol.cpp
+++ b/source/encoder/ratecontrol.cpp
@@ -1860,7 +1860,7 @@ double RateControl::rateEstimateQscale(Frame*
curFrame, RateControlEntry *rce)
             double lqmax = m_lmax[m_sliceType];
             if (m_param->bEnableSceneCutAwareQp == FORWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                 qScale = forwardMasking(curFrame, qScale);
-            else if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
+            if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                 qScale = backwardMasking(curFrame, qScale);
             qScale = x265_clip3(lqmin, lqmax, qScale);
             q = x265_qScale2qp(qScale);
@@ -1987,7 +1987,7 @@ double RateControl::rateEstimateQscale(Frame*
curFrame, RateControlEntry *rce)

                 if (m_param->bEnableSceneCutAwareQp == FORWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                     q = forwardMasking(curFrame, q);
-                else if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
+                if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                     q = backwardMasking(curFrame, q);

                 q = x265_clip3(qmin, qmax, q);
@@ -2156,7 +2156,7 @@ double RateControl::rateEstimateQscale(Frame*
curFrame, RateControlEntry *rce)

                 if (m_param->bEnableSceneCutAwareQp == FORWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                     q = forwardMasking(curFrame, q);
-                else if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
+                if (m_param->bEnableSceneCutAwareQp == BACKWARD ||
m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)
                     q = backwardMasking(curFrame, q);

                 q = x265_clip3(qmin, qmax, q);
-- 
2.18.0.windows.1


-- 

Thanks & Regards
*Niranjan Kumar B*
Video Codec Engineer
Media & AI Analytics
+91 958 511 1449
<https://multicorewareinc.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201211/1d4c7cb8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.diff
Type: application/octet-stream
Size: 2505 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201211/1d4c7cb8/attachment.obj>


More information about the x265-devel mailing list