summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_pickmode.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-02-26 09:52:23 -0800
committerJingning Han <jingning@google.com>2014-02-26 11:17:51 -0800
commitc30d5703e5078337b7e01213145ae758d74df450 (patch)
tree8b0f3dfe58ea477a7116f551ae6abf3745eecbd6 /vp9/encoder/vp9_pickmode.c
parent288663e7008f397395c6889e26485771e84fd3c5 (diff)
downloadlibvpx-c30d5703e5078337b7e01213145ae758d74df450.tar
libvpx-c30d5703e5078337b7e01213145ae758d74df450.tar.gz
libvpx-c30d5703e5078337b7e01213145ae758d74df450.tar.bz2
libvpx-c30d5703e5078337b7e01213145ae758d74df450.zip
Run sub-pixel motion search for NEWMV mode test
As Yunqing suggested, this commit makes non-RD mode decision always run sub-pixel motion search in NEWMV mode. The compression performance gains becomes fairly significant after we enabled sub-pixel accuracy motion compensated prediction to calculate SAD cost. For test sequences pedestrian_area at 1080p and vidyo1 at 720p, the runtime goes slower by 5%. For rtc test set, the compression performance is improved by 21.20%. Change-Id: I38cbfdd5c53d79423e1fafb3154f8ddeed63bbf0
Diffstat (limited to 'vp9/encoder/vp9_pickmode.c')
-rw-r--r--vp9/encoder/vp9_pickmode.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 0d0dc0cc7..82d5c9231 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -249,22 +249,26 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
int64_t dist;
if (this_mode == NEWMV) {
+ if (this_rd < 500)
+ continue;
+
x->mode_sad[ref_frame][INTER_OFFSET(NEWMV)] =
full_pixel_motion_search(cpi, x, tile, bsize, mi_row, mi_col,
&frame_mv[NEWMV][ref_frame], &rate_mv);
if (frame_mv[NEWMV][ref_frame].as_int == INVALID_MV)
continue;
+
+ sub_pixel_motion_search(cpi, x, tile, bsize, mi_row, mi_col,
+ &frame_mv[NEWMV][ref_frame]);
}
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) {
@@ -303,14 +307,5 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
}
- // Perform sub-pixel motion search, if NEWMV is chosen
- if (mbmi->mode == NEWMV) {
- ref_frame = mbmi->ref_frame[0];
- sub_pixel_motion_search(cpi, x, tile, bsize, mi_row, mi_col,
- &frame_mv[NEWMV][ref_frame]);
- mbmi->mv[0].as_int = frame_mv[NEWMV][ref_frame].as_int;
- xd->mi_8x8[0]->bmi[0].as_mv[0].as_int = mbmi->mv[0].as_int;
- }
-
return INT64_MAX;
}