summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_blockd.h158
-rw-r--r--vp9/common/vp9_entropymode.c120
-rw-r--r--vp9/common/vp9_entropymode.h21
-rw-r--r--vp9/common/vp9_enums.h8
-rw-r--r--vp9/common/vp9_findnearmv.h50
-rw-r--r--vp9/common/vp9_loopfilter.c66
-rw-r--r--vp9/common/vp9_mvref_common.c28
-rw-r--r--vp9/common/vp9_onyxc_int.h21
-rw-r--r--vp9/common/vp9_recon.c20
-rw-r--r--vp9/common/vp9_reconinter.c5
-rw-r--r--vp9/common/vp9_reconintra.c32
-rw-r--r--vp9/common/vp9_rtcd_defs.sh27
-rw-r--r--vp9/common/vp9_tile_common.c8
13 files changed, 47 insertions, 517 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index a8b563c61..97bb33e2e 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -83,9 +83,6 @@ typedef enum {
D27_PRED, /* Directional 22 deg prediction [anti-clockwise from 0 deg hor] */
D63_PRED, /* Directional 67 deg prediction [anti-clockwise from 0 deg hor] */
TM_PRED, /* Truemotion prediction */
-#if !CONFIG_SB8X8
- I8X8_PRED, /* 8x8 based prediction, each 8x8 has its own mode */
-#endif
I4X4_PRED, /* 4x4 based prediction, each 4x4 has its own mode */
NEARESTMV,
NEARMV,
@@ -128,9 +125,6 @@ typedef enum {
#define VP9_YMODES (I4X4_PRED + 1)
#define VP9_UV_MODES (TM_PRED + 1)
-#if !CONFIG_SB8X8
-#define VP9_I8X8_MODES (TM_PRED + 1)
-#endif
#define VP9_I32X32_MODES (TM_PRED + 1)
#define VP9_MVREFS (1 + SPLITMV - NEARESTMV)
@@ -173,16 +167,6 @@ typedef enum {
#define VP9_NKF_BINTRAMODES (VP9_BINTRAMODES) /* 10 */
#endif
-#if !CONFIG_SB8X8
-typedef enum {
- PARTITIONING_16X8 = 0,
- PARTITIONING_8X16,
- PARTITIONING_8X8,
- PARTITIONING_4X4,
- NB_PARTITIONINGS,
-} SPLITMV_PARTITIONING_TYPE;
-#endif
-
/* For keyframes, intra block modes are predicted by the (already decoded)
modes for the Y blocks to the left and above us; for interframes, there
is a single probability table. */
@@ -209,11 +193,9 @@ typedef enum {
static INLINE int b_width_log2(BLOCK_SIZE_TYPE sb_type) {
switch (sb_type) {
case BLOCK_SIZE_AB4X4: return 0;
-#if CONFIG_SB8X8
case BLOCK_SIZE_SB8X8:
case BLOCK_SIZE_SB8X16: return 1;
case BLOCK_SIZE_SB16X8:
-#endif
case BLOCK_SIZE_MB16X16:
case BLOCK_SIZE_SB16X32: return 2;
case BLOCK_SIZE_SB32X16:
@@ -228,11 +210,9 @@ static INLINE int b_width_log2(BLOCK_SIZE_TYPE sb_type) {
static INLINE int b_height_log2(BLOCK_SIZE_TYPE sb_type) {
switch (sb_type) {
case BLOCK_SIZE_AB4X4: return 0;
-#if CONFIG_SB8X8
case BLOCK_SIZE_SB8X8:
case BLOCK_SIZE_SB16X8: return 1;
case BLOCK_SIZE_SB8X16:
-#endif
case BLOCK_SIZE_MB16X16:
case BLOCK_SIZE_SB32X16: return 2;
case BLOCK_SIZE_SB16X32:
@@ -245,21 +225,13 @@ static INLINE int b_height_log2(BLOCK_SIZE_TYPE sb_type) {
}
static INLINE int mi_width_log2(BLOCK_SIZE_TYPE sb_type) {
-#if CONFIG_SB8X8
int a = b_width_log2(sb_type) - 1;
-#else
- int a = b_width_log2(sb_type) - 2;
-#endif
assert(a >= 0);
return a;
}
static INLINE int mi_height_log2(BLOCK_SIZE_TYPE sb_type) {
-#if CONFIG_SB8X8
int a = b_height_log2(sb_type) - 1;
-#else
- int a = b_height_log2(sb_type) - 2;
-#endif
assert(a >= 0);
return a;
}
@@ -277,9 +249,6 @@ typedef struct {
int mb_mode_context[MAX_REF_FRAMES];
-#if !CONFIG_SB8X8
- SPLITMV_PARTITIONING_TYPE partitioning;
-#endif
unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
unsigned char need_to_clamp_mvs;
unsigned char need_to_clamp_secondmv;
@@ -301,7 +270,7 @@ typedef struct {
typedef struct {
MB_MODE_INFO mbmi;
- union b_mode_info bmi[16 >> (CONFIG_SB8X8 * 2)];
+ union b_mode_info bmi[4];
} MODE_INFO;
struct scale_factors {
@@ -443,9 +412,7 @@ typedef struct macroblockd {
int sb_index; // index of 32x32 block inside the 64x64 block
int mb_index; // index of 16x16 block inside the 32x32 block
-#if CONFIG_SB8X8
int b_index; // index of 8x8 block inside the 16x16 block
-#endif
int q_index;
} MACROBLOCKD;
@@ -462,11 +429,7 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
if (bsl == 0)
return;
-#if CONFIG_SB8X8
bs = 1 << (bsl - 1);
-#else
- bs = 1 << bsl;
-#endif
// update the partition context at the end notes. set partition bits
// of block sizes larger than the current one to be one, and partition
@@ -502,21 +465,13 @@ static INLINE int partition_plane_context(MACROBLOCKD *xd,
int above = 0, left = 0, i;
int boffset = mi_width_log2(BLOCK_SIZE_SB64X64) - bsl;
-#if CONFIG_SB8X8
bs = 1 << (bsl - 1);
-#else
- bs = 1 << bsl;
-#endif
assert(mi_width_log2(sb_type) == mi_height_log2(sb_type));
assert(bsl >= 0);
assert(boffset >= 0);
-#if CONFIG_SB8X8
bs = 1 << (bsl - 1);
-#else
- bs = 1 << bsl;
-#endif
for (i = 0; i < bs; i++)
above |= (xd->above_seg_context[i] & (1 << boffset));
@@ -541,10 +496,8 @@ static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize,
subsize = BLOCK_SIZE_SB64X32;
else if (bsize == BLOCK_SIZE_SB32X32)
subsize = BLOCK_SIZE_SB32X16;
-#if CONFIG_SB8X8
else if (bsize == BLOCK_SIZE_MB16X16)
subsize = BLOCK_SIZE_SB16X8;
-#endif
else
assert(0);
break;
@@ -553,10 +506,8 @@ static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize,
subsize = BLOCK_SIZE_SB32X64;
else if (bsize == BLOCK_SIZE_SB32X32)
subsize = BLOCK_SIZE_SB16X32;
-#if CONFIG_SB8X8
else if (bsize == BLOCK_SIZE_MB16X16)
subsize = BLOCK_SIZE_SB8X16;
-#endif
else
assert(0);
break;
@@ -565,10 +516,8 @@ static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize,
subsize = BLOCK_SIZE_SB32X32;
else if (bsize == BLOCK_SIZE_SB32X32)
subsize = BLOCK_SIZE_MB16X16;
-#if CONFIG_SB8X8
else if (bsize == BLOCK_SIZE_MB16X16)
subsize = BLOCK_SIZE_SB8X8;
-#endif
else
assert(0);
break;
@@ -659,42 +608,6 @@ static TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, int ib) {
xd->mode_info_context->bmi[ib].as_mode.context :
#endif
xd->mode_info_context->bmi[ib].as_mode.first);
-#if !CONFIG_SB8X8
- } else if (xd->mode_info_context->mbmi.mode == I8X8_PRED &&
- xd->q_index < ACTIVE_HT) {
- const int ic = (ib & 10);
-#if USE_ADST_FOR_I8X8_4X4
-#if USE_ADST_PERIPHERY_ONLY
- // Use ADST for periphery blocks only
- const int inner = ib & 5;
- tx_type = txfm_map(pred_mode_conv(
- (MB_PREDICTION_MODE)xd->mode_info_context->bmi[ic].as_mode.first));
-
-#if USE_ADST_FOR_REMOTE_EDGE
- if (inner == 5)
- tx_type = DCT_DCT;
-#else
- if (inner == 1) {
- if (tx_type == ADST_ADST) tx_type = ADST_DCT;
- else if (tx_type == DCT_ADST) tx_type = DCT_DCT;
- } else if (inner == 4) {
- if (tx_type == ADST_ADST) tx_type = DCT_ADST;
- else if (tx_type == ADST_DCT) tx_type = DCT_DCT;
- } else if (inner == 5) {
- tx_type = DCT_DCT;
- }
-#endif
-#else
- // Use ADST
- b += ic - ib;
- tx_type = txfm_map(pred_mode_conv(
- (MB_PREDICTION_MODE)b->bmi.as_mode.first));
-#endif
-#else
- // Use 2D DCT
- tx_type = DCT_DCT;
-#endif
-#endif // !CONFIG_SB8X8
} else if (xd->mode_info_context->mbmi.mode <= TM_PRED &&
xd->q_index < ACTIVE_HT) {
#if USE_ADST_FOR_I16X16_4X4
@@ -739,15 +652,6 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, int ib) {
#endif
if (ib >= (1 << (wb + hb))) // no chroma adst
return tx_type;
-#if !CONFIG_SB8X8
- if (xd->mode_info_context->mbmi.mode == I8X8_PRED &&
- xd->q_index < ACTIVE_HT8) {
- // TODO(rbultje): MB_PREDICTION_MODE / B_PREDICTION_MODE should be merged
- // or the relationship otherwise modified to address this type conversion.
- tx_type = txfm_map(pred_mode_conv(
- (MB_PREDICTION_MODE)xd->mode_info_context->bmi[ib].as_mode.first));
- } else
-#endif // CONFIG_SB8X8
if (xd->mode_info_context->mbmi.mode <= TM_PRED &&
xd->q_index < ACTIVE_HT8) {
#if USE_ADST_FOR_I16X16_8X8
@@ -821,9 +725,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *xd);
static TX_SIZE get_uv_tx_size(const MACROBLOCKD *xd) {
MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
const TX_SIZE size = mbmi->txfm_size;
-#if !CONFIG_SB8X8
- const MB_PREDICTION_MODE mode = mbmi->mode;
-#endif // !CONFIG_SB8X8
switch (mbmi->sb_type) {
case BLOCK_SIZE_SB64X64:
@@ -835,7 +736,6 @@ static TX_SIZE get_uv_tx_size(const MACROBLOCKD *xd) {
return TX_16X16;
else
return size;
-#if CONFIG_SB8X8
case BLOCK_SIZE_SB32X16:
case BLOCK_SIZE_SB16X32:
case BLOCK_SIZE_MB16X16:
@@ -845,15 +745,6 @@ static TX_SIZE get_uv_tx_size(const MACROBLOCKD *xd) {
return size;
default:
return TX_4X4;
-#else // CONFIG_SB8X8
- default:
- if (size == TX_16X16)
- return TX_8X8;
- else if (size == TX_8X8 && (mode == I8X8_PRED || mode == SPLITMV))
- return TX_4X4;
- else
- return size;
-#endif // CONFIG_SB8X8
}
return size;
@@ -891,9 +782,6 @@ typedef void (*foreach_transformed_block_visitor)(int plane, int block,
void *arg);
static INLINE void foreach_transformed_block_in_plane(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize, int plane,
-#if !CONFIG_SB8X8
- int is_split,
-#endif // !CONFIG_SB8X8
foreach_transformed_block_visitor visit, void *arg) {
const int bw = b_width_log2(bsize), bh = b_height_log2(bsize);
@@ -913,9 +801,6 @@ static INLINE void foreach_transformed_block_in_plane(
const int ss_max = MAX(xd->plane[plane].subsampling_x,
xd->plane[plane].subsampling_y);
const int ss_txfrm_size = txfrm_size_b > ss_block_size
-#if !CONFIG_SB8X8
- || is_split
-#endif // !CONFIG_SB8X8
? txfrm_size_b - ss_max * 2
: txfrm_size_b;
const int step = 1 << ss_txfrm_size;
@@ -932,24 +817,10 @@ static INLINE void foreach_transformed_block_in_plane(
static INLINE void foreach_transformed_block(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize,
foreach_transformed_block_visitor visit, void *arg) {
-#if !CONFIG_SB8X8
- const MB_PREDICTION_MODE mode = xd->mode_info_context->mbmi.mode;
- const int is_split =
- xd->mode_info_context->mbmi.txfm_size == TX_8X8 &&
- (mode == I8X8_PRED || mode == SPLITMV);
-#endif // !CONFIG_SB8X8
int plane;
for (plane = 0; plane < MAX_MB_PLANE; plane++) {
-#if !CONFIG_SB8X8
- const int is_split_chroma = is_split &&
- xd->plane[plane].plane_type == PLANE_TYPE_UV;
-#endif // !CONFIG_SB8X8
-
foreach_transformed_block_in_plane(xd, bsize, plane,
-#if !CONFIG_SB8X8
- is_split_chroma,
-#endif // !CONFIG_SB8X8
visit, arg);
}
}
@@ -957,19 +828,10 @@ static INLINE void foreach_transformed_block(
static INLINE void foreach_transformed_block_uv(
const MACROBLOCKD* const xd, BLOCK_SIZE_TYPE bsize,
foreach_transformed_block_visitor visit, void *arg) {
-#if !CONFIG_SB8X8
- const MB_PREDICTION_MODE mode = xd->mode_info_context->mbmi.mode;
- const int is_split =
- xd->mode_info_context->mbmi.txfm_size == TX_8X8 &&
- (mode == I8X8_PRED || mode == SPLITMV);
-#endif // !CONFIG_SB8X8
int plane;
for (plane = 1; plane < MAX_MB_PLANE; plane++) {
foreach_transformed_block_in_plane(xd, bsize, plane,
-#if !CONFIG_SB8X8
- is_split,
-#endif // !CONFIG_SB8X8
visit, arg);
}
}
@@ -997,16 +859,8 @@ static INLINE void foreach_predicted_block_in_plane(
int pred_w, pred_h;
if (mode == SPLITMV) {
-#if CONFIG_SB8X8
pred_w = 0;
pred_h = 0;
-#else
- // 4x4 or 8x8
- const int is_4x4 =
- (xd->mode_info_context->mbmi.partitioning == PARTITIONING_4X4);
- pred_w = is_4x4 ? 0 : 1 >> xd->plane[plane].subsampling_x;
- pred_h = is_4x4 ? 0 : 1 >> xd->plane[plane].subsampling_y;
-#endif
} else {
pred_w = bw;
pred_h = bh;
@@ -1099,13 +953,6 @@ static TX_SIZE tx_size_for_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
return xd->mode_info_context->mbmi.txfm_size;
} else {
const int bw = b_width_log2(bsize), bh = b_height_log2(bsize);
-#if !CONFIG_SB8X8
- const MB_PREDICTION_MODE mode = xd->mode_info_context->mbmi.mode;
- const int is_split =
- xd->mode_info_context->mbmi.txfm_size == TX_8X8 &&
- (mode == I8X8_PRED || mode == SPLITMV);
-#endif
-
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
const TX_SIZE tx_size = xd->mode_info_context->mbmi.txfm_size;
@@ -1122,9 +969,6 @@ static TX_SIZE tx_size_for_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize,
const int ss_max = MAX(xd->plane[plane].subsampling_x,
xd->plane[plane].subsampling_y);
const int ss_txfrm_size = txfrm_size_b > ss_block_size
-#if !CONFIG_SB8X8
- || is_split
-#endif // !CONFIG_SB8X8
? txfrm_size_b - ss_max * 2
: txfrm_size_b;
return (TX_SIZE)(ss_txfrm_size / 2);
diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c
index f0a5d97a9..31c1a52c0 100644
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -16,7 +16,6 @@
#include "vpx_mem/vpx_mem.h"
static const unsigned int kf_y_mode_cts[8][VP9_YMODES] = {
-#if CONFIG_SB8X8
/* DC V H D45 135 117 153 D27 D63 TM i4X4 */
{12, 6, 5, 5, 5, 5, 5, 5, 5, 2, 200},
{25, 13, 13, 7, 7, 7, 7, 7, 7, 6, 160},
@@ -26,27 +25,11 @@ static const unsigned int kf_y_mode_cts[8][VP9_YMODES] = {
{68, 33, 35, 8, 8, 8, 8, 8, 8, 17, 68},
{78, 38, 38, 8, 8, 8, 8, 8, 8, 19, 52},
{89, 42, 42, 8, 8, 8, 8, 8, 8, 21, 34},
-#else
- /* DC V H D45 135 117 153 D27 D63 TM i8x8 i4X4 */
- {12, 6, 5, 5, 5, 5, 5, 5, 5, 2, 22, 200},
- {25, 13, 13, 7, 7, 7, 7, 7, 7, 6, 27, 160},
- {31, 17, 18, 8, 8, 8, 8, 8, 8, 9, 26, 139},
- {40, 22, 23, 8, 8, 8, 8, 8, 8, 12, 27, 116},
- {53, 26, 28, 8, 8, 8, 8, 8, 8, 13, 26, 94},
- {68, 33, 35, 8, 8, 8, 8, 8, 8, 17, 20, 68},
- {78, 38, 38, 8, 8, 8, 8, 8, 8, 19, 16, 52},
- {89, 42, 42, 8, 8, 8, 8, 8, 8, 21, 12, 34},
-#endif
};
static const unsigned int y_mode_cts [VP9_YMODES] = {
-#if CONFIG_SB8X8
/* DC V H D45 135 117 153 D27 D63 TM i4X4 */
98, 19, 15, 14, 14, 14, 14, 12, 12, 13, 70
-#else
- /* DC V H D45 135 117 153 D27 D63 TM i8x8 i4X4 */
- 98, 19, 15, 14, 14, 14, 14, 12, 12, 13, 16, 70
-#endif
};
static const unsigned int uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
@@ -61,19 +44,9 @@ static const unsigned int uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
{ 150, 15, 10, 10, 10, 10, 10, 75, 10, 6}, /* D27 */
{ 150, 15, 10, 10, 10, 10, 10, 10, 75, 6}, /* D63 */
{ 160, 30, 30, 10, 10, 10, 10, 10, 10, 16}, /* TM */
-#if !CONFIG_SB8X8
- { 132, 46, 40, 10, 10, 10, 10, 10, 10, 18}, /* i8x8 - never used */
-#endif
{ 150, 35, 41, 10, 10, 10, 10, 10, 10, 10}, /* i4X4 */
};
-#if !CONFIG_SB8X8
-static const unsigned int i8x8_mode_cts [VP9_I8X8_MODES] = {
- /* DC V H D45 135 117 153 D27 D63 TM */
- 73, 49, 61, 30, 30, 30, 30, 30, 30, 13
-};
-#endif
-
static const unsigned int kf_uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
// DC V H D45 135 117 153 D27 D63 TM
{ 160, 24, 24, 20, 20, 20, 20, 20, 20, 8}, /* DC */
@@ -86,9 +59,6 @@ static const unsigned int kf_uv_mode_cts [VP9_YMODES] [VP9_UV_MODES] = {
{ 102, 33, 20, 20, 20, 20, 20, 64, 20, 14}, /* D27 */
{ 102, 33, 20, 20, 20, 20, 20, 20, 64, 14}, /* D63 */
{ 132, 36, 30, 20, 20, 20, 20, 20, 20, 18}, /* TM */
-#if !CONFIG_SB8X8
- { 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* i8x8 - never used */
-#endif
{ 122, 41, 35, 20, 20, 20, 20, 20, 20, 18}, /* I4X4 */
};
@@ -146,45 +116,13 @@ const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1] = {
{ 208, 1, 1 }
};
-#if !CONFIG_SB8X8
-vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS] = {
- {
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 1, 1, 1, 1,
- 1, 1, 1, 1,
- }, {
- 0, 0, 1, 1,
- 0, 0, 1, 1,
- 0, 0, 1, 1,
- 0, 0, 1, 1,
- }, {
- 0, 0, 1, 1,
- 0, 0, 1, 1,
- 2, 2, 3, 3,
- 2, 2, 3, 3,
- }, {
- 0, 1, 2, 3,
- 4, 5, 6, 7,
- 8, 9, 10, 11,
- 12, 13, 14, 15,
- },
-};
-
-const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16};
-
-const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150};
-#endif
-
const vp9_prob vp9_partition_probs[NUM_PARTITION_CONTEXTS]
[PARTITION_TYPES - 1] = {
-#if CONFIG_SB8X8
// FIXME(jingning,rbultje) put real probabilities here
{202, 162, 107},
{16, 2, 169},
{3, 246, 19},
{104, 90, 134},
-#endif
{202, 162, 107},
{16, 2, 169},
{3, 246, 19},
@@ -260,12 +198,7 @@ const vp9_tree_index vp9_ymode_tree[VP9_YMODES * 2 - 2] = {
-D27_PRED, -D63_PRED,
16, 18,
-V_PRED, -H_PRED,
-#if CONFIG_SB8X8
-TM_PRED, -I4X4_PRED
-#else
- -TM_PRED, 20,
- -I4X4_PRED, -I8X8_PRED
-#endif
};
const vp9_tree_index vp9_kf_ymode_tree[VP9_YMODES * 2 - 2] = {
@@ -278,28 +211,9 @@ const vp9_tree_index vp9_kf_ymode_tree[VP9_YMODES * 2 - 2] = {
-D27_PRED, -D63_PRED,
16, 18,
-V_PRED, -H_PRED,
-#if CONFIG_SB8X8
-TM_PRED, -I4X4_PRED
-#else
- -TM_PRED, 20,
- -I4X4_PRED, -I8X8_PRED
-#endif
};
-#if !CONFIG_SB8X8
-const vp9_tree_index vp9_i8x8_mode_tree[VP9_I8X8_MODES * 2 - 2] = {
- 2, 14,
- -DC_PRED, 4,
- 6, 8,
- -D45_PRED, -D135_PRED,
- 10, 12,
- -D117_PRED, -D153_PRED,
- -D27_PRED, -D63_PRED,
- -V_PRED, 16,
- -H_PRED, -TM_PRED
-};
-#endif
-
const vp9_tree_index vp9_uv_mode_tree[VP9_UV_MODES * 2 - 2] = {
2, 14,
-DC_PRED, 4,
@@ -312,14 +226,6 @@ const vp9_tree_index vp9_uv_mode_tree[VP9_UV_MODES * 2 - 2] = {
-H_PRED, -TM_PRED
};
-#if !CONFIG_SB8X8
-const vp9_tree_index vp9_mbsplit_tree[6] = {
- -PARTITIONING_4X4, 2,
- -PARTITIONING_8X8, 4,
- -PARTITIONING_16X8, -PARTITIONING_8X16,
-};
-#endif
-
const vp9_tree_index vp9_mv_ref_tree[8] = {
-ZEROMV, 2,
-NEARESTMV, 4,
@@ -352,10 +258,6 @@ struct vp9_token vp9_sb_ymode_encodings[VP9_I32X32_MODES];
struct vp9_token vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES];
struct vp9_token vp9_kf_ymode_encodings[VP9_YMODES];
struct vp9_token vp9_uv_mode_encodings[VP9_UV_MODES];
-#if !CONFIG_SB8X8
-struct vp9_token vp9_i8x8_mode_encodings[VP9_I8X8_MODES];
-struct vp9_token vp9_mbsplit_encodings[VP9_NUMMBSPLITS];
-#endif
struct vp9_token vp9_mv_ref_encoding_array[VP9_MVREFS];
struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
@@ -386,16 +288,8 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) {
bct, uv_mode_cts[i], 0);
}
-#if !CONFIG_SB8X8
- vp9_tree_probs_from_distribution(vp9_i8x8_mode_tree, x->fc.i8x8_mode_prob,
- bct, i8x8_mode_cts, 0);
-#endif
-
vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2,
sizeof(vp9_sub_mv_ref_prob2));
-#if !CONFIG_SB8X8
- vpx_memcpy(x->fc.mbsplit_prob, vp9_mbsplit_probs, sizeof(vp9_mbsplit_probs));
-#endif
vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob,
sizeof(vp9_switchable_interp_prob));
@@ -499,10 +393,6 @@ void vp9_entropy_mode_init() {
vp9_tokens_from_tree(vp9_sb_ymode_encodings, vp9_sb_ymode_tree);
vp9_tokens_from_tree(vp9_sb_kf_ymode_encodings, vp9_sb_kf_ymode_tree);
vp9_tokens_from_tree(vp9_uv_mode_encodings, vp9_uv_mode_tree);
-#if !CONFIG_SB8X8
- vp9_tokens_from_tree(vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree);
- vp9_tokens_from_tree(vp9_mbsplit_encodings, vp9_mbsplit_tree);
-#endif
vp9_tokens_from_tree(vp9_switchable_interp_encodings,
vp9_switchable_interp_tree);
vp9_tokens_from_tree(vp9_partition_encodings, vp9_partition_tree);
@@ -681,11 +571,6 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
update_mode_probs(VP9_NKF_BINTRAMODES, vp9_bmode_tree,
fc->bmode_counts, fc->pre_bmode_prob,
fc->bmode_prob, 0);
-#if !CONFIG_SB8X8
- update_mode_probs(VP9_I8X8_MODES,
- vp9_i8x8_mode_tree, fc->i8x8_mode_counts,
- fc->pre_i8x8_mode_prob, fc->i8x8_mode_prob, 0);
-#endif
for (i = 0; i < SUBMVREF_COUNT; ++i)
update_mode_probs(VP9_SUBMVREFS,
@@ -693,11 +578,6 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
fc->pre_sub_mv_ref_prob[i], fc->sub_mv_ref_prob[i],
LEFT4X4);
-#if !CONFIG_SB8X8
- update_mode_probs(VP9_NUMMBSPLITS, vp9_mbsplit_tree,
- fc->mbsplit_counts, fc->pre_mbsplit_prob,
- fc->mbsplit_prob, 0);
-#endif
#if CONFIG_COMP_INTERINTRA_PRED
if (cm->use_interintra) {
int factor, interintra_prob, count;
diff --git a/vp9/common/vp9_entropymode.h b/vp9/common/vp9_entropymode.h
index 24f988f25..f49bb3b42 100644
--- a/vp9/common/vp9_entropymode.h
+++ b/vp9/common/vp9_entropymode.h
@@ -15,9 +15,6 @@
#include "vp9/common/vp9_treecoder.h"
#define SUBMVREF_COUNT 5
-#if !CONFIG_SB8X8
-#define VP9_NUMMBSPLITS 4
-#endif
#if CONFIG_COMP_INTERINTRA_PRED
#define VP9_DEF_INTERINTRA_PROB 248
@@ -26,16 +23,6 @@
#define SEPARATE_INTERINTRA_UV 0
#endif
-#if !CONFIG_SB8X8
-typedef const int vp9_mbsplit[16];
-
-extern vp9_mbsplit vp9_mbsplits[VP9_NUMMBSPLITS];
-
-extern const int vp9_mbsplit_count[VP9_NUMMBSPLITS]; /* # of subsets */
-
-extern const vp9_prob vp9_mbsplit_probs[VP9_NUMMBSPLITS - 1];
-#endif
-
extern int vp9_mv_cont(const int_mv *l, const int_mv *a);
extern const vp9_prob vp9_sub_mv_ref_prob2[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
@@ -52,10 +39,6 @@ extern const vp9_tree_index vp9_kf_ymode_tree[];
extern const vp9_tree_index vp9_uv_mode_tree[];
#define vp9_sb_ymode_tree vp9_uv_mode_tree
#define vp9_sb_kf_ymode_tree vp9_uv_mode_tree
-#if !CONFIG_SB8X8
-extern const vp9_tree_index vp9_i8x8_mode_tree[];
-extern const vp9_tree_index vp9_mbsplit_tree[];
-#endif
extern const vp9_tree_index vp9_mv_ref_tree[];
extern const vp9_tree_index vp9_sb_mv_ref_tree[];
extern const vp9_tree_index vp9_sub_mv_ref_tree[];
@@ -67,10 +50,6 @@ extern struct vp9_token vp9_sb_ymode_encodings[VP9_I32X32_MODES];
extern struct vp9_token vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES];
extern struct vp9_token vp9_kf_ymode_encodings[VP9_YMODES];
extern struct vp9_token vp9_uv_mode_encodings[VP9_UV_MODES];
-#if !CONFIG_SB8X8
-extern struct vp9_token vp9_i8x8_mode_encodings[VP9_I8X8_MODES];
-extern struct vp9_token vp9_mbsplit_encodings[VP9_NUMMBSPLITS];
-#endif
/* Inter mode values do not start at zero */
diff --git a/vp9/common/vp9_enums.h b/vp9/common/vp9_enums.h
index 3f00ba496..51454c14a 100644
--- a/vp9/common/vp9_enums.h
+++ b/vp9/common/vp9_enums.h
@@ -13,22 +13,16 @@
#include "./vpx_config.h"
-#if CONFIG_SB8X8
#define LOG2_MI_SIZE 3
-#else
-#define LOG2_MI_SIZE 4
-#endif
#define MI_SIZE (1 << LOG2_MI_SIZE)
#define MI_UV_SIZE (1 << (LOG2_MI_SIZE - 1))
typedef enum BLOCK_SIZE_TYPE {
BLOCK_SIZE_AB4X4,
-#if CONFIG_SB8X8
BLOCK_SIZE_SB8X8,
BLOCK_SIZE_SB8X16,
BLOCK_SIZE_SB16X8,
-#endif
BLOCK_SIZE_MB16X16,
BLOCK_SIZE_SB16X32,
BLOCK_SIZE_SB32X16,
@@ -47,6 +41,6 @@ typedef enum PARTITION_TYPE {
} PARTITION_TYPE;
#define PARTITION_PLOFFSET 4 // number of probability models per block size
-#define NUM_PARTITION_CONTEXTS ((2 + CONFIG_SB8X8) * PARTITION_PLOFFSET)
+#define NUM_PARTITION_CONTEXTS (3 * PARTITION_PLOFFSET)
#endif // VP9_COMMON_VP9_ENUMS_H_
diff --git a/vp9/common/vp9_findnearmv.h b/vp9/common/vp9_findnearmv.h
index df1ab73e8..0a1c4133b 100644
--- a/vp9/common/vp9_findnearmv.h
+++ b/vp9/common/vp9_findnearmv.h
@@ -74,13 +74,9 @@ vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
vp9_prob p[VP9_MVREFS - 1],
const int context);
-#if !CONFIG_SB8X8
-extern const uint8_t vp9_mbsplit_offset[4][16];
-#endif
-
static int left_block_mv(const MACROBLOCKD *xd,
const MODE_INFO *cur_mb, int b) {
- if (!(b & (3 >> CONFIG_SB8X8))) {
+ if (!(b & 1)) {
if (!xd->left_available)
return 0;
@@ -90,7 +86,7 @@ static int left_block_mv(const MACROBLOCKD *xd,
if (cur_mb->mbmi.mode != SPLITMV)
return cur_mb->mbmi.mv[0].as_int;
- b += 4 >> CONFIG_SB8X8;
+ b += 2;
}
return (cur_mb->bmi + b - 1)->as_mv[0].as_int;
@@ -98,7 +94,7 @@ static int left_block_mv(const MACROBLOCKD *xd,
static int left_block_second_mv(const MACROBLOCKD *xd,
const MODE_INFO *cur_mb, int b) {
- if (!(b & (3 >> CONFIG_SB8X8))) {
+ if (!(b & 1)) {
if (!xd->left_available)
return 0;
@@ -108,7 +104,7 @@ static int left_block_second_mv(const MACROBLOCKD *xd,
if (cur_mb->mbmi.mode != SPLITMV)
return cur_mb->mbmi.second_ref_frame > 0 ?
cur_mb->mbmi.mv[1].as_int : cur_mb->mbmi.mv[0].as_int;
- b += 4 >> CONFIG_SB8X8;
+ b += 2;
}
return cur_mb->mbmi.second_ref_frame > 0 ?
@@ -117,85 +113,69 @@ static int left_block_second_mv(const MACROBLOCKD *xd,
}
static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride) {
- if (!(b >> (2 >> CONFIG_SB8X8))) {
+ if (!(b >> 1)) {
/* On top edge, get from MB above us */
cur_mb -= mi_stride;
if (cur_mb->mbmi.mode != SPLITMV)
return cur_mb->mbmi.mv[0].as_int;
- b += 16 >> (2 * CONFIG_SB8X8);
+ b += 4;
}
- return (cur_mb->bmi + b - (4 >> CONFIG_SB8X8))->as_mv[0].as_int;
+ return (cur_mb->bmi + b - 2)->as_mv[0].as_int;
}
static int above_block_second_mv(const MODE_INFO *cur_mb, int b, int mi_stride) {
- if (!(b >> (2 >> CONFIG_SB8X8))) {
+ if (!(b >> 1)) {
/* On top edge, get from MB above us */
cur_mb -= mi_stride;
if (cur_mb->mbmi.mode != SPLITMV)
return cur_mb->mbmi.second_ref_frame > 0 ?
cur_mb->mbmi.mv[1].as_int : cur_mb->mbmi.mv[0].as_int;
- b += 16 >> (2 * CONFIG_SB8X8);
+ b += 4;
}
return cur_mb->mbmi.second_ref_frame > 0 ?
- (cur_mb->bmi + b - (4 >> CONFIG_SB8X8))->as_mv[1].as_int :
- (cur_mb->bmi + b - (4 >> CONFIG_SB8X8))->as_mv[0].as_int;
+ (cur_mb->bmi + b - 2)->as_mv[1].as_int :
+ (cur_mb->bmi + b - 2)->as_mv[0].as_int;
}
static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) {
-#if CONFIG_SB8X8
// FIXME(rbultje, jingning): temporary hack because jenkins doesn't
// understand this condition. This will go away soon.
if (b == 0 || b == 2) {
-#else
- if (!(b & (3 >> CONFIG_SB8X8))) {
-#endif
/* On L edge, get from MB to left of us */
--cur_mb;
if (cur_mb->mbmi.mode <= TM_PRED) {
return pred_mode_conv(cur_mb->mbmi.mode);
-#if !CONFIG_SB8X8
- } else if (cur_mb->mbmi.mode == I8X8_PRED) {
- return pred_mode_conv(
- (MB_PREDICTION_MODE)(cur_mb->bmi + 3 + b)->as_mode.first);
-#endif // !CONFIG_SB8X8
} else if (cur_mb->mbmi.mode == I4X4_PRED) {
- return ((cur_mb->bmi + (3 >> CONFIG_SB8X8) + b)->as_mode.first);
+ return ((cur_mb->bmi + 1 + b)->as_mode.first);
} else {
return B_DC_PRED;
}
}
-#if CONFIG_SB8X8
assert(b == 1 || b == 3);
-#endif
return (cur_mb->bmi + b - 1)->as_mode.first;
}
static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb,
int b, int mi_stride) {
- if (!(b >> (2 >> CONFIG_SB8X8))) {
+ if (!(b >> 1)) {
/* On top edge, get from MB above us */
cur_mb -= mi_stride;
if (cur_mb->mbmi.mode <= TM_PRED) {
return pred_mode_conv(cur_mb->mbmi.mode);
-#if !CONFIG_SB8X8
- } else if (cur_mb->mbmi.mode == I8X8_PRED) {
- return pred_mode_conv(
- (MB_PREDICTION_MODE)(cur_mb->bmi + 12 + b)->as_mode.first);
-#endif
} else if (cur_mb->mbmi.mode == I4X4_PRED) {
- return ((cur_mb->bmi + (CONFIG_SB8X8 ? 2 : 12) + b)->as_mode.first);
+ return ((cur_mb->bmi + 2 + b)->as_mode.first);
} else {
return B_DC_PRED;
}
}
- return (cur_mb->bmi + b - (4 >> CONFIG_SB8X8))->as_mode.first;
+ return (cur_mb->bmi + b - 2)->as_mode.first;
}
#endif // VP9_COMMON_VP9_FINDNEARMV_H_
diff --git a/vp9/common/vp9_loopfilter.c b/vp9/common/vp9_loopfilter.c
index edb0c540b..022abb8aa 100644
--- a/vp9/common/vp9_loopfilter.c
+++ b/vp9/common/vp9_loopfilter.c
@@ -27,9 +27,6 @@ static void lf_init_lut(loop_filter_info_n *lfi) {
lfi->mode_lf_lut[H_PRED] = 1;
lfi->mode_lf_lut[TM_PRED] = 1;
lfi->mode_lf_lut[I4X4_PRED] = 0;
-#if !CONFIG_SB8X8
- lfi->mode_lf_lut[I8X8_PRED] = 0;
-#endif
lfi->mode_lf_lut[ZEROMV] = 1;
lfi->mode_lf_lut[NEARESTMV] = 2;
lfi->mode_lf_lut[NEARMV] = 2;
@@ -169,12 +166,7 @@ void vp9_loop_filter_frame_init(VP9_COMMON *cm,
static int mb_lf_skip(const MB_MODE_INFO *const mbmi) {
const int skip_coef = mbmi->mb_skip_coeff;
const int tx_size = mbmi->txfm_size;
-#if CONFIG_SB8X8
return mbmi->sb_type >= BLOCK_SIZE_MB16X16 &&
-#else
- const MB_PREDICTION_MODE mode = mbmi->mode;
- return mode != I4X4_PRED && mode != I8X8_PRED && mode != SPLITMV &&
-#endif
(tx_size >= TX_16X16 || skip_coef);
}
@@ -227,11 +219,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) {
if (tx_size >= TX_8X8) {
if (tx_size == TX_8X8 &&
-#if CONFIG_SB8X8
(mi->mbmi.sb_type < BLOCK_SIZE_MB16X16)
-#else
- (mode == I8X8_PRED || mode == SPLITMV)
-#endif
)
vp9_loop_filter_bh8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi);
@@ -257,12 +245,7 @@ static void lpf_mb(VP9_COMMON *cm, const MODE_INFO *mi,
if (!skip_lf) {
if (tx_size >= TX_8X8) {
if (tx_size == TX_8X8 &&
-#if CONFIG_SB8X8
- (mi->mbmi.sb_type < BLOCK_SIZE_MB16X16)
-#else
- (mode == I8X8_PRED || mode == SPLITMV)
-#endif
- )
+ (mi->mbmi.sb_type < BLOCK_SIZE_MB16X16))
vp9_loop_filter_bv8x8(y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, &lfi);
else
@@ -322,7 +305,7 @@ static void lpf_sb32(VP9_COMMON *cm, const MODE_INFO *mode_info_context,
y_only? 0 : v_ptr,
y_stride, uv_stride, dering);
// process 2nd MB top-right
- mi = mode_info_context + (1 << CONFIG_SB8X8);
+ mi = mode_info_context + 2;
do_left_v = !(wbl >= 3 /* 32x16 or >=32x32 */ && (tx_size >= TX_32X32 ||
sb_mb_lf_skip(mode_info_context, mi)));
do_above_h = (mb_row > 0);
@@ -338,7 +321,7 @@ static void lpf_sb32(VP9_COMMON *cm, const MODE_INFO *mode_info_context,
y_stride, uv_stride, dering);
// process 3rd MB bottom-left
- mi = mode_info_context + (mis << CONFIG_SB8X8);
+ mi = mode_info_context + (mis << 1);
do_left_v = (mb_col > 0);
do_above_h = !(hbl >= 3 /* 16x32 or >=32x32 */ && (tx_size >= TX_32X32 ||
sb_mb_lf_skip(mode_info_context, mi)));
@@ -354,15 +337,15 @@ static void lpf_sb32(VP9_COMMON *cm, const MODE_INFO *mode_info_context,
y_stride, uv_stride, dering);
// process 4th MB bottom right
- mi = mode_info_context + ((mis + 1) << CONFIG_SB8X8);
+ mi = mode_info_context + ((mis + 1) << 1);
do_left_v = !(wbl >= 3 /* 32x16 or >=32x32 */ && (tx_size >= TX_32X32 ||
- sb_mb_lf_skip(mi - (1 << CONFIG_SB8X8), mi)));
+ sb_mb_lf_skip(mi - 2, mi)));
do_above_h = !(hbl >= 3 /* 16x32 or >=32x32 */ && (tx_size >= TX_32X32 ||
- sb_mb_lf_skip(mode_info_context + (1 << CONFIG_SB8X8), mi)));
+ sb_mb_lf_skip(mode_info_context + 2, mi)));
do_left_v_mbuv = (wbl >= 3 /* 32x16 or >=32x32 */ && (tx_size >= TX_16X16 ||
- sb_mb_lf_skip(mi - (1 << CONFIG_SB8X8), mi)));
+ sb_mb_lf_skip(mi - 2, mi)));
do_above_h_mbuv = !(hbl >= 3 /* 16x32 or >=32x32 */ && (tx_size >= TX_16X16 ||
- sb_mb_lf_skip(mode_info_context + (1 << CONFIG_SB8X8), mi)));
+ sb_mb_lf_skip(mode_info_context + 2, mi)));
lpf_mb(cm, mi, do_left_v, do_above_h,
do_left_v_mbuv, do_above_h_mbuv,
y_ptr + 16 * y_stride + 16,
@@ -379,17 +362,16 @@ static void lpf_sb64(VP9_COMMON *cm, const MODE_INFO *mode_info_context,
lpf_sb32(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, y_only, dering);
- lpf_sb32(cm, mode_info_context + (2 << CONFIG_SB8X8), mb_row, mb_col + 2,
+ lpf_sb32(cm, mode_info_context + 4, mb_row, mb_col + 2,
y_ptr + 32, u_ptr + 16, v_ptr + 16,
y_stride, uv_stride, y_only, dering);
- lpf_sb32(cm, mode_info_context + cm->mode_info_stride * (2 << CONFIG_SB8X8),
+ lpf_sb32(cm, mode_info_context + cm->mode_info_stride * 4,
mb_row + 2, mb_col,
y_ptr + 32 * y_stride,
u_ptr + 16 * uv_stride,
v_ptr + 16 * uv_stride,
y_stride, uv_stride, y_only, dering);
- lpf_sb32(cm, mode_info_context + cm->mode_info_stride *
- (2 << CONFIG_SB8X8) + (2 << CONFIG_SB8X8),
+ lpf_sb32(cm, mode_info_context + cm->mode_info_stride * 4 + 4,
mb_row + 2, mb_col + 2,
y_ptr + 32 * y_stride + 32,
u_ptr + 16 * uv_stride + 16,
@@ -459,14 +441,14 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 64;
u_ptr = y_only? 0 : u_ptr + 32;
v_ptr = y_only? 0 : v_ptr + 32;
- mode_info_context += 4 << CONFIG_SB8X8; // step to next SB64
+ mode_info_context += 8; // step to next SB64
}
if (extra_sb32_col) {
// process 2 SB32s in the extra SB32 col
lpf_sb32(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
y_stride, uv_stride, y_only, dering);
- lpf_sb32(cm, mode_info_context + mis * (2 << CONFIG_SB8X8),
+ lpf_sb32(cm, mode_info_context + mis * 4,
mb_row + 2, mb_col,
y_ptr + 32 * y_stride,
u_ptr + 16 * uv_stride,
@@ -475,7 +457,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 32;
u_ptr = y_only? 0 : u_ptr + 16;
v_ptr = y_only? 0 : v_ptr + 16;
- mode_info_context += 2 << CONFIG_SB8X8; // step to next SB32
+ mode_info_context += 4; // step to next SB32
mb_col += 2;
}
if (extra_mb_col) {
@@ -493,7 +475,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_only? 0 : v_ptr,
y_stride, uv_stride, dering);
// process 2nd MB
- mi = mode_info_context + (mis << CONFIG_SB8X8);
+ mi = mode_info_context + (mis << 1);
do_left_v = (mb_col > 0);
do_above_h = 1;
do_left_v_mbuv = 1;
@@ -505,7 +487,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_only ? 0 : (v_ptr + 8 * uv_stride),
y_stride, uv_stride, dering);
// process 3nd MB
- mi = mode_info_context + (mis << CONFIG_SB8X8) * 2;
+ mi = mode_info_context + (mis << 1) * 2;
do_left_v = (mb_col > 0);
do_above_h = 1;
do_left_v_mbuv = 1;
@@ -517,7 +499,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_only ? 0 : (v_ptr + 16 * uv_stride),
y_stride, uv_stride, dering);
// process 4th MB
- mi = mode_info_context + (mis << CONFIG_SB8X8) * 3;
+ mi = mode_info_context + (mis << 1) * 3;
do_left_v = (mb_col > 0);
do_above_h = 1;
do_left_v_mbuv = 1;
@@ -531,7 +513,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 16;
u_ptr = y_only? 0 : u_ptr + 8;
v_ptr = y_only? 0 : v_ptr + 8;
- mode_info_context += 1 << CONFIG_SB8X8; // step to next MB
+ mode_info_context += 2; // step to next MB
}
// move pointers to the begining of next sb64 row
y_ptr += y_stride * 64 - post->y_width;
@@ -540,7 +522,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
v_ptr += uv_stride * 32 - post->uv_width;
}
/* skip to next SB64 row */
- mode_info_context += mis * (4 << CONFIG_SB8X8) - cm->mi_cols;
+ mode_info_context += mis * 8 - cm->mi_cols;
}
if (extra_sb32_row) {
const int sb32_cols = sb64_cols * 2 + extra_sb32_col;
@@ -551,7 +533,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 32;
u_ptr = y_only? 0 : u_ptr + 16;
v_ptr = y_only? 0 : v_ptr + 16;
- mode_info_context += 2 << CONFIG_SB8X8; // step to next SB32
+ mode_info_context += 4; // step to next SB32
}
if (extra_mb_col) {
// process 1st MB
@@ -567,7 +549,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_only? NULL : v_ptr,
y_stride, uv_stride, dering);
// process 2nd MB
- mi = mode_info_context + (mis << CONFIG_SB8X8);
+ mi = mode_info_context + (mis << 1);
do_left_v = (mb_col > 0);
do_above_h = 1;
do_left_v_mbuv = 1;
@@ -581,14 +563,14 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 16;
u_ptr = y_only? 0 : u_ptr + 8;
v_ptr = y_only? 0 : v_ptr + 8;
- mode_info_context += 1 << CONFIG_SB8X8; /* step to next MB */
+ mode_info_context += 2; /* step to next MB */
}
// move pointers to the beginning of next sb64 row
y_ptr += y_stride * 32 - post->y_width;
u_ptr += y_only? 0 : uv_stride * 16 - post->uv_width;
v_ptr += y_only? 0 : uv_stride * 16 - post->uv_width;
// skip to next MB row if exist
- mode_info_context += mis * (2 << CONFIG_SB8X8) - cm->mi_cols;
+ mode_info_context += mis * 4 - cm->mi_cols;
mb_row += 2;
}
if (extra_mb_row) {
@@ -607,7 +589,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm,
y_ptr += 16;
u_ptr = y_only? 0 : u_ptr + 8;
v_ptr = y_only? 0 : v_ptr + 8;
- mode_info_context += 1 << CONFIG_SB8X8; // step to next MB
+ mode_info_context += 2; // step to next MB
}
}
}
diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c
index 7a7ebe64f..3f18c6961 100644
--- a/vp9/common/vp9_mvref_common.c
+++ b/vp9/common/vp9_mvref_common.c
@@ -12,7 +12,6 @@
#define MVREF_NEIGHBOURS 8
-#if CONFIG_SB8X8
static int b_mv_ref_search[MVREF_NEIGHBOURS][2] = {
{0, -1}, {-1, 0}, {-1, -1}, {0, -2},
{-2, 0}, {-1, -2}, {-2, -1}, {-2, -2}
@@ -32,22 +31,6 @@ static int sb64_mv_ref_search[MVREF_NEIGHBOURS][2] = {
{0, -1}, {-1, 0}, {2, -1}, {-1, 2},
{4, -1}, {-1, 4}, {6, -1}, {-1, -1}
};
-#else
-static int mb_mv_ref_search[MVREF_NEIGHBOURS][2] = {
- {0, -1}, {-1, 0}, {-1, -1}, {0, -2},
- {-2, 0}, {-1, -2}, {-2, -1}, {-2, -2}
-};
-
-static int sb_mv_ref_search[MVREF_NEIGHBOURS][2] = {
- {0, -1}, {-1, 0}, {1, -1}, {-1, 1},
- {-1, -1}, {0, -2}, {-2, 0}, {-1, -2}
-};
-
-static int sb64_mv_ref_search[MVREF_NEIGHBOURS][2] = {
- {0, -1}, {-1, 0}, {1, -1}, {-1, 1},
- {2, -1}, {-1, 2}, {3, -1}, {-1, -1}
-};
-#endif
// clamp_mv_ref
#define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units
@@ -190,15 +173,10 @@ void vp9_find_mv_refs(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
mv_ref_search = sb64_mv_ref_search;
} else if (mbmi->sb_type >= BLOCK_SIZE_SB32X32) {
mv_ref_search = sb_mv_ref_search;
-#if CONFIG_SB8X8
} else if (mbmi->sb_type >= BLOCK_SIZE_MB16X16) {
mv_ref_search = mb_mv_ref_search;
} else {
mv_ref_search = b_mv_ref_search;
-#else
- } else {
- mv_ref_search = mb_mv_ref_search;
-#endif
}
// We first scan for candidate vectors that match the current reference frame
@@ -208,7 +186,7 @@ void vp9_find_mv_refs(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) &&
- ((mv_ref_search[i][1] << (7 - CONFIG_SB8X8)) >= xd->mb_to_top_edge)) {
+ ((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge)) {
candidate_mi = here + mv_ref_search[i][0] +
(mv_ref_search[i][1] * xd->mode_info_stride);
@@ -228,7 +206,7 @@ void vp9_find_mv_refs(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) &&
- ((mv_ref_search[i][1] << (7 - CONFIG_SB8X8)) >= xd->mb_to_top_edge)) {
+ ((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge)) {
candidate_mi = here + mv_ref_search[i][0] +
(mv_ref_search[i][1] * xd->mode_info_stride);
@@ -258,7 +236,7 @@ void vp9_find_mv_refs(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) &&
- ((mv_ref_search[i][1] << (7 - CONFIG_SB8X8)) >= xd->mb_to_top_edge)) {
+ ((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge)) {
candidate_mi = here + mv_ref_search[i][0] +
(mv_ref_search[i][1] * xd->mode_info_stride);
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h
index 1538a009b..fe6e14ab5 100644
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -55,13 +55,7 @@ typedef struct frame_contexts {
vp9_prob ymode_prob[VP9_YMODES - 1]; /* interframe intra mode probs */
vp9_prob sb_ymode_prob[VP9_I32X32_MODES - 1];
vp9_prob uv_mode_prob[VP9_YMODES][VP9_UV_MODES - 1];
-#if !CONFIG_SB8X8
- vp9_prob i8x8_mode_prob[VP9_I8X8_MODES - 1];
-#endif
vp9_prob sub_mv_ref_prob[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
-#if !CONFIG_SB8X8
- vp9_prob mbsplit_prob[VP9_NUMMBSPLITS - 1];
-#endif
vp9_prob partition_prob[NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_coeff_probs coef_probs_4x4[BLOCK_TYPES];
@@ -81,25 +75,13 @@ typedef struct frame_contexts {
vp9_prob pre_ymode_prob[VP9_YMODES - 1]; /* interframe intra mode probs */
vp9_prob pre_sb_ymode_prob[VP9_I32X32_MODES - 1];
vp9_prob pre_uv_mode_prob[VP9_YMODES][VP9_UV_MODES - 1];
-#if !CONFIG_SB8X8
- vp9_prob pre_i8x8_mode_prob[VP9_I8X8_MODES - 1];
-#endif
vp9_prob pre_sub_mv_ref_prob[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
-#if !CONFIG_SB8X8
- vp9_prob pre_mbsplit_prob[VP9_NUMMBSPLITS - 1];
-#endif
vp9_prob pre_partition_prob[NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
unsigned int bmode_counts[VP9_NKF_BINTRAMODES];
unsigned int ymode_counts[VP9_YMODES]; /* interframe intra mode probs */
unsigned int sb_ymode_counts[VP9_I32X32_MODES];
unsigned int uv_mode_counts[VP9_YMODES][VP9_UV_MODES];
-#if !CONFIG_SB8X8
- unsigned int i8x8_mode_counts[VP9_I8X8_MODES]; /* interframe intra probs */
-#endif
unsigned int sub_mv_ref_counts[SUBMVREF_COUNT][VP9_SUBMVREFS];
-#if !CONFIG_SB8X8
- unsigned int mbsplit_counts[VP9_NUMMBSPLITS];
-#endif
unsigned int partition_counts[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
vp9_coeff_probs pre_coef_probs_4x4[BLOCK_TYPES];
@@ -204,8 +186,7 @@ typedef struct VP9Common {
int frame_flags;
// MBs, mb_rows/cols is in 16-pixel units; mi_rows/cols is in
- // MODE_INFO units (depending on CONFIG_SB8X8, that is either
- // 16-pixel or 8-pixel)
+ // MODE_INFO (8-pixel) units.
int MBs;
int mb_rows, mi_rows;
int mb_cols, mi_cols;
diff --git a/vp9/common/vp9_recon.c b/vp9/common/vp9_recon.c
index 6b102d1d3..69a47201b 100644
--- a/vp9/common/vp9_recon.c
+++ b/vp9/common/vp9_recon.c
@@ -34,26 +34,6 @@ void vp9_recon_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, int diff_stride,
recon(4, 4, diff_ptr, diff_stride, dst_ptr, stride);
}
-#if !CONFIG_SB8X8
-void vp9_recon_uv_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
- int stride) {
- assert(pred_ptr == dst_ptr);
- recon(4, 4, diff_ptr, 8, dst_ptr, stride);
-}
-
-void vp9_recon4b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
- int stride) {
- assert(pred_ptr == dst_ptr);
- recon(4, 16, diff_ptr, 16, dst_ptr, stride);
-}
-
-void vp9_recon2b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
- int stride) {
- assert(pred_ptr == dst_ptr);
- recon(4, 8, diff_ptr, 8, dst_ptr, stride);
-}
-#endif
-
static void recon_plane(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize, int plane) {
const int bw = 4 << (b_width_log2(bsize) - xd->plane[plane].subsampling_x);
const int bh = 4 << (b_height_log2(bsize) - xd->plane[plane].subsampling_y);
diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c
index 042006354..e39e050c2 100644
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -265,13 +265,8 @@ static INLINE int round_mv_comp_q4(int value) {
return (value < 0 ? value - 2 : value + 2) / 4;
}
-#if CONFIG_SB8X8
#define IDX1 2
#define IDX2 3
-#else
-#define IDX1 4
-#define IDX2 5
-#endif
static int mi_mv_pred_row_q4(MACROBLOCKD *mb, int off, int idx) {
const int temp = mb->mode_info_context->bmi[off + 0].as_mv[idx].as_mv.row +
diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c
index aef34c9b1..d01cfa4e6 100644
--- a/vp9/common/vp9_reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -573,22 +573,6 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd,
xd->left_available, 0 /*xd->right_available*/);
}
-#if !CONFIG_SB8X8
-void vp9_intra8x8_predict(MACROBLOCKD *xd,
- int block4x4_idx,
- int mode,
- uint8_t *predictor, int pre_stride) {
- const int block_idx = (block4x4_idx >> 2) | !!(block4x4_idx & 2);
- const int have_top = (block_idx >> 1) || xd->up_available;
- const int have_left = (block_idx & 1) || xd->left_available;
- const int have_right = !(block_idx & 1) || xd->right_available;
-
- vp9_build_intra_predictors(predictor, pre_stride,
- predictor, pre_stride,
- mode, 8, 8, have_top, have_left,
- have_right);
-}
-#endif
#if !CONFIG_NEWBINTRAMODES
void vp9_intra4x4_predict(MACROBLOCKD *xd,
int block_idx,
@@ -609,19 +593,3 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
have_right);
}
#endif
-#if !CONFIG_SB8X8
-void vp9_intra_uv4x4_predict(MACROBLOCKD *xd,
- int block4x4_idx,
- int mode,
- uint8_t *predictor, int pre_stride) {
- const int block_idx = block4x4_idx & 3;
- const int have_top = (block_idx >> 1) || xd->up_available;
- const int have_left = (block_idx & 1) || xd->left_available;
- const int have_right = !(block_idx & 1);
-
- vp9_build_intra_predictors(predictor, pre_stride,
- predictor, pre_stride,
- mode, 4, 4, have_top, have_left,
- have_right);
-}
-#endif
diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh
index e473d81da..75e36040c 100644
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -63,23 +63,6 @@ specialize vp9_copy_mem8x4 mmx
prototype void vp9_recon_b "uint8_t *pred_ptr, int16_t *diff_ptr, int diff_stride, uint8_t *dst_ptr, int stride"
specialize vp9_recon_b
-if [ "$CONFIG_SB8X8" != "yes" ]; then
-
-prototype void vp9_recon_uv_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
-specialize vp9_recon_uv_b
-
-# TODO(jingning): The prototype functions in c are modified to enable block-size configurable
-# operations. Need to change the sse2 accrodingly.
-prototype void vp9_recon2b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
-specialize vp9_recon2b
-# specialize vp9_recon2b sse2
-
-prototype void vp9_recon4b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
-specialize vp9_recon4b
-# specialize vp9_recon4b sse2
-
-fi
-
prototype void vp9_recon_sb "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize vp9_recon_sb
@@ -101,16 +84,6 @@ specialize vp9_build_intra_predictors_sbuv_s
prototype void vp9_intra4x4_predict "struct macroblockd *xd, int block, enum BLOCK_SIZE_TYPE bsize, int b_mode, uint8_t *predictor, int pre_stride"
specialize vp9_intra4x4_predict;
-if [ "$CONFIG_SB8X8" != "yes" ]; then
-
-prototype void vp9_intra8x8_predict "struct macroblockd *xd, int block, int b_mode, uint8_t *predictor, int pre_stride"
-specialize vp9_intra8x8_predict;
-
-prototype void vp9_intra_uv4x4_predict "struct macroblockd *xd, int block, int b_mode, uint8_t *predictor, int pre_stride"
-specialize vp9_intra_uv4x4_predict;
-
-fi
-
if [ "$CONFIG_VP9_DECODER" = "yes" ]; then
prototype void vp9_add_residual_4x4 "const int16_t *diff, uint8_t *dest, int stride"
specialize vp9_add_residual_4x4 sse2
diff --git a/vp9/common/vp9_tile_common.c b/vp9/common/vp9_tile_common.c
index a9d8cf0ea..ea26289b7 100644
--- a/vp9/common/vp9_tile_common.c
+++ b/vp9/common/vp9_tile_common.c
@@ -18,16 +18,12 @@
static void vp9_get_tile_offsets(VP9_COMMON *cm, int *min_tile_off,
int *max_tile_off, int tile_idx,
int log2_n_tiles, int n_mis) {
-#if CONFIG_SB8X8
const int n_sbs = (n_mis + 7) >> 3;
-#else
- const int n_sbs = (n_mis + 3) >> 2;
-#endif
const int sb_off1 = (tile_idx * n_sbs) >> log2_n_tiles;
const int sb_off2 = ((tile_idx + 1) * n_sbs) >> log2_n_tiles;
- *min_tile_off = MIN(sb_off1 << (2 + CONFIG_SB8X8), n_mis);
- *max_tile_off = MIN(sb_off2 << (2 + CONFIG_SB8X8), n_mis);
+ *min_tile_off = MIN(sb_off1 << 3, n_mis);
+ *max_tile_off = MIN(sb_off2 << 3, n_mis);
}
void vp9_get_tile_col_offsets(VP9_COMMON *cm, int tile_col_idx) {