Added decoder support for 128x128 coding units

Change-Id: Icf3c6b64caaf8a86cd27231aa27baf5fd99c0fde
This commit is contained in:
Julia Robson 2015-11-02 14:28:38 +00:00
parent 2a1f8c74aa
commit 84a5403bab
8 changed files with 254 additions and 20 deletions

View File

@ -512,9 +512,15 @@ static INLINE TX_SIZE bsize_to_tx_size(BLOCK_SIZE bsize) {
TX_32X32, TX_32X32, TX_32X32, TX_32X32, TX_32X32, TX_32X32,
#if CONFIG_TX64X64 #if CONFIG_TX64X64
TX_64X64 TX_64X64
#if CONFIG_EXT_CODING_UNIT_SIZE
, TX_64X64, TX_64X64, TX_64X64
#endif // CONFIG_EXT_CODING_UNIT_SIZE
#else #else
TX_32X32 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]; return bsize_to_tx_size_lookup[bsize];
} }

View File

@ -12,27 +12,63 @@
// Log 2 conversion lookup tables for block width and height // Log 2 conversion lookup tables for block width and height
const int b_width_log2_lookup[BLOCK_SIZES] = 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] = 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] = 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] = 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 // Log 2 conversion lookup tables for modeinfo width and height
const int mi_width_log2_lookup[BLOCK_SIZES] = 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] = 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] = 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))) // MIN(3, MIN(b_width_log2(bsize), b_height_log2(bsize)))
const int size_group_lookup[BLOCK_SIZES] = 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] = 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] = { const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = {
{ // 4X4 { // 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, 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 }, { // 8X8
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64 // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
PARTITION_SPLIT, PARTITION_VERT, PARTITION_HORZ, PARTITION_NONE, 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,
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 }, { // 16X16
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,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_VERT, PARTITION_HORZ, PARTITION_NONE, PARTITION_INVALID, 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,
#if CONFIG_EXT_CODING_UNIT_SIZE
// 64x128,128x64,128x128
PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
#endif
}, { // 32X32 }, { // 32X32
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,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_SPLIT, PARTITION_VERT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_VERT,
PARTITION_HORZ, PARTITION_NONE, PARTITION_INVALID, 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 }, { // 64X64
// 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,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_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_SPLIT,
PARTITION_SPLIT, PARTITION_SPLIT, PARTITION_VERT, PARTITION_HORZ, 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 #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_16X16, BLOCK_16X32, BLOCK_32X16,
BLOCK_32X32, BLOCK_32X64, BLOCK_64X32, BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
BLOCK_64X64, BLOCK_64X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_64X128, BLOCK_128X64, BLOCK_128X128,
#endif
}, { // PARTITION_HORZ }, { // PARTITION_HORZ
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_64X32, BLOCK_64X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
#endif
}, { // PARTITION_VERT }, { // PARTITION_VERT
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X64, BLOCK_32X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
#endif
}, { // PARTITION_SPLIT }, { // PARTITION_SPLIT
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X32, BLOCK_32X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X64,
#endif
}, { // PARTITION_HORZ_A }, { // PARTITION_HORZ_A
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_64X32, BLOCK_64X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
#endif
}, { // PARTITION_HORZ_B }, { // PARTITION_HORZ_B
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_64X32, BLOCK_64X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
#endif
}, { // PARTITION_VERT_A }, { // PARTITION_VERT_A
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X64, BLOCK_32X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
#endif
}, { // PARTITION_VERT_B }, { // PARTITION_VERT_B
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X64, BLOCK_32X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
#endif
} }
}; };
#else #else
@ -129,27 +219,39 @@ const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES] = {
BLOCK_16X16, BLOCK_16X32, BLOCK_32X16, BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
BLOCK_32X32, BLOCK_32X64, BLOCK_64X32, BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
BLOCK_64X64, BLOCK_64X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_64X128, BLOCK_128X64, BLOCK_128X128,
#endif
}, { // PARTITION_HORZ }, { // PARTITION_HORZ
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_32X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_64X32, BLOCK_64X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_128X64,
#endif
}, { // PARTITION_VERT }, { // PARTITION_VERT
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X32, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X64, BLOCK_32X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_INVALID, BLOCK_INVALID, BLOCK_64X128,
#endif
}, { // PARTITION_SPLIT }, { // PARTITION_SPLIT
BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_4X4, BLOCK_INVALID, BLOCK_INVALID, BLOCK_4X4, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_8X8, BLOCK_INVALID, BLOCK_INVALID, BLOCK_8X8, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_16X16, BLOCK_INVALID, BLOCK_INVALID, BLOCK_16X16, BLOCK_INVALID, BLOCK_INVALID,
BLOCK_32X32, 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] = { const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
TX_4X4, TX_4X4, TX_4X4, TX_4X4, TX_4X4, TX_4X4,
@ -158,9 +260,15 @@ const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
TX_32X32, TX_32X32, TX_32X32, TX_32X32, TX_32X32, TX_32X32,
#if CONFIG_TX64X64 #if CONFIG_TX64X64
TX_64X64, TX_64X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
TX_64X64, TX_64X64, TX_64X64,
#endif
#else #else
TX_32X32, TX_32X32,
#if CONFIG_EXT_CODING_UNIT_SIZE
TX_32X32, TX_32X32, TX_32X32,
#endif #endif
#endif // CONFIG_TX64X64
}; };
const BLOCK_SIZE txsize_to_bsize[TX_SIZES] = { 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_32X64, BLOCK_32X32}, {BLOCK_INVALID, BLOCK_16X32}},
{{BLOCK_64X32, BLOCK_INVALID}, {BLOCK_32X32, BLOCK_32X16}}, {{BLOCK_64X32, BLOCK_INVALID}, {BLOCK_32X32, BLOCK_32X16}},
{{BLOCK_64X64, BLOCK_64X32}, {BLOCK_32X64, BLOCK_32X32}}, {{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 // Generates 4 bit field in which each bit set to 1 represents
@ -211,6 +324,24 @@ const struct {
PARTITION_CONTEXT above; PARTITION_CONTEXT above;
PARTITION_CONTEXT left; PARTITION_CONTEXT left;
} partition_context_lookup[BLOCK_SIZES]= { } 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, 15}, // 4X4 - {0b1111, 0b1111}
{15, 14}, // 4X8 - {0b1111, 0b1110} {15, 14}, // 4X8 - {0b1111, 0b1110}
{14, 15}, // 8X4 - {0b1110, 0b1111} {14, 15}, // 8X4 - {0b1110, 0b1111}
@ -224,6 +355,7 @@ const struct {
{8, 0 }, // 32X64 - {0b1000, 0b0000} {8, 0 }, // 32X64 - {0b1000, 0b0000}
{0, 8 }, // 64X32 - {0b0000, 0b1000} {0, 8 }, // 64X32 - {0b0000, 0b1000}
{0, 0 }, // 64X64 - {0b0000, 0b0000} {0, 0 }, // 64X64 - {0b0000, 0b0000}
#endif
}; };
#if CONFIG_SUPERTX #if CONFIG_SUPERTX

View 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 { 68, 11, 27, 128, 128, 128, 128 }, // a split, l not split
{ 57, 15, 9, 128, 128, 128, 128 }, // l split, a 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 { 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] 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 { 72, 16, 44, 128, 128, 128, 128 }, // a split, l not split
{ 58, 32, 12, 128, 128, 128, 128 }, // l split, a 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 { 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 #else
const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS] 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 { 68, 11, 27 }, // a split, l not split
{ 57, 15, 9 }, // l split, a not split { 57, 15, 9 }, // l split, a not split
{ 12, 3, 3 }, // a/l both 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] 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 { 72, 16, 44 }, // a split, l not split
{ 58, 32, 12 }, // l split, a not split { 58, 32, 12 }, // l split, a not split
{ 10, 7, 6 }, // a/l both 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
};
#endif // CONFIG_EXT_PARTITION
static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS] static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS]
[INTER_MODES - 1] = { [INTER_MODES - 1] = {

View File

@ -17,7 +17,11 @@
extern "C" { extern "C" {
#endif #endif
#if CONFIG_EXT_CODING_UNIT_SIZE
#define CODING_UNIT_SIZE_LOG2 7
#else
#define CODING_UNIT_SIZE_LOG2 6 #define CODING_UNIT_SIZE_LOG2 6
#endif
#define CODING_UNIT_SIZE (1 << CODING_UNIT_SIZE_LOG2) #define CODING_UNIT_SIZE (1 << CODING_UNIT_SIZE_LOG2)
@ -59,6 +63,11 @@ typedef enum BLOCK_SIZE {
BLOCK_32X64, BLOCK_32X64,
BLOCK_64X32, BLOCK_64X32,
BLOCK_64X64, BLOCK_64X64,
#if CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_64X128,
BLOCK_128X64,
BLOCK_128X128,
#endif // CONFIG_EXT_CODING_UNIT_SIZE
BLOCK_SIZES, BLOCK_SIZES,
BLOCK_INVALID = BLOCK_SIZES, BLOCK_INVALID = BLOCK_SIZES,
BLOCK_LARGEST = BLOCK_SIZES - 1 BLOCK_LARGEST = BLOCK_SIZES - 1
@ -91,7 +100,11 @@ typedef enum PARTITION_TYPE {
typedef char PARTITION_CONTEXT; typedef char PARTITION_CONTEXT;
#define PARTITION_PLOFFSET 4 // number of probability models per block size #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) #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
#endif
// block transform size // block transform size
typedef enum { typedef enum {

View File

@ -1916,7 +1916,7 @@ void vp9_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
struct macroblockd_plane planes[MAX_MB_PLANE], struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only) { int start, int stop, int y_only) {
const int num_planes = y_only ? 1 : MAX_MB_PLANE; 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; const int use_420 = 0;
#else #else
const int use_420 = y_only || (planes[1].subsampling_y == 1 && const int use_420 = y_only || (planes[1].subsampling_y == 1 &&

View File

@ -130,7 +130,15 @@ static const POSITION mv_ref_blocks[BLOCK_SIZES][MVREF_NEIGHBOURS] = {
// 64X32 // 64X32
{{-1, 0}, {0, -1}, {-1, 4}, {2, -1}, {-1, -1}, {-3, 0}, {0, -3}, {-1, 2}}, {{-1, 0}, {0, -1}, {-1, 4}, {2, -1}, {-1, -1}, {-3, 0}, {0, -3}, {-1, 2}},
// 64X64 // 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] = { 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 #endif // CONFIG_NEWMVREF
// clamp_mv_ref // 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 #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) { static INLINE void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) {
clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER, clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER,

View File

@ -121,9 +121,28 @@ static void inter_predictor(const uint8_t *src, int src_stride,
int w, int h, int ref, int w, int h, int ref,
const InterpKernel *kernel, const InterpKernel *kernel,
int xs, int ys) { 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]( sf->predict[subpel_x != 0][subpel_y != 0][ref](
src, src_stride, dst, dst_stride, src, src_stride, dst, dst_stride,
kernel[subpel_x], xs, kernel[subpel_y], ys, w, h); kernel[subpel_x], xs, kernel[subpel_y], ys, w, h);
#endif
} }
void vp9_build_inter_predictor(const uint8_t *src, int src_stride, 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, int w, int h, int ref,
const InterpKernel *kernel, const InterpKernel *kernel,
int xs, int ys, int bd) { 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]( sf->highbd_predict[subpel_x != 0][subpel_y != 0][ref](
src, src_stride, dst, dst_stride, src, src_stride, dst, dst_stride,
kernel[subpel_x], xs, kernel[subpel_y], ys, w, h, bd); 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, 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_; CONVERT_TO_BYTEPTR(tmp_dst_) : tmp_dst_;
#else #else
uint8_t tmp_dst[4096]; uint8_t tmp_dst[4096];
#endif #endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_GLOBAL_MOTION #if CONFIG_GLOBAL_MOTION
if (is_global) { if (is_global) {
vp9_warp_plane(gm[ref], pre_buf->buf0, vp9_warp_plane(gm[ref], pre_buf->buf0,

View File

@ -109,6 +109,11 @@ static void loop_filter_rows_mt(const YV12_BUFFER_CONFIG *const frame_buffer,
sync_read(lf_sync, r, c); sync_read(lf_sync, r, c);
vp9_setup_dst_planes(planes, frame_buffer, mi_row, mi_col); 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); vp9_setup_mask(cm, mi_row, mi_col, mi + mi_col, cm->mi_stride, &lfm);
for (plane = 0; plane < num_planes; ++plane) { for (plane = 0; plane < num_planes; ++plane) {