summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp9/common/vp9_blockd.h26
-rw-r--r--vp9/common/vp9_common_data.c49
-rw-r--r--vp9/encoder/vp9_encodeframe.c52
-rw-r--r--vp9/encoder/vp9_onyx_if.c8
-rw-r--r--vp9/encoder/vp9_onyx_int.h4
-rw-r--r--vp9/encoder/vp9_segmentation.c12
6 files changed, 73 insertions, 78 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index 70e3032b8..99272769a 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -283,22 +283,22 @@ typedef struct macroblockd {
static INLINE unsigned char *get_sb_index(MACROBLOCKD *xd, BLOCK_SIZE_TYPE subsize) {
switch (subsize) {
- case BLOCK_SIZE_SB64X64:
- case BLOCK_SIZE_SB64X32:
- case BLOCK_SIZE_SB32X64:
- case BLOCK_SIZE_SB32X32:
+ case BLOCK_64X64:
+ case BLOCK_64X32:
+ case BLOCK_32X64:
+ case BLOCK_32X32:
return &xd->sb_index;
- case BLOCK_SIZE_SB32X16:
- case BLOCK_SIZE_SB16X32:
- case BLOCK_SIZE_MB16X16:
+ case BLOCK_32X16:
+ case BLOCK_16X32:
+ case BLOCK_16X16:
return &xd->mb_index;
- case BLOCK_SIZE_SB16X8:
- case BLOCK_SIZE_SB8X16:
- case BLOCK_SIZE_SB8X8:
+ case BLOCK_16X8:
+ case BLOCK_8X16:
+ case BLOCK_8X8:
return &xd->b_index;
- case BLOCK_SIZE_SB8X4:
- case BLOCK_SIZE_SB4X8:
- case BLOCK_SIZE_AB4X4:
+ case BLOCK_8X4:
+ case BLOCK_4X8:
+ case BLOCK_4X4:
return &xd->ab_index;
default:
assert(0);
diff --git a/vp9/common/vp9_common_data.c b/vp9/common/vp9_common_data.c
index d27264696..f2c591119 100644
--- a/vp9/common/vp9_common_data.c
+++ b/vp9/common/vp9_common_data.c
@@ -76,29 +76,29 @@ const PARTITION_TYPE partition_lookup[][BLOCK_SIZE_TYPES] = {
const BLOCK_SIZE_TYPE subsize_lookup[PARTITION_TYPES][BLOCK_SIZE_TYPES] = {
{ // PARTITION_NONE
- BLOCK_SIZE_AB4X4, BLOCK_SIZE_SB4X8, BLOCK_SIZE_SB8X4,
- BLOCK_SIZE_SB8X8, BLOCK_SIZE_SB8X16, BLOCK_SIZE_SB16X8,
- BLOCK_SIZE_MB16X16, BLOCK_SIZE_SB16X32, BLOCK_SIZE_SB32X16,
- BLOCK_SIZE_SB32X32, BLOCK_SIZE_SB32X64, BLOCK_SIZE_SB64X32,
- BLOCK_SIZE_SB64X64,
+ BLOCK_4X4, BLOCK_4X8, BLOCK_8X4,
+ BLOCK_8X8, BLOCK_8X16, BLOCK_16X8,
+ BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
+ BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
+ BLOCK_64X64,
}, { // PARTITION_HORZ
BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB8X4, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB16X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB32X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB64X32,
+ BLOCK_8X4, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_16X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_32X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_64X32,
}, { // PARTITION_VERT
BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB4X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB8X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB16X32, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB32X64,
+ BLOCK_4X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_8X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_16X32, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_32X64,
}, { // PARTITION_SPLIT
BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_AB4X4, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB8X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_MB16X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
- BLOCK_SIZE_SB32X32,
+ BLOCK_4X4, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_8X8, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_16X16, BLOCK_SIZE_TYPES, BLOCK_SIZE_TYPES,
+ BLOCK_32X32,
}
};
@@ -116,14 +116,9 @@ const TX_SIZE max_uv_txsize_lookup[BLOCK_SIZE_TYPES] = {
};
const BLOCK_SIZE_TYPE bsize_from_dim_lookup[5][5] = {
- {BLOCK_SIZE_AB4X4, BLOCK_SIZE_SB4X8, BLOCK_SIZE_SB4X8,
- BLOCK_SIZE_SB4X8, BLOCK_SIZE_SB4X8},
- {BLOCK_SIZE_SB8X4, BLOCK_SIZE_SB8X8, BLOCK_SIZE_SB8X16,
- BLOCK_SIZE_SB8X16, BLOCK_SIZE_SB8X16},
- {BLOCK_SIZE_SB16X8, BLOCK_SIZE_SB16X8, BLOCK_SIZE_MB16X16,
- BLOCK_SIZE_SB16X32, BLOCK_SIZE_SB16X32},
- {BLOCK_SIZE_SB32X16, BLOCK_SIZE_SB32X16, BLOCK_SIZE_SB32X16,
- BLOCK_SIZE_SB32X32, BLOCK_SIZE_SB32X64},
- {BLOCK_SIZE_SB64X32, BLOCK_SIZE_SB64X32, BLOCK_SIZE_SB64X32,
- BLOCK_SIZE_SB64X32, BLOCK_SIZE_SB64X64}
+ { BLOCK_4X4, BLOCK_4X8, BLOCK_4X8, BLOCK_4X8, BLOCK_4X8 },
+ { BLOCK_8X4, BLOCK_8X8, BLOCK_8X16, BLOCK_8X16, BLOCK_8X16 },
+ { BLOCK_16X8, BLOCK_16X8, BLOCK_16X16, BLOCK_16X32, BLOCK_16X32 },
+ { BLOCK_32X16, BLOCK_32X16, BLOCK_32X16, BLOCK_32X32, BLOCK_32X64 },
+ { BLOCK_64X32, BLOCK_64X32, BLOCK_64X32, BLOCK_64X32, BLOCK_64X64 }
};
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 1b63dea2d..bdaf4b989 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -639,31 +639,31 @@ static PICK_MODE_CONTEXT *get_block_context(MACROBLOCK *x,
MACROBLOCKD * const xd = &x->e_mbd;
switch (bsize) {
- case BLOCK_SIZE_SB64X64:
+ case BLOCK_64X64:
return &x->sb64_context;
- case BLOCK_SIZE_SB64X32:
+ case BLOCK_64X32:
return &x->sb64x32_context[xd->sb_index];
- case BLOCK_SIZE_SB32X64:
+ case BLOCK_32X64:
return &x->sb32x64_context[xd->sb_index];
- case BLOCK_SIZE_SB32X32:
+ case BLOCK_32X32:
return &x->sb32_context[xd->sb_index];
- case BLOCK_SIZE_SB32X16:
+ case BLOCK_32X16:
return &x->sb32x16_context[xd->sb_index][xd->mb_index];
- case BLOCK_SIZE_SB16X32:
+ case BLOCK_16X32:
return &x->sb16x32_context[xd->sb_index][xd->mb_index];
- case BLOCK_SIZE_MB16X16:
+ case BLOCK_16X16:
return &x->mb_context[xd->sb_index][xd->mb_index];
- case BLOCK_SIZE_SB16X8:
+ case BLOCK_16X8:
return &x->sb16x8_context[xd->sb_index][xd->mb_index][xd->b_index];
- case BLOCK_SIZE_SB8X16:
+ case BLOCK_8X16:
return &x->sb8x16_context[xd->sb_index][xd->mb_index][xd->b_index];
- case BLOCK_SIZE_SB8X8:
+ case BLOCK_8X8:
return &x->sb8x8_context[xd->sb_index][xd->mb_index][xd->b_index];
- case BLOCK_SIZE_SB8X4:
+ case BLOCK_8X4:
return &x->sb8x4_context[xd->sb_index][xd->mb_index][xd->b_index];
- case BLOCK_SIZE_SB4X8:
+ case BLOCK_4X8:
return &x->sb4x8_context[xd->sb_index][xd->mb_index][xd->b_index];
- case BLOCK_SIZE_AB4X4:
+ case BLOCK_4X4:
return &x->ab4x4_context[xd->sb_index][xd->mb_index][xd->b_index];
default:
assert(0);
@@ -675,13 +675,13 @@ static BLOCK_SIZE_TYPE *get_sb_partitioning(MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
MACROBLOCKD *xd = &x->e_mbd;
switch (bsize) {
- case BLOCK_SIZE_SB64X64:
+ case BLOCK_64X64:
return &x->sb64_partitioning;
- case BLOCK_SIZE_SB32X32:
+ case BLOCK_32X32:
return &x->sb_partitioning[xd->sb_index];
- case BLOCK_SIZE_MB16X16:
+ case BLOCK_16X16:
return &x->mb_partitioning[xd->sb_index][xd->mb_index];
- case BLOCK_SIZE_SB8X8:
+ case BLOCK_8X8:
return &x->b_partitioning[xd->sb_index][xd->mb_index][xd->b_index];
default:
assert(0);
@@ -926,28 +926,28 @@ typedef enum {
static void tree_to_node(void *data, BLOCK_SIZE_TYPE block_size, vt_node *node) {
int i;
switch (block_size) {
- case BLOCK_SIZE_SB64X64: {
+ case BLOCK_64X64: {
v64x64 *vt = (v64x64 *) data;
node->vt = &vt->vt;
for (i = 0; i < 4; i++)
node->split[i] = &vt->split[i].vt.none;
break;
}
- case BLOCK_SIZE_SB32X32: {
+ case BLOCK_32X32: {
v32x32 *vt = (v32x32 *) data;
node->vt = &vt->vt;
for (i = 0; i < 4; i++)
node->split[i] = &vt->split[i].vt.none;
break;
}
- case BLOCK_SIZE_MB16X16: {
+ case BLOCK_16X16: {
v16x16 *vt = (v16x16 *) data;
node->vt = &vt->vt;
for (i = 0; i < 4; i++)
node->split[i] = &vt->split[i].vt.none;
break;
}
- case BLOCK_SIZE_SB8X8: {
+ case BLOCK_8X8: {
v8x8 *vt = (v8x8 *) data;
node->vt = &vt->vt;
for (i = 0; i < 4; i++)
@@ -1585,14 +1585,14 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
int use_8x8 = 1;
if (cm->frame_type && !cpi->is_src_frame_alt_ref &&
- ((use_8x8 && bsize == BLOCK_SIZE_MB16X16) ||
- bsize == BLOCK_SIZE_SB32X32 || bsize == BLOCK_SIZE_SB64X64)) {
+ ((use_8x8 && bsize == BLOCK_16X16) ||
+ bsize == BLOCK_32X32 || bsize == BLOCK_64X64)) {
int ref0 = 0, ref1 = 0, ref2 = 0, ref3 = 0;
PICK_MODE_CONTEXT *block_context = NULL;
- if (bsize == BLOCK_SIZE_MB16X16) {
+ if (bsize == BLOCK_16X16) {
block_context = x->sb8x8_context[xd->sb_index][xd->mb_index];
- } else if (bsize == BLOCK_SIZE_SB32X32) {
+ } else if (bsize == BLOCK_32X32) {
block_context = x->mb_context[xd->sb_index];
} else if (bsize == BLOCK_SIZE_SB64X64) {
block_context = x->sb32_context;
@@ -1671,7 +1671,7 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
}
}
- if (!cpi->sf.use_max_partition_size ||
+ if (!cpi->sf.auto_min_max_partition_size ||
bsize <= cpi->sf.max_partition_size) {
int larger_is_better = 0;
// PARTITION_NONE
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 67bb1c869..57584526e 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -736,9 +736,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->auto_min_max_partition_size = 0;
sf->auto_min_max_partition_interval = 0;
sf->auto_min_max_partition_count = 0;
- sf->use_max_partition_size = 0;
+ // sf->use_max_partition_size = 0;
sf->max_partition_size = BLOCK_64X64;
- sf->use_min_partition_size = 0;
+ // sf->use_min_partition_size = 0;
sf->min_partition_size = BLOCK_4X4;
sf->adjust_partitioning_from_last_frame = 0;
sf->last_partitioning_redo_frequency = 4;
@@ -797,8 +797,8 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->auto_mv_step_size = 1;
sf->auto_min_max_partition_size = 1;
- sf->use_max_partition_size = 1;
- sf->use_min_partition_size = 1;
+ // sf->use_max_partition_size = 1;
+ // sf->use_min_partition_size = 1;
sf->auto_min_max_partition_interval = 1;
}
if (speed == 2) {
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index f4d8db4e1..4529ff083 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -261,10 +261,10 @@ typedef struct {
int auto_min_max_partition_size;
int auto_min_max_partition_interval;
int auto_min_max_partition_count;
- int use_min_partition_size;
BLOCK_SIZE_TYPE min_partition_size;
- int use_max_partition_size;
BLOCK_SIZE_TYPE max_partition_size;
+ // int use_min_partition_size; // not used in code
+ // int use_max_partition_size;
int adjust_partitioning_from_last_frame;
int last_partitioning_redo_frequency;
int disable_splitmv;
diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c
index e81aca429..e1fa72d0d 100644
--- a/vp9/encoder/vp9_segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -188,13 +188,13 @@ static void count_segs_sb(VP9_COMP *cpi, MODE_INFO *mi,
int n;
assert(bwl < bsl && bhl < bsl);
- if (bsize == BLOCK_SIZE_SB64X64) {
- subsize = BLOCK_SIZE_SB32X32;
- } else if (bsize == BLOCK_SIZE_SB32X32) {
- subsize = BLOCK_SIZE_MB16X16;
+ if (bsize == BLOCK_64X64) {
+ subsize = BLOCK_32X32;
+ } else if (bsize == BLOCK_32X32) {
+ subsize = BLOCK_16X16;
} else {
- assert(bsize == BLOCK_SIZE_MB16X16);
- subsize = BLOCK_SIZE_SB8X8;
+ assert(bsize == BLOCK_16X16);
+ subsize = BLOCK_8X8;
}
for (n = 0; n < 4; n++) {