<div dir="ltr">Pushed to Release_3.5</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 29, 2020 at 10:58 AM Niranjan Bala <<a href="mailto:niranjan@multicorewareinc.com">niranjan@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>From 055ebe61d9816323ebe8b1c5187c48c4185bbaaf Mon Sep 17 00:00:00 2001<br>From: Niranjan <<a href="mailto:niranjan@multicorewareinc.com" target="_blank">niranjan@multicorewareinc.com</a>><br>Date: Mon, 21 Dec 2020 23:40:42 +0530<br>Subject: [PATCH] Fix: Build warnings in Windows + cleanup<br><br>---<br> doc/reST/cli.rst                   |  2 ++<br> source/common/param.cpp            |  2 ++<br> source/encoder/encoder.cpp         |  4 ++--<br> source/encoder/ratecontrol.cpp     | 14 ++++++--------<br> source/test/rate-control-tests.txt |  1 +<br> source/x265cli.cpp                 |  2 +-<br> 6 files changed, 14 insertions(+), 11 deletions(-)<br><br>diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst<br>index 7579e9b2a..29da59a9d 100755<br>--- a/doc/reST/cli.rst<br>+++ b/doc/reST/cli.rst<br>@@ -2047,6 +2047,8 @@ Quality, rate control and rate distortion options<br>      |                 | **Range of values:** 0 to 10                                  |<br>         +-----------------+---------------------------------------------------------------+<br> <br>+      **CLI ONLY**<br>+<br> .. option:: --vbv-live-multi-pass, --no-vbv-live-multi-pass<br> <br>    It enables the Qp tuning at frame level based on real time VBV Buffer fullness<br>diff --git a/source/common/param.cpp b/source/common/param.cpp<br>index 7a9be18c3..8a6a974f1 100755<br>--- a/source/common/param.cpp<br>+++ b/source/common/param.cpp<br>@@ -1831,6 +1831,8 @@ int x265_check_params(x265_param* param)<br>         }<br>         else<br>         {<br>+            CHECK(param->bEnableSceneCutAwareQp < 0 || param->bEnableSceneCutAwareQp > 3,<br>+            "Invalid masking direction. Value must be between 0 and 3(inclusive)");<br>             CHECK(param->fwdScenecutWindow < 0 || param->fwdScenecutWindow > 1000,<br>             "Invalid forward scenecut Window duration. Value must be between 0 and 1000(inclusive)");<br>             CHECK(param->fwdRefQpDelta < 0 || param->fwdRefQpDelta > 10,<br>diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>index 18c3b6788..e20e46869 100644<br>--- a/source/encoder/encoder.cpp<br>+++ b/source/encoder/encoder.cpp<br>@@ -1810,7 +1810,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)<br>                 inFrame->m_lowres.m_bIsHardScenecut = isHardSC;<br>         }<br> <br>-        if ((m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL || m_param->bEnableSceneCutAwareQp == BACKWARD) && m_param->rc.bStatRead)<br>+        if ((m_param->bEnableSceneCutAwareQp & BACKWARD) && m_param->rc.bStatRead)<br>         {<br>             RateControlEntry * rcEntry = NULL;<br>             rcEntry = &(m_rateControl->m_rce2Pass[inFrame->m_poc]);<br>@@ -2242,7 +2242,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture* pic_out)<br>             frameEnc = m_lookahead->getDecidedPicture();<br>         if (frameEnc && !pass && (!m_param->chunkEnd || (m_encodedFrameNum < m_param->chunkEnd)))<br>         {<br>-            if ((m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL || m_param->bEnableSceneCutAwareQp == FORWARD) && m_param->rc.bStatRead)<br>+            if ((m_param->bEnableSceneCutAwareQp & FORWARD) && m_param->rc.bStatRead)<br>             {<br>                 RateControlEntry * rcEntry;<br>                 rcEntry = &(m_rateControl->m_rce2Pass[frameEnc->m_poc]);<br>diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp<br>index 1299f6527..1b46c0148 100644<br>--- a/source/encoder/ratecontrol.cpp<br>+++ b/source/encoder/ratecontrol.cpp<br>@@ -1860,9 +1860,9 @@ double RateControl::rateEstimateQscale(Frame* curFrame, RateControlEntry *rce)<br>         {<br>             double lqmin = m_lmin[m_sliceType];<br>             double lqmax = m_lmax[m_sliceType];<br>-            if (m_param->bEnableSceneCutAwareQp == FORWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+            if (m_param->bEnableSceneCutAwareQp & FORWARD)<br>                 qScale = forwardMasking(curFrame, qScale);<br>-            if (m_param->bEnableSceneCutAwareQp == BACKWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+            if (m_param->bEnableSceneCutAwareQp & BACKWARD)<br>                 qScale = backwardMasking(curFrame, qScale);<br>             qScale = x265_clip3(lqmin, lqmax, qScale);<br>             q = x265_qScale2qp(qScale);<br>@@ -1987,9 +1987,9 @@ double RateControl::rateEstimateQscale(Frame* curFrame, RateControlEntry *rce)<br>                 double qmin = m_lmin[m_sliceType];<br>                 double qmax = m_lmax[m_sliceType];<br> <br>-                if (m_param->bEnableSceneCutAwareQp == FORWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+                if (m_param->bEnableSceneCutAwareQp & FORWARD)<br>                     q = forwardMasking(curFrame, q);<br>-                if (m_param->bEnableSceneCutAwareQp == BACKWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+                if (m_param->bEnableSceneCutAwareQp & BACKWARD)<br>                     q = backwardMasking(curFrame, q);<br> <br>                 q = x265_clip3(qmin, qmax, q);<br>@@ -2156,9 +2156,9 @@ double RateControl::rateEstimateQscale(Frame* curFrame, RateControlEntry *rce)<br>                 double qmin = m_lmin[m_sliceType];<br>                 double qmax = m_lmax[m_sliceType];<br> <br>-                if (m_param->bEnableSceneCutAwareQp == FORWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+                if (m_param->bEnableSceneCutAwareQp & FORWARD)<br>                     q = forwardMasking(curFrame, q);<br>-                if (m_param->bEnableSceneCutAwareQp == BACKWARD || m_param->bEnableSceneCutAwareQp == BI_DIRECTIONAL)<br>+                if (m_param->bEnableSceneCutAwareQp & BACKWARD)<br>                     q = backwardMasking(curFrame, q);<br> <br>                 q = x265_clip3(qmin, qmax, q);<br>@@ -3192,8 +3192,6 @@ double RateControl::forwardMasking(Frame* curFrame, double q)<br>     int lastIFrame = m_top->m_rateControl->m_lastScenecutAwareIFrame;<br>     double fwdRefQpDelta = double(m_param->fwdRefQpDelta);<br>     double fwdNonRefQpDelta = double(m_param->fwdNonRefQpDelta);<br>-    double bwdRefQpDelta = double(m_param->bwdRefQpDelta);<br>-    double bwdNonRefQpDelta = double(m_param->bwdNonRefQpDelta);<br>     double sliceTypeDelta = SLICE_TYPE_DELTA * fwdRefQpDelta;<br>     double window2Delta = WINDOW2_DELTA * fwdRefQpDelta;<br>     double window3Delta = WINDOW3_DELTA * fwdRefQpDelta;<br>diff --git a/source/test/rate-control-tests.txt b/source/test/rate-control-tests.txt<br>index 6c8f10cb6..e3dd2507d 100644<br>--- a/source/test/rate-control-tests.txt<br>+++ b/source/test/rate-control-tests.txt<br>@@ -46,6 +46,7 @@ sita_1920x1080_30.yuv, --preset ultrafast --crf 20 --no-cutree --keyint 50 --min<br> sita_1920x1080_30.yuv, --preset medium --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 1 --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers --multi-pass-opt-rps:: --preset medium --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 2 --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers --multi-pass-opt-rps<br> sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 1<br> sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 2 --scenecut-aware-qp 3 --masking-strength 300,-1,7,100,2,3<br>+sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 2 --masking-strength 100,-1,-1<br> <br> # multi-pass rate control and analysis<br> ducks_take_off_1080p50.y4m,--bitrate 6000 --pass 1  --multi-pass-opt-analysis  --hash 1 --ssim --psnr:: --bitrate 6000 --pass 2  --multi-pass-opt-analysis  --hash 1 --ssim --psnr<br>diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>index 0c0d27ff5..41d73e174 100755<br>--- a/source/x265cli.cpp<br>+++ b/source/x265cli.cpp<br>@@ -181,7 +181,7 @@ namespace X265_NS {<br>         H1("                                 1 - Forward masking\n");<br>         H1("                                 2 - Backward masking\n");<br>         H1("                                 3 - Bidirectional masking\n");<br>-        H1("   --masking-strength <string>   Comma separated values which specifies the duration and offset for the QP increment for inter-frames");<br>+        H1("   --masking-strength <string>   Comma separated values which specify the duration and offset for the QP increment for inter-frames when scenecut-aware-qp is enabled.\n");<br>         H0("   --radl <integer>              Number of RADL pictures allowed in front of IDR. Default %d\n", param->radl);<br>         H0("   --intra-refresh               Use Periodic Intra Refresh instead of IDR frames\n");<br>         H0("   --rc-lookahead <integer>      Number of frames for frame-type lookahead (determines encoder latency) Default %d\n", param->lookaheadDepth);<br>-- <br>2.18.0.windows.1<br><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><font color="#0c343d" face="verdana, sans-serif"><br></font></div><div dir="ltr"><font color="#0c343d" face="verdana, sans-serif">Thanks & Regards</font><div><font color="#0c343d" face="verdana, sans-serif"><b>Niranjan Kumar B</b></font></div><div><font size="1" color="#0c343d" face="verdana, sans-serif">Video Codec Engineer </font></div><div><font size="1" color="#0c343d" face="verdana, sans-serif">Media & AI Analytics</font></div><div><font face="trebuchet ms, sans-serif" color="#0c343d">+91 958 511 1449</font></div><div><a href="https://multicorewareinc.com/" style="color:rgb(17,85,204)" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1kc3RJu9M8bnIf6Xa5rUw2d-eEVUsPBE5&revid=0B7tw9XJBmynaemR1VUpQUi9DVytRVW5SVkRwVTFjb1hBMUcwPQ"></a></div></div></div></div></div></div></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="georgia, serif">Regards,</font><div><b><font face="georgia, serif">Aruna Matheswaran,</font></b></div><div><font face="georgia, serif">Video Codec Engineer,</font></div><div><font face="georgia, serif">Media & AI analytics BU,</font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" width="96" height="36" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><br></font></div></div></div></div></div></div></div></div></div>