<div dir="ltr"><br><div id="__tbSetup"></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 2:10 PM,  <span dir="ltr"><<a href="mailto:sumalatha@multicorewareinc.com" target="_blank">sumalatha@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Sumalatha Polureddy<br>
# Date 1389343212 -19800<br>
# Node ID 104fb077a9813f0f3bb94c370e134d0d6d180809<br>
# Parent  80b63c3ee144e6edbafbbe281ad3d1d8505be1f6<br>
rd Level: improve bitrate and psnr in rd level 2<br>
<br>
a. Always allow intra mode for mode decision<br>
b. increase more merge skips at each depth<br>
<br>
Results are below<br>
CLI: input.y4m -o bitstream.hevc -r recon.y4m --preset veryfast --rd 2<br>
<br>
rd3 / previous rd2 / latest rd2<br>
BasketballDrive_1920x1080_50<br>
fps: 4.24/5.615.7<br>
psnr: 33.67/33.95/33.677<br>
birate: 2211/2272/2188<br>
<br>
Kimono1_1920x1080_24<br>
fps: 5.45/6.11/6.1<br>
psnr: 35.004/35.144/34.835<br>
birate: 713/740/692<br>
<br>
FourPeople_1280x720_60<br>
fps: 7.99/10.86/11.46<br>
psnr: 34.93/35.17/34.931<br>
birate: 320/341/341<br>
<br>
big_buck_bunny_360p24<br>
fps: 38.98/49.32/44.46<br>
psnr: 33.21/33.36/33.167<br>
birate: 56/60/56<br>
<br>
Johnny_1280x720_60<br>
fps: 8.21/9.58/11.32<br>
psnr: 36.74/37.238/37.01<br>
birate: 203/204/206<br>
<br>
diff -r 80b63c3ee144 -r 104fb077a981 source/encoder/compress.cpp<br>
--- a/source/encoder/compress.cpp       Thu Jan 09 12:50:16 2014 +0550<br>
+++ b/source/encoder/compress.cpp       Fri Jan 10 14:10:12 2014 +0530<br>
@@ -517,12 +517,6 @@<br>
                         bdoIntra = (outBestCU->getCbf(0, TEXT_LUMA) ||  outBestCU->getCbf(0, TEXT_CHROMA_U) ||<br>
                                     outBestCU->getCbf(0, TEXT_CHROMA_V));<br>
                     }<br>
-                    else<br>
-                    {<br>
-                        uint32_t threshold[4] = { 20000, 6000, 1600, 500 };<br>
-                        int index = 4 - g_convertToBit[outBestCU->getWidth(0)];<br>
-                        bdoIntra = (outBestCU->m_totalDistortion > threshold[index]);<br>
-                    }<br></blockquote><div><br></div><div>This change is valid. <br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                     if (bdoIntra)<br>
                     {<br>
                         xComputeCostIntraInInter(m_intraInInterCU[depth], SIZE_2Nx2N);<br>
@@ -587,8 +581,12 @@<br>
                         }<br>
                         m_search->encodeResAndCalcRdInterCU(m_mergeCU[depth], m_origYuv[depth], bestMergePred, m_tmpResiYuv[depth],<br>
                                                             m_bestResiYuv[depth], m_tmpRecoYuv[depth], true);<br>
-<br>
-                        if (m_mergeCU[depth]->m_totalCost < outBestCU->m_totalCost)<br>
+                        double lambda[4];<br>
+                        lambda[0] = 1.06;<br>
+                        lambda[1] = 1.5;<br>
+                        lambda[2] = 1.1;<br>
+                        lambda[3] = 1.0;<br></blockquote><div><br></div><div>This part looks like an artificial way of forcing more skips. I'd like to understand why merge-skips have reduced so much in the first place in rd 2, and then fix the root cause. <br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                        if (m_mergeCU[depth]->m_totalCost < lambda[depth] * outBestCU->m_totalCost)<br>
                         {<br>
                             outBestCU = m_mergeCU[depth];<br>
                             tempYuv = m_bestRecoYuv[depth];<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>