[x265-commits] [x265] Backed out changeset: 5634d0322161

Steve Borho steve at borho.org
Fri Feb 7 07:34:52 CET 2014


details:   http://hg.videolan.org/x265/rev/53c6acae9b0a
branches:  
changeset: 6049:53c6acae9b0a
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 06 23:54:18 2014 -0600
description:
Backed out changeset: 5634d0322161
Subject: [x265] weightp: avoid MSVC warnings about implicit bool to int casts

details:   http://hg.videolan.org/x265/rev/da1dda5e762a
branches:  
changeset: 6050:da1dda5e762a
user:      Steve Borho <steve at borho.org>
date:      Fri Feb 07 00:24:09 2014 -0600
description:
weightp: avoid MSVC warnings about implicit bool to int casts
Subject: [x265] dct: disable assertion for 10bit builds

details:   http://hg.videolan.org/x265/rev/d2d181f1881a
branches:  
changeset: 6051:d2d181f1881a
user:      Steve Borho <steve at borho.org>
date:      Fri Feb 07 00:32:32 2014 -0600
description:
dct: disable assertion for 10bit builds

The assertion is there to protect 8bpp assembly

diffstat:

 source/common/dct.cpp               |   4 +-
 source/common/vec/intra-ssse3.cpp   |  58 +++++++++++++++++++++++++++++++++++++
 source/encoder/weightPrediction.cpp |   6 ++-
 3 files changed, 65 insertions(+), 3 deletions(-)

diffs (100 lines):

diff -r 5634d0322161 -r d2d181f1881a source/common/dct.cpp
--- a/source/common/dct.cpp	Thu Feb 06 22:35:20 2014 -0600
+++ b/source/common/dct.cpp	Fri Feb 07 00:32:32 2014 -0600
@@ -720,9 +720,11 @@ void idct32_c(int32_t *src, int16_t *dst
 
 void dequant_normal_c(const int32_t* quantCoef, int32_t* coef, int num, int scale, int shift)
 {
-    assert(num <= 32 * 32);
+#if !HIGH_BIT_DEPTH
     // NOTE: maximum of scale is (72 * 256)
     assert(scale < 32768);
+#endif
+    assert(num <= 32 * 32);
     assert((num % 8) == 0);
     assert(shift <= 10);
 
diff -r 5634d0322161 -r d2d181f1881a source/common/vec/intra-ssse3.cpp
--- a/source/common/vec/intra-ssse3.cpp	Thu Feb 06 22:35:20 2014 -0600
+++ b/source/common/vec/intra-ssse3.cpp	Fri Feb 07 00:32:32 2014 -0600
@@ -35,6 +35,64 @@ using namespace x265;
 
 namespace {
 #if !HIGH_BIT_DEPTH
+const int angAP[17][64] =
+{
+    {
+        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64
+    },
+    {
+        0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 34, 35, 36, 37, 38, 39, 39, 40, 41, 42, 43, 43, 44, 45, 46, 47, 47, 48, 49, 50, 51, 52
+    },
+    {
+        0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42
+    },
+    {
+        0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 34
+    },
+    {
+        0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 25, 25, 26
+    },
+    {
+        0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18
+    },
+    {
+        0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10
+    },
+    {
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
+    },
+    { // 0th virtual index; never used; just to help indexing
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4
+    },
+    {
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4
+    },
+    {
+        -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7, -7, -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10, -10, -10, -10
+    },
+    {
+        -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -4, -4, -4, -4, -5, -5, -5, -6, -6, -6, -6, -7, -7, -7, -8, -8, -8, -8, -9, -9, -9, -9, -10, -10, -10, -11, -11, -11, -11, -12, -12, -12, -13, -13, -13, -13, -14, -14, -14, -15, -15, -15, -15, -16, -16, -16, -17, -17, -17, -17, -18, -18, -18, -18
+    },
+    {
+        -1, -1, -2, -2, -3, -3, -3, -4, -4, -5, -5, -5, -6, -6, -7, -7, -7, -8, -8, -9, -9, -9, -10, -10, -11, -11, -11, -12, -12, -13, -13, -13, -14, -14, -15, -15, -16, -16, -16, -17, -17, -18, -18, -18, -19, -19, -20, -20, -20, -21, -21, -22, -22, -22, -23, -23, -24, -24, -24, -25, -25, -26, -26, -26
+    },
+    {
+        -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -10, -10, -11, -11, -12, -12, -13, -13, -14, -14, -15, -15, -16, -16, -17, -17, -18, -19, -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -26, -27, -27, -28, -28, -29, -29, -30, -30, -31, -31, -32, -32, -33, -33, -34, -34
+    },
+    {
+        -1, -2, -2, -3, -4, -4, -5, -6, -6, -7, -8, -8, -9, -10, -10, -11, -12, -12, -13, -14, -14, -15, -16, -16, -17, -18, -18, -19, -20, -20, -21, -21, -22, -23, -23, -24, -25, -25, -26, -27, -27, -28, -29, -29, -30, -31, -31, -32, -33, -33, -34, -35, -35, -36, -37, -37, -38, -39, -39, -40, -41, -41, -42, -42
+    },
+    {
+        -1, -2, -3, -4, -5, -5, -6, -7, -8, -9, -9, -10, -11, -12, -13, -13, -14, -15, -16, -17, -18, -18, -19, -20, -21, -22, -22, -23, -24, -25, -26, -26, -27, -28, -29, -30, -31, -31, -32, -33, -34, -35, -35, -36, -37, -38, -39, -39, -40, -41, -42, -43, -44, -44, -45, -46, -47, -48, -48, -49, -50, -51, -52, -52
+    },
+    {
+        -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, -63, -64
+    }
+};
+
+#define GETAP(X, Y) angAP[8 - (X)][(Y)]
+
+// 16x16
 #define PREDANG_CALCROW_VER(X) \
     LOADROW(row11L, row11H, GETAP(lookIdx, X)); \
     LOADROW(row12L, row12H, GETAP(lookIdx, X) + 1); \
diff -r 5634d0322161 -r d2d181f1881a source/encoder/weightPrediction.cpp
--- a/source/encoder/weightPrediction.cpp	Thu Feb 06 22:35:20 2014 -0600
+++ b/source/encoder/weightPrediction.cpp	Fri Feb 07 00:32:32 2014 -0600
@@ -209,8 +209,10 @@ bool WeightPrediction::checkDenom(int de
     TComPicYuv *orig = m_slice->getPic()->getPicYuvOrg();
     width[0]  = ((orig->getWidth() + 8) >> 4) << 4;
     height[0] = ((orig->getHeight() + 8) >> 4) << 4;
-    width[2] = width[1] = width[0] >> CHROMA_H_SHIFT(m_csp);
-    height[2] = height[1] = height[0] >> CHROMA_V_SHIFT(m_csp);
+    int hshift = CHROMA_H_SHIFT(m_csp);
+    int vshift = CHROMA_V_SHIFT(m_csp);
+    width[2] = width[1] = width[0] >> hshift;
+    height[2] = height[1] = height[0] >> vshift;
 
     for (int list = 0; list < numPredDir; list++)
     {


More information about the x265-commits mailing list