shithub: libvpx

Download patch

ref: e8b7610e8f064b01caf1ac607db744b379692c3d
parent: 356a7e96420c297d87fad5c00640ddc2ea0556c3
author: Jingning Han <jingning@google.com>
date: Mon Feb 10 07:54:56 EST 2014

Use INTER_OFFSET in vp9_pick_inter_mode

Cosmetic change to use pre-defined macros.

Change-Id: I93e9fa90113d0242599048940b39694660385a6f

--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -89,7 +89,6 @@
 
 #define INTER_OFFSET(mode) ((mode) - NEARESTMV)
 
-
 /* For keyframes, intra block modes are predicted by the (already decoded)
    modes for the Y blocks to the left and above us; for interframes, there
    is a single probability table. */
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -199,7 +199,7 @@
     clamp_mv2(&frame_mv[NEARMV][ref_frame].as_mv, xd);
 
     for (this_mode = NEARESTMV; this_mode <= NEWMV; ++this_mode) {
-      int rate = cost[this_mode - NEARESTMV];
+      int rate = cost[INTER_OFFSET(this_mode)];
       int64_t dist;
 
       if (this_mode == NEWMV) {