summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-02-05 17:13:25 -0800
committerJingning Han <jingning@google.com>2015-02-06 08:52:52 -0800
commitb2762a8853762a7f13bbf084ae1ae99992013ce2 (patch)
treea4ae18f75615eb04a415a36a669428d318c01885 /vp9
parenta5a5b115b104db4c950780f502f2e1cfd0d4e390 (diff)
downloadlibvpx-b2762a8853762a7f13bbf084ae1ae99992013ce2.tar
libvpx-b2762a8853762a7f13bbf084ae1ae99992013ce2.tar.gz
libvpx-b2762a8853762a7f13bbf084ae1ae99992013ce2.tar.bz2
libvpx-b2762a8853762a7f13bbf084ae1ae99992013ce2.zip
Re-arrange inter mode search order in RTC coding flow
This commit makes the ZEROMV mode first in the search order to ensure that the zero mv is always checked in the RTC coding mode. It improves the average speed -6 compression performance by 0.3% in both PSNR and SSIM at no visible speed change. Change-Id: I465a7e59f4e20cd84fee3f02ced6f98036945949
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_pickmode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index a34b12258..70e90b6e7 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -573,6 +573,10 @@ void vp9_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *rd_cost,
*rd_cost = best_rdc;
}
+static const PREDICTION_MODE inter_mode_set[INTER_MODES] = {
+ ZEROMV, NEARESTMV, NEARMV, NEWMV,
+};
+
// TODO(jingning) placeholder for inter-frame non-RD mode decision.
// this needs various further optimizations. to be continued..
void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
@@ -732,10 +736,12 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
mbmi->ref_frame[0] = ref_frame;
set_ref_ptrs(cm, xd, ref_frame, NONE);
- for (this_mode = NEARESTMV; this_mode <= NEWMV; ++this_mode) {
+ for (i = 0; i < INTER_MODES; ++i) {
int rate_mv = 0;
int mode_rd_thresh;
- int mode_index = mode_idx[ref_frame][INTER_OFFSET(this_mode)];
+ int mode_index;
+ this_mode = inter_mode_set[i];
+ mode_index = mode_idx[ref_frame][INTER_OFFSET(this_mode)];
if (const_motion[ref_frame] && this_mode == NEARMV)
continue;