[x265] [PATCH] TEncSearch, TEncSlice, TComPrediction: Uncrustified

shazeb at multicorewareinc.com shazeb at multicorewareinc.com
Thu Aug 1 14:20:59 CEST 2013


# HG changeset patch
# User Shazeb N Khan
# Date 1375359627 -19800
#      Thu Aug 01 17:50:27 2013 +0530
# Node ID fe9f0b888a501caae7f51d8cc3349db563ddab7f
# Parent  129570f2b79a35685a8f992a5109852b9656ddfd
TEncSearch, TEncSlice, TComPrediction: Uncrustified

diff -r 129570f2b79a -r fe9f0b888a50 source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Thu Aug 01 17:21:23 2013 +0530
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Thu Aug 01 17:50:27 2013 +0530
@@ -201,6 +201,7 @@
     Pel refAbv[3 * MAX_CU_SIZE];
     Pel refLft[3 * MAX_CU_SIZE];
     int limit = (dirMode <= 25 && dirMode >= 11) ? (width + 1 + 1) : (2 * width + 1);
+
     memcpy(refAbv + width - 1, src, (limit) * sizeof(Pel));
     for (int k = 0; k < limit; k++)
     {
@@ -331,6 +332,7 @@
 Void TComPrediction::xPredInterUni(TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList picList, TComYuv* outPredYuv)
 {
     Int refIdx = cu->getCUMvField(picList)->getRefIdx(partAddr);
+
     assert(refIdx >= 0);
 
     MV mv = cu->getCUMvField(picList)->getMv(partAddr);
@@ -344,6 +346,7 @@
 Void TComPrediction::xPredInterUni(TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList picList, TShortYUV* outPredYuv)
 {
     Int refIdx = cu->getCUMvField(picList)->getRefIdx(partAddr);
+
     assert(refIdx >= 0);
 
     MV mv = cu->getCUMvField(picList)->getMv(partAddr);
@@ -405,7 +408,7 @@
     {
         TShortYUV* pcMbYuv;
 
-        RefPicList picList = ( REF_PIC_LIST_0);
+        RefPicList picList = (REF_PIC_LIST_0);
         refIdx[0] = cu->getCUMvField(picList)->getRefIdx(partAddr);
 
         if (!(refIdx[0] < 0))
@@ -424,9 +427,7 @@
             xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
 
             xWeightedPredictionUni(cu, &m_predShortYuv[0], partAddr, width, height, REF_PIC_LIST_0, outPredYuv);
-            
         }
-
     }
     else
     {
diff -r 129570f2b79a -r fe9f0b888a50 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Aug 01 17:21:23 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Aug 01 17:50:27 2013 +0530
@@ -237,8 +237,8 @@
     }
 
     // distortion
-    UInt cost = m_distParam.distFunc(&m_distParam) + 
-                m_bc.mvcost(MV(searchX, searchY) << m_mvCostScale);
+    UInt cost = m_distParam.distFunc(&m_distParam) +
+        m_bc.mvcost(MV(searchX, searchY) << m_mvCostScale);
 
     if (cost < data.bcost)
     {
@@ -691,9 +691,12 @@
     TCoeff* coeff = 0;
     switch (ttype)
     {
-    case TEXT_LUMA:     coeff = m_qtTempCoeffY[qtLayer];  break;
-    case TEXT_CHROMA_U: coeff = m_qtTempCoeffCb[qtLayer]; break;
-    case TEXT_CHROMA_V: coeff = m_qtTempCoeffCr[qtLayer]; break;
+    case TEXT_LUMA:     coeff = m_qtTempCoeffY[qtLayer];
+        break;
+    case TEXT_CHROMA_U: coeff = m_qtTempCoeffCb[qtLayer];
+        break;
+    case TEXT_CHROMA_V: coeff = m_qtTempCoeffCr[qtLayer];
+        break;
     default: assert(0);
     }
 
@@ -1440,6 +1443,7 @@
 
     Bool bSkipChroma  = false;
     Bool bChromaSame  = false;
+
     if (!bLumaOnly && trSizeLog2 == 2)
     {
         assert(trDepth > 0);
@@ -1486,6 +1490,7 @@
 
     Bool bSkipChroma = false;
     Bool bChromaSame = false;
+
     if (!bLumaOnly && trSizeLog2 == 2)
     {
         assert(trDepth > 0);
@@ -2046,7 +2051,8 @@
                     Pel *cmp_buf = (modeHor ? buf_trans : buf_scale);
                     modeCosts[mode] = 4 * x265::primitives.sa8d[3]((pixel*)cmp_buf, 32, (pixel*)&tmp[(mode - 2) * (32 * 32)], 32);
                 }
-#else
+
+#else // if 1
                 // 1
                 primitives.intra_pred_dc(pAbove0 + 1, pLeft0 + 1, pred, stride, width, false);
                 modeCosts[DC_IDX] = sa8d(fenc, stride, pred, stride);
@@ -2060,7 +2066,8 @@
                     predIntraLumaAng(mode, pred, stride, width);
                     modeCosts[mode] = sa8d(fenc, stride, pred, stride);
                 }
-#endif
+
+#endif // if 1
             }
 
             // Find N least cost modes. N = numModesForFullRD
@@ -3273,7 +3280,7 @@
     // prediction pattern
     MotionReference* ref = cu->getSlice()->m_mref[picList][refIfx];
     xPredInterLumaBlk(cu, ref, partAddr, &mvCand, sizex, sizey, templateCand);
-    
+
     // calc distortion
     UInt cost = m_me.bufSAD(templateCand->getLumaAddr(partAddr), templateCand->getStride());
     x265_emms();
diff -r 129570f2b79a -r fe9f0b888a50 source/Lib/TLibEncoder/TEncSlice.cpp
--- a/source/Lib/TLibEncoder/TEncSlice.cpp	Thu Aug 01 17:21:23 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSlice.cpp	Thu Aug 01 17:50:27 2013 +0530
@@ -392,7 +392,7 @@
     }
 
     Bool wpexplicit = (slice->getSliceType() == P_SLICE && slice->getPPS()->getUseWP()) ||
-                        (slice->getSliceType() == B_SLICE && slice->getPPS()->getWPBiPred());
+        (slice->getSliceType() == B_SLICE && slice->getPPS()->getWPBiPred());
 
     if (wpexplicit)
     {
@@ -408,7 +408,7 @@
 
     Int numPredDir = slice->isInterP() ? 1 : 2;
 
-    if((slice->getSliceType() == P_SLICE && slice->getPPS()->getUseWP()))
+    if ((slice->getSliceType() == P_SLICE && slice->getPPS()->getUseWP()))
     {
         for (Int refList = 0; refList < numPredDir; refList++)
         {
@@ -417,7 +417,7 @@
             {
                 //Generate weighted motionreference
                 wpScalingParam *w = &(slice->m_weightPredTable[picList][refIdxTemp][0]);
-                slice->m_mref[picList][refIdxTemp] = slice->getRefPic(picList, refIdxTemp)->getPicYuvRec()->generateMotionReference(x265::ThreadPool::getThreadPool(), w); 
+                slice->m_mref[picList][refIdxTemp] = slice->getRefPic(picList, refIdxTemp)->getPicYuvRec()->generateMotionReference(x265::ThreadPool::getThreadPool(), w);
             }
         }
     }
@@ -428,7 +428,7 @@
             RefPicList  picList = (refList ? REF_PIC_LIST_1 : REF_PIC_LIST_0);
             for (Int refIdxTemp = 0; refIdxTemp < slice->getNumRefIdx(picList); refIdxTemp++)
             {
-               slice->m_mref[picList][refIdxTemp] = slice->getRefPic(picList, refIdxTemp)->getPicYuvRec()->generateMotionReference(x265::ThreadPool::getThreadPool(), NULL); 
+                slice->m_mref[picList][refIdxTemp] = slice->getRefPic(picList, refIdxTemp)->getPicYuvRec()->generateMotionReference(x265::ThreadPool::getThreadPool(), NULL);
             }
         }
     }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 6468 bytes
Desc: not available
URL: <http://mailman.videolan.org/private/x265-devel/attachments/20130801/ae54967a/attachment.bin>


More information about the x265-devel mailing list