ref: 9922e4344a40a147abab06f16c7a9d9403d1a33b
parent: 60e01c65302d08e3e8c5b7f22a111b003545dc34
author: Jingning Han <[email protected]>
date: Fri Apr 3 07:33:24 EDT 2015
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
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -676,8 +676,10 @@
}
}
- *rate <<= 10;
- *rate += (eob_cost << 8);
+ if (*skippable == 0) {
+ *rate <<= 10;
+ *rate += (eob_cost << 8);
+ }
}
#endif
@@ -906,18 +908,10 @@
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);
- }
+ block_yrd(cpi, x, &rate, &dist, &is_skippable, &this_sse, 0,
+ bsize_tx, MIN(tx_size, TX_16X16));
+ x->skip_txfm[0] = is_skippable;
+ 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 @@
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 @@
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]) {