summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodemv.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2016-01-20 12:19:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-01-20 12:19:27 +0000
commita7e0b1ea0169c28bea4a11727bab54ee0d6f26ce (patch)
treea4fa9939916715254c9cf608f6db43c70cc9e6c1 /vp9/encoder/vp9_encodemv.c
parent3277d481ebe1cfa8f14006245554cf5745f9a257 (diff)
parent5232326716af469eafa6d98fba64f8154c69d9f8 (diff)
downloadlibvpx-a7e0b1ea0169c28bea4a11727bab54ee0d6f26ce.tar
libvpx-a7e0b1ea0169c28bea4a11727bab54ee0d6f26ce.tar.gz
libvpx-a7e0b1ea0169c28bea4a11727bab54ee0d6f26ce.tar.bz2
libvpx-a7e0b1ea0169c28bea4a11727bab54ee0d6f26ce.zip
Merge "VP9: Eliminate MB_MODE_INFO"
Diffstat (limited to 'vp9/encoder/vp9_encodemv.c')
-rw-r--r--vp9/encoder/vp9_encodemv.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_encodemv.c b/vp9/encoder/vp9_encodemv.c
index 3bcd6a3b6..f31ada919 100644
--- a/vp9/encoder/vp9_encodemv.c
+++ b/vp9/encoder/vp9_encodemv.c
@@ -230,13 +230,13 @@ void vp9_build_nmv_cost_table(int *mvjoint, int *mvcost[2],
build_nmv_component_cost_table(mvcost[1], &ctx->comps[1], usehp);
}
-static void inc_mvs(const MB_MODE_INFO *mbmi, const MB_MODE_INFO_EXT *mbmi_ext,
+static void inc_mvs(const MODE_INFO *mi, const MB_MODE_INFO_EXT *mbmi_ext,
const int_mv mvs[2],
nmv_context_counts *counts) {
int i;
- for (i = 0; i < 1 + has_second_ref(mbmi); ++i) {
- const MV *ref = &mbmi_ext->ref_mvs[mbmi->ref_frame[i]][0].as_mv;
+ for (i = 0; i < 1 + has_second_ref(mi); ++i) {
+ const MV *ref = &mbmi_ext->ref_mvs[mi->ref_frame[i]][0].as_mv;
const MV diff = {mvs[i].as_mv.row - ref->row,
mvs[i].as_mv.col - ref->col};
vp9_inc_mv(&diff, counts);
@@ -246,24 +246,23 @@ static void inc_mvs(const MB_MODE_INFO *mbmi, const MB_MODE_INFO_EXT *mbmi_ext,
void vp9_update_mv_count(ThreadData *td) {
const MACROBLOCKD *xd = &td->mb.e_mbd;
const MODE_INFO *mi = xd->mi[0];
- const MB_MODE_INFO *const mbmi = &mi->mbmi;
const MB_MODE_INFO_EXT *mbmi_ext = td->mb.mbmi_ext;
- if (mbmi->sb_type < BLOCK_8X8) {
- const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type];
- const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi->sb_type];
+ if (mi->sb_type < BLOCK_8X8) {
+ const int num_4x4_w = num_4x4_blocks_wide_lookup[mi->sb_type];
+ const int num_4x4_h = num_4x4_blocks_high_lookup[mi->sb_type];
int idx, idy;
for (idy = 0; idy < 2; idy += num_4x4_h) {
for (idx = 0; idx < 2; idx += num_4x4_w) {
const int i = idy * 2 + idx;
if (mi->bmi[i].as_mode == NEWMV)
- inc_mvs(mbmi, mbmi_ext, mi->bmi[i].as_mv, &td->counts->mv);
+ inc_mvs(mi, mbmi_ext, mi->bmi[i].as_mv, &td->counts->mv);
}
}
} else {
- if (mbmi->mode == NEWMV)
- inc_mvs(mbmi, mbmi_ext, mbmi->mv, &td->counts->mv);
+ if (mi->mode == NEWMV)
+ inc_mvs(mi, mbmi_ext, mi->mv, &td->counts->mv);
}
}