summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-04-18 14:27:44 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-04-18 14:27:44 -0700
commitbef4e474e75c5e0cf0e847133a51149b211ae7cb (patch)
tree0d6c6d392e6099877789f8eb237c6fe61235e487 /vp9/common
parent66c0d1100babdb1ec17f2e9243666eeb713ce67b (diff)
parent0db175ffed7f82c3b2216081f5a180b914c14309 (diff)
downloadlibvpx-bef4e474e75c5e0cf0e847133a51149b211ae7cb.tar
libvpx-bef4e474e75c5e0cf0e847133a51149b211ae7cb.tar.gz
libvpx-bef4e474e75c5e0cf0e847133a51149b211ae7cb.tar.bz2
libvpx-bef4e474e75c5e0cf0e847133a51149b211ae7cb.zip
Merge "Changing argument type of vp9_get_mv_joint from MV to MV*." into experimental
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_entropymv.c16
-rw-r--r--vp9/common/vp9_entropymv.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/vp9/common/vp9_entropymv.c b/vp9/common/vp9_entropymv.c
index fe3667725..0a81015cb 100644
--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -87,12 +87,12 @@ const nmv_context vp9_default_nmv_context = {
},
};
-MV_JOINT_TYPE vp9_get_mv_joint(MV mv) {
- if (mv.row == 0 && mv.col == 0)
+MV_JOINT_TYPE vp9_get_mv_joint(const MV *mv) {
+ if (mv->row == 0 && mv->col == 0)
return MV_JOINT_ZERO;
- else if (mv.row == 0 && mv.col != 0)
+ else if (mv->row == 0 && mv->col != 0)
return MV_JOINT_HNZVZ;
- else if (mv.row != 0 && mv.col == 0)
+ else if (mv->row != 0 && mv->col == 0)
return MV_JOINT_HZVNZ;
else
return MV_JOINT_HNZVNZ;
@@ -209,13 +209,13 @@ static void counts_to_context(nmv_component_counts *mvcomp, int usehp) {
void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx,
int usehp) {
- const MV_JOINT_TYPE type = vp9_get_mv_joint(*mv);
- mvctx->joints[type]++;
+ const MV_JOINT_TYPE j = vp9_get_mv_joint(mv);
+ mvctx->joints[j]++;
usehp = usehp && vp9_use_nmv_hp(ref);
- if (mv_joint_vertical(type))
+ if (mv_joint_vertical(j))
increment_nmv_component_count(mv->row, &mvctx->comps[0], 1, usehp);
- if (mv_joint_horizontal(type))
+ if (mv_joint_horizontal(j))
increment_nmv_component_count(mv->col, &mvctx->comps[1], 1, usehp);
}
diff --git a/vp9/common/vp9_entropymv.h b/vp9/common/vp9_entropymv.h
index 715b5bb2b..de1bd4383 100644
--- a/vp9/common/vp9_entropymv.h
+++ b/vp9/common/vp9_entropymv.h
@@ -105,7 +105,7 @@ typedef struct {
nmv_component comps[2];
} nmv_context;
-MV_JOINT_TYPE vp9_get_mv_joint(MV mv);
+MV_JOINT_TYPE vp9_get_mv_joint(const MV *mv);
MV_CLASS_TYPE vp9_get_mv_class(int z, int *offset);
int vp9_get_mv_mag(MV_CLASS_TYPE c, int offset);