[x265] [PATCH] ratecontrol.cpp: nits - fix for coding style

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Nov 7 07:33:42 CET 2018


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1541569020 -19800
#      Wed Nov 07 11:07:00 2018 +0530
# Branch stable
# Node ID 5177401a9d4c8b577c4502538037e1cd0d2fae68
# Parent  26b4debfab1af7d5e080902b700d6124fafa8ebd
ratecontrol.cpp: nits - fix for coding style

diff -r 26b4debfab1a -r 5177401a9d4c source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Thu Nov 01 18:47:40 2018 +0530
+++ b/source/encoder/ratecontrol.cpp	Wed Nov 07 11:07:00 2018 +0530
@@ -381,9 +381,9 @@
 
     m_isGrainEnabled = false;
     if(m_param->rc.bEnableGrain) // tune for grainy content OR equal p-b frame sizes
-    m_isGrainEnabled = true;
+        m_isGrainEnabled = true;
     for (int i = 0; i < 3; i++)
-    m_lastQScaleFor[i] = x265_qp2qScale(m_param->rc.rateControlMode == X265_RC_CRF ? CRF_INIT_QP : ABR_INIT_QP_MIN);
+        m_lastQScaleFor[i] = x265_qp2qScale(m_param->rc.rateControlMode == X265_RC_CRF ? CRF_INIT_QP : ABR_INIT_QP_MIN);
     m_avgPFrameQp = 0 ;
 
     /* 720p videos seem to be a good cutoff for cplxrSum */
@@ -1253,9 +1253,7 @@
         m_isSceneTransition = false;
 
     if (rce->encodeOrder < m_lastPredictorReset + m_param->frameNumThreads)
-    {
         rce->rowPreds[0][0].count = 0;
-    }
 
     rce->bLastMiniGopBFrame = curFrame->m_lowres.bLastMiniGopBFrame;
     rce->bufferRate = m_bufferRate;
@@ -1458,12 +1456,8 @@
         if (!rce->keptAsRef)
             q *= fabs(m_param->rc.pbFactor);
     }
-    else if (rce->sliceType == P_SLICE
-             && m_lastNonBPictType == P_SLICE
-             && rce->coeffBits == 0)
-    {
+    else if (rce->sliceType == P_SLICE && m_lastNonBPictType == P_SLICE && rce->coeffBits == 0)
         q = lastPqScale;
-    }
 
     /* last qscale / qdiff stuff */
     if (m_lastNonBPictType == rce->sliceType &&
@@ -1664,9 +1658,7 @@
                 m_movingAvgSum += m_satdCostWindow[addPos];
             }
             else if (m_sliderPos == s_slidingWindowFrames)
-            {
                 m_movingAvgSum += m_satdCostWindow[addPos];
-            }
             else if (m_sliderPos > 0)
             {
                 m_movingAvgSum += m_satdCostWindow[addPos];
@@ -1964,9 +1956,7 @@
                 }
             }
             else if (m_qCompress != 1 && m_param->rc.rateControlMode == X265_RC_CRF)
-            {
                 q = x265_qp2qScale(CRF_INIT_QP) / fabs(m_param->rc.ipFactor);
-            }
             else if (m_framesDone == 0 && !m_isVbv && m_param->rc.rateControlMode == X265_RC_ABR)
             {
                 /* for ABR alone, clip the first I frame qp */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 2620 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20181107/076e2306/attachment.bin>


More information about the x265-devel mailing list