shithub: libvpx

Download patch

ref: f7ece831415d195d7a849592bd8e9c8047ff5a5b
parent: 9f8335d091821026735c6ef5212af68a449886da
parent: 0064958c71e0c234cb7715c9e20e363bacede894
author: Dmitry Kovalev <dkovalev@google.com>
date: Thu Jul 25 08:45:23 EDT 2013

Merge "Inlining inc_mv_component_count function."

--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -107,12 +107,6 @@
   return mv_class_base(c) + offset;
 }
 
-static void inc_mv_component_count(int v, nmv_component_counts *comp_counts,
-                                   int incr) {
-  assert (v != 0);
-  comp_counts->mvcount[MV_MAX + v] += incr;
-}
-
 static void inc_mv_component(int v, nmv_component_counts *comp_counts,
                              int incr, int usehp) {
   int s, z, c, o, d, e, f;
@@ -164,14 +158,15 @@
   }
 }
 
-void vp9_inc_mv(const MV *mv,  nmv_context_counts *mvctx) {
+void vp9_inc_mv(const MV *mv,  nmv_context_counts *counts) {
   const MV_JOINT_TYPE j = vp9_get_mv_joint(mv);
-  mvctx->joints[j]++;
+  ++counts->joints[j];
+
   if (mv_joint_vertical(j))
-    inc_mv_component_count(mv->row, &mvctx->comps[0], 1);
+    ++counts->comps[0].mvcount[MV_MAX + mv->row];
 
   if (mv_joint_horizontal(j))
-    inc_mv_component_count(mv->col, &mvctx->comps[1], 1);
+    ++counts->comps[1].mvcount[MV_MAX + mv->col];
 }
 
 static void adapt_prob(vp9_prob *dest, vp9_prob prep, unsigned int ct[2]) {