summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-02-25 16:12:35 -0800
committerJingning Han <jingning@google.com>2014-02-25 16:29:20 -0800
commitc0e99f84f9c2ff909020a7ce76f60d1f78b56fc7 (patch)
tree4f8777a6aec2099aa317188bdc6e97715816fbce /vp9
parentfd49e9678e61f6660c9d59fb84b1a7bcc74cfcfe (diff)
downloadlibvpx-c0e99f84f9c2ff909020a7ce76f60d1f78b56fc7.tar
libvpx-c0e99f84f9c2ff909020a7ce76f60d1f78b56fc7.tar.gz
libvpx-c0e99f84f9c2ff909020a7ce76f60d1f78b56fc7.tar.bz2
libvpx-c0e99f84f9c2ff909020a7ce76f60d1f78b56fc7.zip
Use sub-pixel accuracy prediction non-RD mode
This commit builds the actual prediction block in sub-pixel accuracy and uses which to calculate SAD for non-RD mode decision. In the trail run on pedestrian_area at 1080p, rtc speed -7 runtime goes from 23495 ms -> 25107 ms (7% slower). The compression performance is improved by 20.57% for rtc test set. Change-Id: I438589cd103fe99f1b50c2d1939ac6ca43fa0157
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_pickmode.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 7e1bcd45a..0d0dc0cc7 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -183,6 +183,8 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize) {
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO *mbmi = &xd->mi_8x8[0]->mbmi;
+ struct macroblock_plane *const p = &x->plane[0];
+ struct macroblockd_plane *const pd = &xd->plane[0];
const BLOCK_SIZE block_size = get_plane_block_size(bsize, &xd->plane[0]);
MB_PREDICTION_MODE this_mode, best_mode = ZEROMV;
MV_REFERENCE_FRAME ref_frame, best_ref_frame = LAST_FRAME;
@@ -255,7 +257,14 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
continue;
}
- dist = x->mode_sad[ref_frame][INTER_OFFSET(this_mode)];
+ mbmi->mode = this_mode;
+ mbmi->mv[0].as_int = frame_mv[this_mode][ref_frame].as_int;
+
+ vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
+
+ dist = cpi->fn_ptr[bsize].sdf(p->src.buf, p->src.stride,
+ pd->dst.buf, pd->dst.stride, INT_MAX);
+
this_rd = rate + dist;
if (this_rd < best_rd) {
@@ -274,8 +283,6 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Perform intra prediction search, if the best SAD is above a certain
// threshold.
if (best_rd > inter_mode_thresh) {
- struct macroblock_plane *const p = &x->plane[0];
- struct macroblockd_plane *const pd = &xd->plane[0];
for (this_mode = DC_PRED; this_mode <= DC_PRED; ++this_mode) {
vp9_predict_intra_block(xd, 0, b_width_log2(bsize),
mbmi->tx_size, this_mode,