[x265-commits] [x265] uncrustify: another brace-style tweak

Steve Borho steve at borho.org
Thu Oct 17 09:56:10 CEST 2013


details:   http://hg.videolan.org/x265/rev/ebec58e22380
branches:  
changeset: 4508:ebec58e22380
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 16 22:40:09 2013 -0500
description:
uncrustify: another brace-style tweak
Subject: [x265] intra: add parens to macros to fix auto-alignment

details:   http://hg.videolan.org/x265/rev/d05787e07b21
branches:  
changeset: 4509:d05787e07b21
user:      Steve Borho <steve at borho.org>
date:      Thu Oct 17 00:06:06 2013 -0500
description:
intra: add parens to macros to fix auto-alignment
Subject: [x265] slicetype: fix pre-calculation of slice cost for ABR

details:   http://hg.videolan.org/x265/rev/ce1116e9def7
branches:  
changeset: 4510:ce1116e9def7
user:      Steve Borho <steve at borho.org>
date:      Thu Oct 17 02:54:47 2013 -0500
description:
slicetype: fix pre-calculation of slice cost for ABR
Subject: [x265] intra: remove dead tables, fix comment typos, and other white-space issues

details:   http://hg.videolan.org/x265/rev/2fbeab18f182
branches:  
changeset: 4511:2fbeab18f182
user:      Steve Borho <steve at borho.org>
date:      Thu Oct 17 02:55:32 2013 -0500
description:
intra: remove dead tables, fix comment typos, and other white-space issues

diffstat:

 doc/uncrustify/codingstyle.cfg                     |    2 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp |    1 +
 source/Lib/TLibCommon/TComTrQuant.cpp              |    2 +-
 source/common/vec/intra-sse3.cpp                   |  218 +++++---------------
 source/encoder/slicetype.cpp                       |    4 +
 5 files changed, 69 insertions(+), 158 deletions(-)

diffs (truncated from 635 to 300 lines):

diff -r 1d6b3626f1b3 -r 2fbeab18f182 doc/uncrustify/codingstyle.cfg
--- a/doc/uncrustify/codingstyle.cfg	Wed Oct 16 20:38:44 2013 -0500
+++ b/doc/uncrustify/codingstyle.cfg	Thu Oct 17 02:55:32 2013 -0500
@@ -113,7 +113,7 @@ nl_case_colon_brace=add
 nl_class_brace=add
 nl_class_init_args=ignore
 nl_class_leave_one_liners=true
-nl_collapse_empty_body=true
+nl_collapse_empty_body=false
 nl_create_for_one_liner=false
 nl_create_if_one_liner=false
 nl_create_while_one_liner=false
diff -r 1d6b3626f1b3 -r 2fbeab18f182 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Wed Oct 16 20:38:44 2013 -0500
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Thu Oct 17 02:55:32 2013 -0500
@@ -516,6 +516,7 @@ void TComSampleAdaptiveOffset::createPic
 void TComSampleAdaptiveOffset::destroyPicSaoInfo()
 {
 }
+
 /** sample adaptive offset process for one LCU crossing LCU boundary
  * \param   addr, iSaoType, yCbCr
  */
diff -r 1d6b3626f1b3 -r 2fbeab18f182 source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Wed Oct 16 20:38:44 2013 -0500
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Thu Oct 17 02:55:32 2013 -0500
@@ -1257,7 +1257,7 @@ inline int TComTrQuant::xGetICRate(UInt 
             absLevel = symbol - maxVlc;
             int egs = 1;
             for (UInt max = 2; absLevel >= max; max <<= 1, egs += 2)
-            {}
+                ;
 
             rate   += egs << 15;
             symbol = std::min<UInt>(symbol, (maxVlc + 1));
diff -r 1d6b3626f1b3 -r 2fbeab18f182 source/common/vec/intra-sse3.cpp
--- a/source/common/vec/intra-sse3.cpp	Wed Oct 16 20:38:44 2013 -0500
+++ b/source/common/vec/intra-sse3.cpp	Thu Oct 17 02:55:32 2013 -0500
@@ -39,7 +39,7 @@ using namespace x265;
 
 extern unsigned char IntraFilterType[][35];
 
-#define PRED_INTRA_ANGLE_4_START \
+#define PRED_INTRA_ANGLE_4_START() \
     __m128i row11, row12, row21, row22, row31, row32, row41, row42; \
     __m128i tmp16_1, tmp16_2, tmp2, deltaFract; \
     __m128i deltaPos = _mm_set1_epi16(0); \
@@ -48,7 +48,7 @@ extern unsigned char IntraFilterType[][3
     __m128i thirty2  = _mm_set1_epi16(32); \
     bool modeHor     = (dirMode < 18);
 
-#define PRED_INTRA_ANGLE_4_END \
+#define PRED_INTRA_ANGLE_4_END() \
     deltaFract = _mm_and_si128(deltaPos, thirty1); \
     __m128i mullo = _mm_mullo_epi16(row11, _mm_sub_epi16(thirty2, deltaFract)); \
     __m128i sum = _mm_add_epi16(_mm_set1_epi16(16), _mm_mullo_epi16(deltaFract, row12)); \
@@ -100,15 +100,15 @@ extern unsigned char IntraFilterType[][3
         *(uint32_t*)(dst + (3 * dstStride)) = _mm_cvtsi128_si32(_mm_packus_epi16(row41, row41)); \
     }
 
-#define PRED_INTRA_ANG8_START   \
-    /* Map the mode index to main prediction direction and angle*/    \
+#define PRED_INTRA_ANG8_START() \
+    /* Map the mode index to main prediction direction and angle*/ \
     bool modeHor       = (dirMode < 18);    \
     bool modeVer       = !modeHor;  \
-    int intraPredAngle = modeVer ? (int)dirMode - VER_IDX : modeHor ? -((int)dirMode - HOR_IDX) : 0;    \
+    int intraPredAngle = modeVer ? (int)dirMode - VER_IDX : modeHor ? -((int)dirMode - HOR_IDX) : 0; \
     int absAng         = abs(intraPredAngle);   \
     int signAng        = intraPredAngle < 0 ? -1 : 1;   \
     /* Set bitshifts and scale the angle parameter to block size*/  \
-    int angTable[9]    = { 0,    2,    5,   9,  13,  17,  21,  26,  32 };   \
+    int angTable[9]    = { 0,    2,    5,   9,  13,  17,  21,  26,  32 }; \
     absAng             = angTable[absAng];  \
     intraPredAngle     = signAng * absAng;  \
     if (modeHor)         /* Near horizontal modes*/   \
@@ -121,7 +121,7 @@ extern unsigned char IntraFilterType[][3
         v_deltaPos = 0; \
         v_ipAngle = intraPredAngle; \
 
-#define PRED_INTRA_ANG8_MIDDLE   \
+#define PRED_INTRA_ANG8_MIDDLE()  \
     /* Flip the block */    \
     tmp16_1 = blend16uc<0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23>(row1, row2);    \
     tmp16_2 = blend16uc<8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31>(row1, row2);  \
@@ -1228,7 +1228,7 @@ void xPredIntraAng4x4(pixel* dst, int ds
     pixel* refMain;
     pixel* refSide;
 
-    // Initialise the Main and Left reference array.
+    // Initialize the Main and Left reference array.
     if (intraPredAngle < 0)
     {
         refMain = (modeVer ? refAbove : refLeft);     // + (blkSize - 1);
@@ -1249,7 +1249,7 @@ void xPredIntraAng4x4(pixel* dst, int ds
     }
 
     // bfilter will always be true for blocksize 4
-    if (intraPredAngle == 0)  // Exactly hotizontal/vertical angles
+    if (intraPredAngle == 0)  // Exactly horizontal/vertical angles
     {
         if (modeHor)
         {
@@ -1414,7 +1414,7 @@ void PredIntraAng4_32(pixel* dst, int ds
 
 void PredIntraAng4_26(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1448,12 +1448,12 @@ void PredIntraAng4_26(pixel* dst, int ds
 
     deltaPos = ipAngle = _mm_set1_epi16(26);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_21(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1483,12 +1483,12 @@ void PredIntraAng4_21(pixel* dst, int ds
 
     deltaPos = ipAngle = _mm_set1_epi16(21);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_17(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1518,12 +1518,12 @@ void PredIntraAng4_17(pixel* dst, int ds
 
     deltaPos = ipAngle = _mm_set1_epi16(17);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_13(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1549,12 +1549,12 @@ void PredIntraAng4_13(pixel* dst, int ds
 
     deltaPos = ipAngle = _mm_set1_epi16(13);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_9(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1579,12 +1579,12 @@ void PredIntraAng4_9(pixel* dst, int dst
 
     deltaPos = ipAngle = _mm_set1_epi16(9);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1604,12 +1604,12 @@ void PredIntraAng4_5(pixel* dst, int dst
 
     deltaPos = ipAngle = _mm_set1_epi16(5);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 1));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1629,12 +1629,12 @@ void PredIntraAng4_2(pixel* dst, int dst
 
     deltaPos = ipAngle = _mm_set1_epi16(2);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain));
     row11   =_mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1654,12 +1654,12 @@ void PredIntraAng4_m_2(pixel* dst, int d
 
     deltaPos = ipAngle = _mm_set1_epi16(-2);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain));
     row11 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1679,12 +1679,12 @@ void PredIntraAng4_m_5(pixel* dst, int d
 
     deltaPos = ipAngle = _mm_set1_epi16(-5);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_9(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 1));
     row41 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1709,14 +1709,14 @@ void PredIntraAng4_m_9(pixel* dst, int d
 
     deltaPos = ipAngle = _mm_set1_epi16(-9);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_13(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
-
-        tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 1));
+    PRED_INTRA_ANGLE_4_START();
+
+    tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 1));
 
     row41 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
 
@@ -1740,12 +1740,12 @@ void PredIntraAng4_m_13(pixel* dst, int 
 
     deltaPos = ipAngle = _mm_set1_epi16(-13);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_17(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 2));
     row41 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1775,12 +1775,12 @@ void PredIntraAng4_m_17(pixel* dst, int 
 
     deltaPos = ipAngle = _mm_set1_epi16(-17);
 
-    PRED_INTRA_ANGLE_4_END
+    PRED_INTRA_ANGLE_4_END();
 }
 
 void PredIntraAng4_m_21(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANGLE_4_START
+    PRED_INTRA_ANGLE_4_START();
 
     tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 2));
     row41 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
@@ -1810,12 +1810,12 @@ void PredIntraAng4_m_21(pixel* dst, int 
 
     deltaPos = ipAngle = _mm_set1_epi16(-21);
 


More information about the x265-commits mailing list