Enable Hadamard transform based cost estimate for all block sizes
This commit turns on the Hadamard transform based rate distortion estimate for all block sizes in RTC coding mode. It conditionally skips the rate distortion estimation if all zero block flag is set on. No significant encoding speed change is observed. The compression performance of speed -6 is improved by 1.7% over using it only for block sizes of 32x32 and below. Change-Id: I768145e6f05c737b05b5b5f1ee674e929532cafb
This commit is contained in:
parent
60e01c6530
commit
9922e4344a
@ -676,9 +676,11 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, int *rate, int64_t *dist,
|
||||
}
|
||||
}
|
||||
|
||||
if (*skippable == 0) {
|
||||
*rate <<= 10;
|
||||
*rate += (eob_cost << 8);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void model_rd_for_sb_uv(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
@ -906,18 +908,10 @@ static void estimate_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
||||
i, j, 0);
|
||||
|
||||
// TODO(jingning): This needs further refactoring.
|
||||
if (plane_bsize <= BLOCK_32X32) {
|
||||
block_yrd(cpi, x, &rate, &dist, &is_skippable, &this_sse, 0,
|
||||
bsize_tx, MIN(tx_size, TX_16X16));
|
||||
x->skip_txfm[0] = is_skippable;
|
||||
if (is_skippable)
|
||||
rate = vp9_cost_bit(vp9_get_skip_prob(&cpi->common, xd), 1);
|
||||
else
|
||||
rate += vp9_cost_bit(vp9_get_skip_prob(&cpi->common, xd), 0);
|
||||
} else {
|
||||
unsigned int var_y, sse_y;
|
||||
model_rd_for_sb_y(cpi, bsize_tx, x, xd, &rate, &dist, &var_y, &sse_y);
|
||||
}
|
||||
rate += vp9_cost_bit(vp9_get_skip_prob(&cpi->common, xd), is_skippable);
|
||||
|
||||
p->src.buf = src_buf_base;
|
||||
pd->dst.buf = dst_buf_base;
|
||||
@ -1342,13 +1336,12 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc.rate, &this_rdc.dist,
|
||||
&var_y, &sse_y);
|
||||
}
|
||||
|
||||
this_rdc.rate +=
|
||||
cm->interp_filter == SWITCHABLE ?
|
||||
vp9_get_switchable_rate(cpi, xd) : 0;
|
||||
}
|
||||
|
||||
if (bsize <= BLOCK_32X32) {
|
||||
if (!this_early_term) {
|
||||
this_sse = (int64_t)sse_y;
|
||||
block_yrd(cpi, x, &this_rdc.rate, &this_rdc.dist, &is_skippable,
|
||||
&this_sse, 0, bsize, MIN(mbmi->tx_size, TX_16X16));
|
||||
@ -1370,6 +1363,8 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
if ((mbmi->mv[0].as_mv.row | mbmi->mv[0].as_mv.col) & 0x07)
|
||||
this_rdc.rate += vp9_get_switchable_rate(cpi, xd);
|
||||
}
|
||||
} else {
|
||||
this_rdc.rate += vp9_cost_bit(vp9_get_skip_prob(cm, xd), 1);
|
||||
}
|
||||
|
||||
if (x->color_sensitivity[0] || x->color_sensitivity[1]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user