Add building blocks for partition down to 4x4
Macro ab4x4 contains experiments for recursive partition down to 4x4 block size. Change-Id: Ic727842fa98a4df9fd51e0025a545dc76a5c76c1
This commit is contained in:
parent
776c1482a3
commit
cf8b5a09ed
1
configure
vendored
1
configure
vendored
@ -250,6 +250,7 @@ EXPERIMENT_LIST="
|
||||
multiple_arf
|
||||
code_zerogroup
|
||||
non420
|
||||
ab4x4
|
||||
"
|
||||
CONFIG_LIST="
|
||||
external_build
|
||||
|
@ -192,7 +192,13 @@ typedef enum {
|
||||
|
||||
static INLINE int b_width_log2(BLOCK_SIZE_TYPE sb_type) {
|
||||
switch (sb_type) {
|
||||
#if CONFIG_AB4X4
|
||||
case BLOCK_SIZE_SB4X8:
|
||||
#endif
|
||||
case BLOCK_SIZE_AB4X4: return 0;
|
||||
#if CONFIG_AB4X4
|
||||
case BLOCK_SIZE_SB8X4:
|
||||
#endif
|
||||
case BLOCK_SIZE_SB8X8:
|
||||
case BLOCK_SIZE_SB8X16: return 1;
|
||||
case BLOCK_SIZE_SB16X8:
|
||||
@ -209,7 +215,13 @@ 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) {
|
||||
#if CONFIG_AB4X4
|
||||
case BLOCK_SIZE_SB8X4:
|
||||
#endif
|
||||
case BLOCK_SIZE_AB4X4: return 0;
|
||||
#if CONFIG_AB4X4
|
||||
case BLOCK_SIZE_SB4X8:
|
||||
#endif
|
||||
case BLOCK_SIZE_SB8X8:
|
||||
case BLOCK_SIZE_SB16X8: return 1;
|
||||
case BLOCK_SIZE_SB8X16:
|
||||
|
@ -20,6 +20,10 @@
|
||||
|
||||
typedef enum BLOCK_SIZE_TYPE {
|
||||
BLOCK_SIZE_AB4X4,
|
||||
#if CONFIG_AB4X4
|
||||
BLOCK_SIZE_SB4X8,
|
||||
BLOCK_SIZE_SB8X4,
|
||||
#endif
|
||||
BLOCK_SIZE_SB8X8,
|
||||
BLOCK_SIZE_SB8X16,
|
||||
BLOCK_SIZE_SB16X8,
|
||||
|
@ -2229,7 +2229,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
|
||||
|
||||
if (pred_exists) {
|
||||
// FIXME(rbultje): mb code still predicts into xd->predictor
|
||||
for (i = 0; i < bh * MI_SIZE; ++i)
|
||||
vpx_memcpy(xd->plane[0].dst.buf + i * xd->plane[0].dst.stride,
|
||||
tmp_ybuf + i * bw * MI_SIZE,
|
||||
@ -2264,17 +2263,11 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
if (threshold < x->encode_breakout)
|
||||
threshold = x->encode_breakout;
|
||||
|
||||
if (bsize != BLOCK_SIZE_MB16X16) {
|
||||
var = cpi->fn_ptr[block_size].vf(x->plane[0].src.buf,
|
||||
x->plane[0].src.stride,
|
||||
xd->plane[0].dst.buf,
|
||||
xd->plane[0].dst.stride,
|
||||
&sse);
|
||||
} else {
|
||||
var = vp9_variance16x16(x->plane[0].src.buf, x->plane[0].src.stride,
|
||||
xd->plane[0].dst.buf, xd->plane[0].dst.stride,
|
||||
&sse);
|
||||
}
|
||||
var = cpi->fn_ptr[block_size].vf(x->plane[0].src.buf,
|
||||
x->plane[0].src.stride,
|
||||
xd->plane[0].dst.buf,
|
||||
xd->plane[0].dst.stride,
|
||||
&sse);
|
||||
|
||||
if ((int)sse < threshold) {
|
||||
unsigned int q2dc = xd->plane[0].dequant[0];
|
||||
@ -2284,29 +2277,16 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
(sse / 2 > var && sse - var < 64)) {
|
||||
// Check u and v to make sure skip is ok
|
||||
int sse2;
|
||||
|
||||
if (bsize != BLOCK_SIZE_MB16X16) {
|
||||
unsigned int sse2u, sse2v;
|
||||
// FIXME(rbultje): mb predictors predict into xd->predictor
|
||||
var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf,
|
||||
x->plane[1].src.stride,
|
||||
xd->plane[1].dst.buf,
|
||||
xd->plane[1].dst.stride, &sse2u);
|
||||
var = cpi->fn_ptr[uv_block_size].vf(x->plane[2].src.buf,
|
||||
x->plane[1].src.stride,
|
||||
xd->plane[2].dst.buf,
|
||||
xd->plane[1].dst.stride, &sse2v);
|
||||
sse2 = sse2u + sse2v;
|
||||
} else {
|
||||
unsigned int sse2u, sse2v;
|
||||
var = vp9_variance8x8(x->plane[1].src.buf, x->plane[1].src.stride,
|
||||
xd->plane[1].dst.buf, xd->plane[1].dst.stride,
|
||||
&sse2u);
|
||||
var = vp9_variance8x8(x->plane[2].src.buf, x->plane[1].src.stride,
|
||||
xd->plane[2].dst.buf, xd->plane[1].dst.stride,
|
||||
&sse2v);
|
||||
sse2 = sse2u + sse2v;
|
||||
}
|
||||
unsigned int sse2u, sse2v;
|
||||
var = cpi->fn_ptr[uv_block_size].vf(x->plane[1].src.buf,
|
||||
x->plane[1].src.stride,
|
||||
xd->plane[1].dst.buf,
|
||||
xd->plane[1].dst.stride, &sse2u);
|
||||
var = cpi->fn_ptr[uv_block_size].vf(x->plane[2].src.buf,
|
||||
x->plane[1].src.stride,
|
||||
xd->plane[2].dst.buf,
|
||||
xd->plane[1].dst.stride, &sse2v);
|
||||
sse2 = sse2u + sse2v;
|
||||
|
||||
if (sse2 * 2 < threshold) {
|
||||
x->skip = 1;
|
||||
@ -2622,14 +2602,10 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
mbmi->interp_filter = cm->mcomp_filter_type;
|
||||
vp9_setup_interp_filters(xd, mbmi->interp_filter, &cpi->common);
|
||||
|
||||
// if (!(cpi->ref_frame_flags & flag_list[ref_frame]))
|
||||
// continue;
|
||||
|
||||
if (bsize != BLOCK_SIZE_SB8X8 &&
|
||||
(this_mode == I4X4_PRED || this_mode == SPLITMV))
|
||||
continue;
|
||||
// if (vp9_mode_order[mode_index].second_ref_frame == INTRA_FRAME)
|
||||
// continue;
|
||||
|
||||
|
||||
if (comp_pred) {
|
||||
if (ref_frame == ALTREF_FRAME) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user