summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymv.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/common/vp9_entropymv.c')
-rw-r--r--vp9/common/vp9_entropymv.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/vp9/common/vp9_entropymv.c b/vp9/common/vp9_entropymv.c
index e85118118..f70b571ef 100644
--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -175,17 +175,18 @@ static void inc_mv_component(int v, nmv_component_counts *comp_counts,
}
}
+void vp9_inc_mv(const MV *mv, nmv_context_counts *counts) {
+ if (counts != NULL) {
+ const MV_JOINT_TYPE j = vp9_get_mv_joint(mv);
+ ++counts->joints[j];
-void vp9_inc_mv(const MV *mv, nmv_context_counts *counts) {
- const MV_JOINT_TYPE j = vp9_get_mv_joint(mv);
- ++counts->joints[j];
-
- if (mv_joint_vertical(j)) {
- inc_mv_component(mv->row, &counts->comps[0], 1, 1);
- }
+ if (mv_joint_vertical(j)) {
+ inc_mv_component(mv->row, &counts->comps[0], 1, 1);
+ }
- if (mv_joint_horizontal(j)) {
- inc_mv_component(mv->col, &counts->comps[1], 1, 1);
+ if (mv_joint_horizontal(j)) {
+ inc_mv_component(mv->col, &counts->comps[1], 1, 1);
+ }
}
}