]> granicus.if.org Git - libvpx/commitdiff
Added decoder support for 128x128 coding units
authorJulia Robson <juliamrobson@gmail.com>
Mon, 2 Nov 2015 14:28:38 +0000 (14:28 +0000)
committerJulia Robson <juliamrobson@gmail.com>
Mon, 2 Nov 2015 16:03:30 +0000 (16:03 +0000)
Change-Id: Icf3c6b64caaf8a86cd27231aa27baf5fd99c0fde

vp9/common/vp9_blockd.h
vp9/common/vp9_common_data.c
vp9/common/vp9_entropymode.c
vp9/common/vp9_enums.h
vp9/common/vp9_loopfilter.c
vp9/common/vp9_mvref_common.h
vp9/common/vp9_reconinter.c
vp9/decoder/vp9_dthread.c

index 5f3b9bbade4854a6d6fe538444043a9fa9970ef2..fa3ec3cbd1d1220bc73787f9fc441546acd155ec 100644 (file)
@@ -512,9 +512,15 @@ static INLINE TX_SIZE bsize_to_tx_size(BLOCK_SIZE bsize) {
     TX_32X32, TX_32X32, TX_32X32,
 #if CONFIG_TX64X64
     TX_64X64
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    , TX_64X64, TX_64X64, TX_64X64
+#endif  // CONFIG_EXT_CODING_UNIT_SIZE
 #else
     TX_32X32
-#endif
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    , TX_32X32, TX_32X32, TX_32X32
+#endif  // CONFIG_EXT_CODING_UNIT_SIZE
+#endif  // CONFIG_TX64X64
   };
   return bsize_to_tx_size_lookup[bsize];
 }
index ba5802f8f6f74596f8dcff3ed397ac2b84902e9f..8d9973387b053b407bf3828670c4c0ea8f2e64af 100644 (file)
 
 // Log 2 conversion lookup tables for block width and height
 const int b_width_log2_lookup[BLOCK_SIZES] =
-  {0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4};
+  {0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    4, 5, 5
+#endif
+  };
 const int b_height_log2_lookup[BLOCK_SIZES] =
-  {0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4};
+  {0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    5, 4, 5
+#endif
+};
 const int num_4x4_blocks_wide_lookup[BLOCK_SIZES] =
-  {1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16};
+  {1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    16, 32, 32
+#endif
+};
 const int num_4x4_blocks_high_lookup[BLOCK_SIZES] =
-  {1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16};
+  {1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    32, 16, 32
+#endif
+};
 // Log 2 conversion lookup tables for modeinfo width and height
 const int mi_width_log2_lookup[BLOCK_SIZES] =
-  {0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3};
+  {0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    3, 4, 4
+#endif
+};
 const int num_8x8_blocks_wide_lookup[BLOCK_SIZES] =
-  {1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8};
+  {1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    8, 16, 16
+#endif
+};
 const int num_8x8_blocks_high_lookup[BLOCK_SIZES] =
-  {1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8};
+  {1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    16, 8, 16
+#endif
+};
 
 // MIN(3, MIN(b_width_log2(bsize), b_height_log2(bsize)))
 const int size_group_lookup[BLOCK_SIZES] =
-  {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3};
+  {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    3, 3, 3
+#endif
+};
 
 const int num_pels_log2_lookup[BLOCK_SIZES] =
-  {4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12};
+  {4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    13, 13, 14
+#endif
+};
 
 const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = {
   {  // 4X4
@@ -41,32 +77,62 @@ const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = {
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
-    PARTITION_INVALID
+    PARTITION_INVALID,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    // 64x128,128x64,128x128
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#endif
   }, {  // 8X8
     // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
     PARTITION_SPLIT, PARTITION_VERT, PARTITION_HORZ, PARTITION_NONE,
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
-    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    // 64x128,128x64,128x128
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#endif
   }, {  // 16X16
     // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
     PARTITION_VERT, PARTITION_HORZ, PARTITION_NONE, PARTITION_INVALID,
     PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
-    PARTITION_INVALID, PARTITION_INVALID
+    PARTITION_INVALID, PARTITION_INVALID,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    // 64x128,128x64,128x128
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#endif
   }, {  // 32X32
     // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_VERT,
     PARTITION_HORZ, PARTITION_NONE, PARTITION_INVALID,
-    PARTITION_INVALID, PARTITION_INVALID
+    PARTITION_INVALID, PARTITION_INVALID,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    // 64x128,128x64,128x128
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#endif
   }, {  // 64X64
     // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
     PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_VERT, PARTITION_HORZ,
-    PARTITION_NONE
+    PARTITION_NONE,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    // 64x128,128x64,128x128
+    PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
+#endif
+  },
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  {  // 128x128
+    // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
+    // 64x128,128x64,128x128
+    PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
+    PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
+    PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
+    PARTITION_SPLIT, PARTITION_VERT, PARTITION_HORZ, PARTITION_NONE
   }
+#endif
 };
 
 #if CONFIG_EXT_PARTITION
@@ -77,48 +143,72 @@ const BLOCK_SIZE subsize_lookup[EXT_PARTITION_TYPES][BLOCK_SIZES] = {
     BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
     BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
     BLOCK_64X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_64X128, BLOCK_128X64, BLOCK_128X128,
+#endif
   }, {  // PARTITION_HORZ
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X8,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_64X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
+#endif
   }, {  // PARTITION_VERT
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X16,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X32,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
+#endif
   }, {  // PARTITION_SPLIT
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X64,
+#endif
   }, {  // PARTITION_HORZ_A
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X8,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_64X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
+#endif
   }, {  // PARTITION_HORZ_B
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X8,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_64X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
+#endif
   }, {  // PARTITION_VERT_A
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X16,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X32,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
+#endif
   }, {  // PARTITION_VERT_B
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X16,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X32,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
+#endif
   }
 };
 #else
@@ -129,27 +219,39 @@ const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] = {
     BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
     BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
     BLOCK_64X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_64X128, BLOCK_128X64, BLOCK_128X128,
+#endif
   }, {  // PARTITION_HORZ
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X8,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_64X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
+#endif
   }, {  // PARTITION_VERT
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X16,    BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X32,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
+#endif
   }, {  // PARTITION_SPLIT
     BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_4X4,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_8X8,     BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_16X16,   BLOCK_INVALID, BLOCK_INVALID,
     BLOCK_32X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+    BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X64,
+#endif
   }
 };
-#endif
+#endif  // CONFIG_EXT_PARTITION
 
 const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
   TX_4X4,   TX_4X4,   TX_4X4,
@@ -158,9 +260,15 @@ const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
   TX_32X32, TX_32X32, TX_32X32,
 #if CONFIG_TX64X64
   TX_64X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  TX_64X64, TX_64X64, TX_64X64,
+#endif
 #else
   TX_32X32,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  TX_32X32, TX_32X32, TX_32X32,
 #endif
+#endif  // CONFIG_TX64X64
 };
 
 const BLOCK_SIZE txsize_to_bsize[TX_SIZES] = {
@@ -202,6 +310,11 @@ const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2] = {
   {{BLOCK_32X64, BLOCK_32X32},   {BLOCK_INVALID, BLOCK_16X32}},
   {{BLOCK_64X32, BLOCK_INVALID}, {BLOCK_32X32,   BLOCK_32X16}},
   {{BLOCK_64X64, BLOCK_64X32},   {BLOCK_32X64,   BLOCK_32X32}},
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  {{BLOCK_64X128, BLOCK_64X64},   {BLOCK_INVALID, BLOCK_32X64}},
+  {{BLOCK_128X64, BLOCK_INVALID}, {BLOCK_64X64,   BLOCK_64X32}},
+  {{BLOCK_128X128, BLOCK_128X64}, {BLOCK_64X128,  BLOCK_64X64}},
+#endif  // CONFIG_EXT_CODING_UNIT_SIZE
 };
 
 // Generates 4 bit field in which each bit set to 1 represents
@@ -211,6 +324,24 @@ const struct {
   PARTITION_CONTEXT above;
   PARTITION_CONTEXT left;
 } partition_context_lookup[BLOCK_SIZES]= {
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  {31, 31},  // 4X4   - {0b11111, 0b11111}
+  {31, 30},  // 4X8   - {0b11111, 0b11110}
+  {30, 31},  // 8X4   - {0b11110, 0b11111}
+  {30, 30},  // 8X8   - {0b11110, 0b11110}
+  {30, 28},  // 8X16  - {0b11110, 0b11100}
+  {28, 30},  // 16X8  - {0b11100, 0b11110}
+  {28, 28},  // 16X16 - {0b11100, 0b11100}
+  {28, 24},  // 16X32 - {0b11100, 0b11000}
+  {24, 28},  // 32X16 - {0b11000, 0b11100}
+  {24, 24},  // 32X32 - {0b11000, 0b11000}
+  {24, 16},  // 32X64 - {0b11000, 0b10000}
+  {16, 24},  // 64X32 - {0b10000, 0b11000}
+  {16, 16},  // 64X64 - {0b10000, 0b10000}
+  {16,  0},  // 64X128- {0b10000, 0b00000}
+  {0,  16},  // 128X64- {0b00000, 0b10000}
+  {0,  0 },  // 128X128-{0b00000, 0b00000}
+#else
   {15, 15},  // 4X4   - {0b1111, 0b1111}
   {15, 14},  // 4X8   - {0b1111, 0b1110}
   {14, 15},  // 8X4   - {0b1110, 0b1111}
@@ -224,6 +355,7 @@ const struct {
   {8,  0 },  // 32X64 - {0b1000, 0b0000}
   {0,  8 },  // 64X32 - {0b0000, 0b1000}
   {0,  0 },  // 64X64 - {0b0000, 0b0000}
+#endif
 };
 
 #if CONFIG_SUPERTX
index 9ec0cd91995a494583c283e0085475ea520a15a1..98ffb4c9bbf62be3e0a36a21d9ddc2fe0b51a361 100644 (file)
@@ -236,6 +236,13 @@ const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
   {  68,  11,  27, 128, 128, 128, 128 },  // a split, l not split
   {  57,  15,   9, 128, 128, 128, 128 },  // l split, a not split
   {  12,   3,   3, 128, 128, 128, 128 },  // a/l both split
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  // 128x128 -> 64x64
+  { 174,  35,  49, 128, 128, 128, 128 },  // a/l both not split
+  {  68,  11,  27, 128, 128, 128, 128 },  // a split, l not split
+  {  57,  15,   9, 128, 128, 128, 128 },  // l split, a not split
+  {  12,   3,   3, 128, 128, 128, 128 },  // a/l both split
+#endif
 };
 
 static const vp9_prob default_partition_probs[PARTITION_CONTEXTS]
@@ -260,6 +267,13 @@ static const vp9_prob default_partition_probs[PARTITION_CONTEXTS]
   {  72,  16,  44, 128, 128, 128, 128 },  // a split, l not split
   {  58,  32,  12, 128, 128, 128, 128 },  // l split, a not split
   {  10,   7,   6, 128, 128, 128, 128 },  // a/l both split
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  // 128x128 -> 64x64lit
+  { 222,  34,  30, 128, 128, 128, 128 },  // a/l both not split
+  {  72,  16,  44, 128, 128, 128, 128 },  // a split, l not split
+  {  58,  32,  12, 128, 128, 128, 128 },  // l split, a not split
+  {  10,   7,   6, 128, 128, 128, 128 },  // a/l both split
+#endif
 };
 #else
 const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
@@ -284,6 +298,13 @@ const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
   {  68,  11,  27 },  // a split, l not split
   {  57,  15,   9 },  // l split, a not split
   {  12,   3,   3 },  // a/l both split
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  // 128x128 -> 64x64
+  { 174,  35,  49 },  // a/l both not split
+  {  68,  11,  27 },  // a split, l not split
+  {  57,  15,   9 },  // l split, a not split
+  {  12,   3,   3 },  // a/l both split
+#endif
 };
 
 static const vp9_prob default_partition_probs[PARTITION_CONTEXTS]
@@ -308,8 +329,15 @@ static const vp9_prob default_partition_probs[PARTITION_CONTEXTS]
   {  72,  16,  44 },  // a split, l not split
   {  58,  32,  12 },  // l split, a not split
   {  10,   7,   6 },  // a/l both split
-};
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  // 128x128 -> 64x64
+  { 222,  34,  30 },  // a/l both not split
+  {  72,  16,  44 },  // a split, l not split
+  {  58,  32,  12 },  // l split, a not split
+  {  10,   7,   6 },  // a/l both split
 #endif
+};
+#endif  // CONFIG_EXT_PARTITION
 
 static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS]
                                               [INTER_MODES - 1] = {
index 33a4ddcda55f9c38800c2e1cce1a460563fdd385..7646b9cd53db4de131cb89edaf37a070fcfe1c4f 100644 (file)
 extern "C" {
 #endif
 
+#if CONFIG_EXT_CODING_UNIT_SIZE
+#define CODING_UNIT_SIZE_LOG2 7
+#else
 #define CODING_UNIT_SIZE_LOG2 6
+#endif
 
 #define CODING_UNIT_SIZE (1 << CODING_UNIT_SIZE_LOG2)
 
@@ -59,6 +63,11 @@ typedef enum BLOCK_SIZE {
   BLOCK_32X64,
   BLOCK_64X32,
   BLOCK_64X64,
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  BLOCK_64X128,
+  BLOCK_128X64,
+  BLOCK_128X128,
+#endif  // CONFIG_EXT_CODING_UNIT_SIZE
   BLOCK_SIZES,
   BLOCK_INVALID = BLOCK_SIZES,
   BLOCK_LARGEST = BLOCK_SIZES - 1
@@ -91,7 +100,11 @@ typedef enum PARTITION_TYPE {
 
 typedef char PARTITION_CONTEXT;
 #define PARTITION_PLOFFSET   4  // number of probability models per block size
+#if CONFIG_EXT_CODING_UNIT_SIZE
+#define PARTITION_CONTEXTS (5 * PARTITION_PLOFFSET)
+#else
 #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
+#endif
 
 // block transform size
 typedef enum {
index 99537600c2364424e2f876bbb1b8e7cbeb86b3ec..e410c0fabb4311be5510324b597167c9e0b517a5 100644 (file)
@@ -1916,7 +1916,7 @@ void vp9_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
                           struct macroblockd_plane planes[MAX_MB_PLANE],
                           int start, int stop, int y_only) {
   const int num_planes = y_only ? 1 : MAX_MB_PLANE;
-#if CONFIG_EXT_PARTITION
+#if CONFIG_EXT_PARTITION || CONFIG_EXT_CODING_UNIT_SIZE
   const int use_420 = 0;
 #else
   const int use_420 = y_only || (planes[1].subsampling_y == 1 &&
index 3389bd904bfc154fd28dc7b980f885d561519d40..9a442a3fc227e7a025cb8bfdf0d9622c83a831be 100644 (file)
@@ -130,7 +130,15 @@ static const POSITION mv_ref_blocks[BLOCK_SIZES][MVREF_NEIGHBOURS] = {
   // 64X32
   {{-1, 0}, {0, -1}, {-1, 4}, {2, -1}, {-1, -1}, {-3, 0}, {0, -3}, {-1, 2}},
   // 64X64
-  {{-1, 3}, {3, -1}, {-1, 4}, {4, -1}, {-1, -1}, {-1, 0}, {0, -1}, {-1, 6}}
+  {{-1, 3}, {3, -1}, {-1, 4}, {4, -1}, {-1, -1}, {-1, 0}, {0, -1}, {-1, 6}},
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  // 64x128
+  {{0, -1}, {-1, 0}, {4, -1}, {-1, 2}, {-1, -1}, {0, -3}, {-3, 0}, {2, -1}},
+  // 128x64
+  {{-1, 0}, {0, -1}, {-1, 4}, {2, -1}, {-1, -1}, {-3, 0}, {0, -3}, {-1, 2}},
+  // 128x128
+  {{-1, 3}, {3, -1}, {-1, 4}, {4, -1}, {-1, -1}, {-1, 0}, {0, -1}, {-1, 6}},
+#endif
 };
 
 static const int idx_n_column_to_subblock[4][2] = {
@@ -221,7 +229,11 @@ static const int idx_to_subblock_topright_topleft[2][3] = {
 #endif  // CONFIG_NEWMVREF
 
 // clamp_mv_ref
+#if CONFIG_EXT_CODING_UNIT_SIZE
+#define MV_BORDER (32 << 3)  // Allow 32 pels in 1/8th pel units
+#else
 #define MV_BORDER (16 << 3)  // Allow 16 pels in 1/8th pel units
+#endif
 
 static INLINE void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) {
   clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER,
index dd39f0af727af57c17a42ba0470b2b94465680a2..347ea8cf0868b3a44dc512a3ac30d21f0826076f 100644 (file)
@@ -121,9 +121,28 @@ static void inter_predictor(const uint8_t *src, int src_stride,
                             int w, int h, int ref,
                             const InterpKernel *kernel,
                             int xs, int ys) {
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  int i, j;
+  for (j = 0; j < h; j += 64) {
+    int y = subpel_y + j * ys;
+    int frac_y = y & SUBPEL_MASK;
+    int floor_y = y >> SUBPEL_BITS;
+    for (i = 0; i < w; i += 64) {
+      int x = subpel_x + i * xs;
+      int frac_x = x & SUBPEL_MASK;
+      int floor_x = x >> SUBPEL_BITS;
+      sf->predict[frac_x != 0][frac_y != 0][ref](
+          src + floor_y * src_stride + floor_x, src_stride,
+          dst + j * dst_stride + i, dst_stride,
+          kernel[frac_x], xs, kernel[frac_y], ys,
+          w < 64 ? w : 64, h < 64 ? h : 64);
+    }
+  }
+#else
   sf->predict[subpel_x != 0][subpel_y != 0][ref](
       src, src_stride, dst, dst_stride,
       kernel[subpel_x], xs, kernel[subpel_y], ys, w, h);
+#endif
 }
 
 void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
@@ -156,9 +175,28 @@ static void highbd_inter_predictor(const uint8_t *src, int src_stride,
                                    int w, int h, int ref,
                                    const InterpKernel *kernel,
                                    int xs, int ys, int bd) {
+#if CONFIG_EXT_CODING_UNIT_SIZE
+  int i, j;
+  for (j = 0; j < h; j += 64) {
+    int y = subpel_y + j * ys;
+    int frac_y = y & SUBPEL_MASK;
+    int floor_y = y >> SUBPEL_BITS;
+    for (i = 0; i < w; i += 64) {
+      int x = subpel_x + i * xs;
+      int frac_x = x & SUBPEL_MASK;
+      int floor_x = x >> SUBPEL_BITS;
+      sf->highbd_predict[frac_x != 0][frac_y != 0][ref](
+          src + floor_y * src_stride + floor_x, src_stride,
+          dst + j * dst_stride + i, dst_stride,
+          kernel[frac_x], xs, kernel[frac_y], ys,
+          w < 64 ? w : 64, h < 64 ? h : 64, bd);
+    }
+  }
+#else
   sf->highbd_predict[subpel_x != 0][subpel_y != 0][ref](
       src, src_stride, dst, dst_stride,
       kernel[subpel_x], xs, kernel[subpel_y], ys, w, h, bd);
+#endif
 }
 
 void vp9_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
@@ -2028,7 +2066,7 @@ static void build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, int plane,
           CONVERT_TO_BYTEPTR(tmp_dst_) : tmp_dst_;
 #else
       uint8_t tmp_dst[4096];
-#endif
+#endif  // CONFIG_VP9_HIGHBITDEPTH
 #if CONFIG_GLOBAL_MOTION
       if (is_global) {
         vp9_warp_plane(gm[ref], pre_buf->buf0,
index 7aed3dfc31415c9f1e0e1ac7161173ad10db7359..690dd1996a1117422051dbbfc00646dfae326a93 100644 (file)
@@ -109,6 +109,11 @@ static void loop_filter_rows_mt(const YV12_BUFFER_CONFIG *const frame_buffer,
       sync_read(lf_sync, r, c);
 
       vp9_setup_dst_planes(planes, frame_buffer, mi_row, mi_col);
+#if CONFIG_EXT_CODING_UNIT_SIZE
+      printf("STOPPING: This code has not been modified to work with the "
+             "extended coding unit size experiment");
+      exit(EXIT_FAILURE);
+#endif
       vp9_setup_mask(cm, mi_row, mi_col, mi + mi_col, cm->mi_stride, &lfm);
 
       for (plane = 0; plane < num_planes; ++plane) {