[x265] [PATCH] nit: whitespace fixes

Pradeep Ramachandran pradeep at multicorewareinc.com
Mon Oct 17 13:23:09 CEST 2016


# HG changeset patch
# User Pradeep Ramachandran <pradeep at multicorewareinc.com>
# Date 1476703343 -19800
#      Mon Oct 17 16:52:23 2016 +0530
# Node ID b826b8eabcb127f98daa892a47b429db41d7a76a
# Parent  304116f4cd41bc4fd610d5b16c6f447a50b8df02
nit: whitespace fixes

diff -r 304116f4cd41 -r b826b8eabcb1 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Oct 17 14:00:05 2016 +0530
+++ b/source/encoder/encoder.cpp	Mon Oct 17 16:52:23 2016 +0530
@@ -874,17 +874,17 @@
                 slice->m_endCUAddr = slice->realEndAddress(m_sps.numCUsInFrame * NUM_4x4_PARTITIONS);
             }
 
-            if( m_param->bOptQpPPS && frameEnc->m_lowres.bKeyframe && m_param->bRepeatHeaders )
+            if (m_param->bOptQpPPS && frameEnc->m_lowres.bKeyframe && m_param->bRepeatHeaders)
             {
-                ScopedLock qpLock( m_sliceQpLock );
-                if( m_iFrameNum > 0 )
+                ScopedLock qpLock(m_sliceQpLock);
+                if (m_iFrameNum > 0)
                 {
                     //Search the least cost
                     int64_t iLeastCost = m_iBitsCostSum[0];
                     int iLeastId = 0;
-                    for( int i = 1; i < QP_MAX_MAX + 1; i++ )
+                    for (int i = 1; i < QP_MAX_MAX + 1; i++)
                     {
-                        if( iLeastCost > m_iBitsCostSum[i] )
+                        if (iLeastCost > m_iBitsCostSum[i])
                         {
                             iLeastId = i;
                             iLeastCost = m_iBitsCostSum[i];
@@ -893,17 +893,13 @@
 
                     /* If last slice Qp is close to (26 + m_iPPSQpMinus26) or outputs is all I-frame video,
                        we don't need to change m_iPPSQpMinus26. */
-                    if( (abs( m_iLastSliceQp - (26 + m_iPPSQpMinus26)) > 1) && (m_iFrameNum > 1) )
-                    {
+                    if ((abs(m_iLastSliceQp - (26 + m_iPPSQpMinus26)) > 1) && (m_iFrameNum > 1))
                         m_iPPSQpMinus26 = (iLeastId + 1) - 26;
-                    }
                     m_iFrameNum = 0;
                 }
 
-                for( int i = 0; i < QP_MAX_MAX + 1; i++ )
-                {
+                for (int i = 0; i < QP_MAX_MAX + 1; i++)
                     m_iBitsCostSum[i] = 0;
-                }
             }
 
             frameEnc->m_encData->m_slice->m_iPPSQpMinus26 = m_iPPSQpMinus26;
diff -r 304116f4cd41 -r b826b8eabcb1 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Mon Oct 17 14:00:05 2016 +0530
+++ b/source/encoder/frameencoder.cpp	Mon Oct 17 16:52:23 2016 +0530
@@ -468,17 +468,15 @@
     /* Clip slice QP to 0-51 spec range before encoding */
     slice->m_sliceQp = x265_clip3(-QP_BD_OFFSET, QP_MAX_SPEC, qp);
 
-    if( m_param->bOptQpPPS && m_param->bRepeatHeaders )
+    if (m_param->bOptQpPPS && m_param->bRepeatHeaders)
     {
-        ScopedLock qpLock( m_top->m_sliceQpLock );
-        for( int i = 0; i < (QP_MAX_MAX + 1); i++ )
+        ScopedLock qpLock(m_top->m_sliceQpLock);
+        for (int i = 0; i < (QP_MAX_MAX + 1); i++)
         {
             int delta = slice->m_sliceQp - (i + 1);
             int codeLength = getBsLength( delta );
-
             m_top->m_iBitsCostSum[i] += codeLength;
         }
-
         m_top->m_iFrameNum++;
         m_top->m_iLastSliceQp = slice->m_sliceQp;
     }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repo.patch
Type: text/x-patch
Size: 3378 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20161017/234efe69/attachment-0001.bin>


More information about the x265-devel mailing list