Commit 3f53da76 authored by Frederic Barbier's avatar Frederic Barbier Committed by Debargha Mukherjee

Remove EXT_PARTITION_TYPES_AB experiment

This experiment has been abandonned for AV1.

Change-Id: Ic706b3533ecf502ab316505ba0a9a8eeeb296612
parent 5664419e
......@@ -456,7 +456,7 @@ static int has_top_right(const AV1_COMMON *cm, const MACROBLOCKD *xd,
if (xd->n8_w > xd->n8_h)
if (xd->is_sec_rect) has_tr = 0;
#if CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#if CONFIG_EXT_PARTITION_TYPES
// The bottom left square of a Vertical A (in the old format) does
// not have a top right as it is decoded before the right hand
// rectangle of the partition
......
......@@ -1011,10 +1011,8 @@ static INLINE void update_ext_partition_context(MACROBLOCKD *xd, int mi_row,
BLOCK_SIZE bsize,
PARTITION_TYPE partition) {
if (bsize >= BLOCK_8X8) {
#if !CONFIG_EXT_PARTITION_TYPES_AB
const int hbs = mi_size_wide[bsize] / 2;
BLOCK_SIZE bsize2 = get_subsize(bsize, PARTITION_SPLIT);
#endif
switch (partition) {
case PARTITION_SPLIT:
if (bsize != BLOCK_8X8) break;
......@@ -1026,30 +1024,6 @@ static INLINE void update_ext_partition_context(MACROBLOCKD *xd, int mi_row,
case PARTITION_VERT_4:
update_partition_context(xd, mi_row, mi_col, subsize, bsize);
break;
#if CONFIG_EXT_PARTITION_TYPES_AB
case PARTITION_HORZ_A:
update_partition_context(xd, mi_row, mi_col,
get_subsize(bsize, PARTITION_HORZ_4), subsize);
update_partition_context(xd, mi_row + mi_size_high[bsize] / 2, mi_col,
subsize, subsize);
break;
case PARTITION_HORZ_B:
update_partition_context(xd, mi_row, mi_col, subsize, subsize);
update_partition_context(xd, mi_row + mi_size_high[bsize] / 2, mi_col,
get_subsize(bsize, PARTITION_HORZ_4), subsize);
break;
case PARTITION_VERT_A:
update_partition_context(xd, mi_row, mi_col,
get_subsize(bsize, PARTITION_VERT_4), subsize);
update_partition_context(xd, mi_row, mi_col + mi_size_wide[bsize] / 2,
subsize, subsize);
break;
case PARTITION_VERT_B:
update_partition_context(xd, mi_row, mi_col, subsize, subsize);
update_partition_context(xd, mi_row, mi_col + mi_size_wide[bsize] / 2,
get_subsize(bsize, PARTITION_VERT_4), subsize);
break;
#else
case PARTITION_HORZ_A:
update_partition_context(xd, mi_row, mi_col, bsize2, subsize);
update_partition_context(xd, mi_row + hbs, mi_col, subsize, subsize);
......@@ -1066,7 +1040,6 @@ static INLINE void update_ext_partition_context(MACROBLOCKD *xd, int mi_row,
update_partition_context(xd, mi_row, mi_col, subsize, subsize);
update_partition_context(xd, mi_row, mi_col + hbs, bsize2, subsize);
break;
#endif
default: assert(0 && "Invalid partition type");
}
}
......@@ -1298,16 +1271,6 @@ static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
const MB_MODE_INFO *const mbmi_below = &mi[bhigh / 2 * cm->mi_stride]->mbmi;
if (sswide == bwide) {
#if CONFIG_EXT_PARTITION_TYPES_AB
// Smaller height but same width. Is PARTITION_HORZ, PARTITION_HORZ_4,
// PARTITION_HORZ_A or PARTITION_HORZ_B.
if (sshigh * 2 == bhigh)
return (mbmi_below->sb_type == subsize) ? PARTITION_HORZ
: PARTITION_HORZ_B;
assert(sshigh * 4 == bhigh);
return (mbmi_below->sb_type == subsize) ? PARTITION_HORZ_4
: PARTITION_HORZ_A;
#else
// Smaller height but same width. Is PARTITION_HORZ_4, PARTITION_HORZ or
// PARTITION_HORZ_B. To distinguish the latter two, check if the lower
// half was split.
......@@ -1318,18 +1281,7 @@ static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
return PARTITION_HORZ;
else
return PARTITION_HORZ_B;
#endif
} else if (sshigh == bhigh) {
#if CONFIG_EXT_PARTITION_TYPES_AB
// Smaller width but same height. Is PARTITION_VERT, PARTITION_VERT_4,
// PARTITION_VERT_A or PARTITION_VERT_B.
if (sswide * 2 == bwide)
return (mbmi_right->sb_type == subsize) ? PARTITION_VERT
: PARTITION_VERT_B;
assert(sswide * 4 == bwide);
return (mbmi_right->sb_type == subsize) ? PARTITION_VERT_4
: PARTITION_VERT_A;
#else
// Smaller width but same height. Is PARTITION_VERT_4, PARTITION_VERT or
// PARTITION_VERT_B. To distinguish the latter two, check if the right
// half was split.
......@@ -1340,9 +1292,7 @@ static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
return PARTITION_VERT;
else
return PARTITION_VERT_B;
#endif
} else {
#if !CONFIG_EXT_PARTITION_TYPES_AB
// Smaller width and smaller height. Might be PARTITION_SPLIT or could be
// PARTITION_HORZ_A or PARTITION_VERT_A. If subsize isn't halved in both
// dimensions, we immediately know this is a split (which will recurse to
......@@ -1354,7 +1304,6 @@ static INLINE PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
if (mi_size_wide[mbmi_below->sb_type] == bwide) return PARTITION_HORZ_A;
if (mi_size_high[mbmi_right->sb_type] == bhigh) return PARTITION_VERT_A;
#endif
return PARTITION_SPLIT;
}
......
......@@ -343,7 +343,7 @@ static const uint16_t orders_4x16[256] = {
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#if CONFIG_EXT_PARTITION_TYPES
static const uint16_t orders_vert_128x128[1] = { 0 };
static const uint16_t orders_vert_64x64[4] = { 0, 2, 1, 3 };
static const uint16_t orders_vert_32x32[16] = { 0, 2, 4, 6, 1, 3, 5, 7,
......@@ -376,7 +376,7 @@ static const uint16_t orders_vert_8x8[256] = {
255
};
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#endif // CONFIG_EXT_PARTITION_TYPES
// The orders_* tables encode the order in which we visit blocks of the given
// size. For example, orders_32x32 has (128/32)^2 = 4^2 = 16 entries that
......@@ -464,7 +464,7 @@ static const uint16_t *const orders[BLOCK_SIZES_ALL] = {
/* clang-format on */
#endif // CONFIG_EXT_PARTITION
#if CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#if CONFIG_EXT_PARTITION_TYPES
// The orders_vert_* tables are like the orders_* tables above, but describe the
// order we visit square blocks when doing a PARTITION_VERT_A or
// PARTITION_VERT_B. This is the same order as normal except for on the last
......@@ -507,12 +507,12 @@ static const uint16_t *const orders_vert[BLOCK_SIZES] = {
};
/* clang-format on */
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#endif // CONFIG_EXT_PARTITION_TYPES
static const uint16_t *get_order_table(PARTITION_TYPE partition,
BLOCK_SIZE bsize) {
const uint16_t *ret = NULL;
#if CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#if CONFIG_EXT_PARTITION_TYPES
// If this is a mixed vertical partition, look up bsize in orders_vert.
if (partition == PARTITION_VERT_A || partition == PARTITION_VERT_B) {
assert(bsize < BLOCK_SIZES);
......@@ -523,7 +523,7 @@ static const uint16_t *get_order_table(PARTITION_TYPE partition,
#else
(void)partition;
ret = orders[bsize];
#endif // CONFIG_EXT_PARTITION_TYPES && !CONFIG_EXT_PARTITION_TYPES_AB
#endif // CONFIG_EXT_PARTITION_TYPES
assert(ret);
return ret;
......
......@@ -629,16 +629,11 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
AV1_COMMON *const cm = &pbi->common;
const int num_8x8_wh = mi_size_wide[bsize];
const int hbs = num_8x8_wh >> 1;
#if CONFIG_EXT_PARTITION_TYPES && CONFIG_EXT_PARTITION_TYPES_AB
const int qbs = num_8x8_wh >> 2;
#endif
PARTITION_TYPE partition;
BLOCK_SIZE subsize;
#if CONFIG_EXT_PARTITION_TYPES
const int quarter_step = num_8x8_wh / 4;
#if !CONFIG_EXT_PARTITION_TYPES_AB
BLOCK_SIZE bsize2 = get_subsize(bsize, PARTITION_SPLIT);
#endif
#endif
const int has_rows = (mi_row + hbs) < cm->mi_rows;
const int has_cols = (mi_col + hbs) < cm->mi_cols;
......@@ -688,32 +683,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
DEC_PARTITION(mi_row + hbs, mi_col + hbs, subsize);
break;
#if CONFIG_EXT_PARTITION_TYPES
#if CONFIG_EXT_PARTITION_TYPES_AB
case PARTITION_HORZ_A:
DEC_BLOCK(mi_row, mi_col, get_subsize(bsize, PARTITION_HORZ_4));
DEC_BLOCK(mi_row + qbs, mi_col, get_subsize(bsize, PARTITION_HORZ_4));
DEC_BLOCK(mi_row + hbs, mi_col, subsize);
break;
case PARTITION_HORZ_B:
DEC_BLOCK(mi_row, mi_col, subsize);
DEC_BLOCK(mi_row + hbs, mi_col, get_subsize(bsize, PARTITION_HORZ_4));
if (mi_row + 3 * qbs < cm->mi_rows)
DEC_BLOCK(mi_row + 3 * qbs, mi_col,
get_subsize(bsize, PARTITION_HORZ_4));
break;
case PARTITION_VERT_A:
DEC_BLOCK(mi_row, mi_col, get_subsize(bsize, PARTITION_VERT_4));
DEC_BLOCK(mi_row, mi_col + qbs, get_subsize(bsize, PARTITION_VERT_4));
DEC_BLOCK(mi_row, mi_col + hbs, subsize);
break;
case PARTITION_VERT_B:
DEC_BLOCK(mi_row, mi_col, subsize);
DEC_BLOCK(mi_row, mi_col + hbs, get_subsize(bsize, PARTITION_VERT_4));
if (mi_col + 3 * qbs < cm->mi_cols)
DEC_BLOCK(mi_row, mi_col + 3 * qbs,
get_subsize(bsize, PARTITION_VERT_4));
break;
#else
case PARTITION_HORZ_A:
DEC_BLOCK(mi_row, mi_col, bsize2);
DEC_BLOCK(mi_row, mi_col + hbs, bsize2);
......@@ -734,7 +703,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
DEC_BLOCK(mi_row, mi_col + hbs, bsize2);
DEC_BLOCK(mi_row + hbs, mi_col + hbs, bsize2);
break;
#endif
case PARTITION_HORZ_4:
for (int i = 0; i < 4; ++i) {
int this_mi_row = mi_row + i * quarter_step;
......
......@@ -2151,9 +2151,6 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
#if CONFIG_EXT_PARTITION_TYPES
const int quarter_step = mi_size_wide[bsize] / 4;
int i;
#if CONFIG_EXT_PARTITION_TYPES_AB
const int qbs = mi_size_wide[bsize] / 4;
#endif // CONFIG_EXT_PARTITION_TYPES_AB
#endif // CONFIG_EXT_PARTITION_TYPES
const PARTITION_TYPE partition = get_partition(cm, mi_row, mi_col, bsize);
const BLOCK_SIZE subsize = get_subsize(bsize, partition);
......@@ -2183,30 +2180,6 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
subsize);
break;
#if CONFIG_EXT_PARTITION_TYPES
#if CONFIG_EXT_PARTITION_TYPES_AB
case PARTITION_HORZ_A:
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row + qbs, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row + hbs, mi_col);
break;
case PARTITION_HORZ_B:
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row + hbs, mi_col);
if (mi_row + 3 * qbs < cm->mi_rows)
write_modes_b(cpi, tile, w, tok, tok_end, mi_row + 3 * qbs, mi_col);
break;
case PARTITION_VERT_A:
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + qbs);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + hbs);
break;
case PARTITION_VERT_B:
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + hbs);
if (mi_col + 3 * qbs < cm->mi_cols)
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + 3 * qbs);
break;
#else
case PARTITION_HORZ_A:
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + hbs);
......@@ -2227,7 +2200,6 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col + hbs);
write_modes_b(cpi, tile, w, tok, tok_end, mi_row + hbs, mi_col + hbs);
break;
#endif
case PARTITION_HORZ_4:
for (i = 0; i < 4; ++i) {
int this_mi_row = mi_row + i * quarter_step;
......
This diff is collapsed.
......@@ -188,28 +188,6 @@ static void count_segs_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
CSEGS(hbs, bs, 0, 0);
CSEGS(hbs, bs, 0, hbs);
break;
#if CONFIG_EXT_PARTITION_TYPES_AB
case PARTITION_HORZ_A:
CSEGS(bs, qbs, 0, 0);
CSEGS(bs, qbs, qbs, 0);
CSEGS(bs, hbs, hbs, 0);
break;
case PARTITION_HORZ_B:
CSEGS(bs, hbs, 0, 0);
CSEGS(bs, qbs, hbs, 0);
if (mi_row + 3 * qbs < cm->mi_rows) CSEGS(bs, qbs, 3 * qbs, 0);
break;
case PARTITION_VERT_A:
CSEGS(qbs, bs, 0, 0);
CSEGS(qbs, bs, 0, qbs);
CSEGS(hbs, bs, 0, hbs);
break;
case PARTITION_VERT_B:
CSEGS(hbs, bs, 0, 0);
CSEGS(qbs, bs, 0, hbs);
if (mi_col + 3 * qbs < cm->mi_cols) CSEGS(qbs, bs, 0, 3 * qbs);
break;
#else
case PARTITION_HORZ_A:
CSEGS(hbs, hbs, 0, 0);
CSEGS(hbs, hbs, 0, hbs);
......@@ -230,7 +208,6 @@ static void count_segs_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
CSEGS(hbs, hbs, 0, hbs);
CSEGS(hbs, hbs, hbs, hbs);
break;
#endif
case PARTITION_HORZ_4:
CSEGS(bs, qbs, 0, 0);
CSEGS(bs, qbs, qbs, 0);
......
......@@ -136,7 +136,6 @@ set(CONFIG_EXT_INTRA_MOD 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_INTRA_MOD2 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_PARTITION 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_PARTITION_TYPES 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_PARTITION_TYPES_AB 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_QM 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_SKIP 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_TILE 0 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -264,7 +264,6 @@ EXPERIMENT_LIST="
striped_loop_restoration
ext_partition
ext_partition_types
ext_partition_types_ab
ext_tile
q_adapt_probs
inter_stats_only
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment