summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_mvref_common.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2013-09-11 13:45:44 -0400
committerScott LaVarnway <slavarnway@google.com>2013-09-11 13:45:44 -0400
commitac6093d179d8488f90bf10c6d0abcc48be327d28 (patch)
treeb5be18157350f2fe68238ab4c093aec74e6107f9 /vp9/common/vp9_mvref_common.c
parent0607abc3dd26e6782ad9577765f9aeef311b0de9 (diff)
downloadlibvpx-ac6093d179d8488f90bf10c6d0abcc48be327d28.tar
libvpx-ac6093d179d8488f90bf10c6d0abcc48be327d28.tar.gz
libvpx-ac6093d179d8488f90bf10c6d0abcc48be327d28.tar.bz2
libvpx-ac6093d179d8488f90bf10c6d0abcc48be327d28.zip
New mode_info_context storage -- undo revert
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of pointers to MODE_INFO structs. The MODE_INFO structs are now stored as a stream (decoder only), eliminating unnecessary copies and is a little more cache friendly. Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
Diffstat (limited to 'vp9/common/vp9_mvref_common.c')
-rw-r--r--vp9/common/vp9_mvref_common.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c
index d8381ec48..bfeeb57bf 100644
--- a/vp9/common/vp9_mvref_common.c
+++ b/vp9/common/vp9_mvref_common.c
@@ -1,3 +1,4 @@
+
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
@@ -203,8 +204,8 @@ void vp9_find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
const MV *const mv_ref = &mv_ref_search[i];
if (is_inside(cm, mi_col, mi_row, mv_ref)) {
const int check_sub_blocks = block_idx >= 0;
- const MODE_INFO *const candidate_mi = &mi[mv_ref->col + mv_ref->row
- * xd->mode_info_stride];
+ const MODE_INFO *const candidate_mi = xd->mi_8x8[mv_ref->col + mv_ref->row
+ * xd->mode_info_stride];
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
// Keep counts for entropy encoding.
context_counter += mode_2_counter[candidate->mode];
@@ -230,8 +231,9 @@ void vp9_find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
for (; i < MVREF_NEIGHBOURS; ++i) {
const MV *const mv_ref = &mv_ref_search[i];
if (is_inside(cm, mi_col, mi_row, mv_ref)) {
- const MB_MODE_INFO *const candidate = &mi[mv_ref->col + mv_ref->row
- * xd->mode_info_stride].mbmi;
+ const MB_MODE_INFO *const candidate = &xd->mi_8x8[mv_ref->col +
+ mv_ref->row
+ * xd->mode_info_stride]->mbmi;
if (candidate->ref_frame[0] == ref_frame) {
ADD_MV_REF_LIST(candidate->mv[0]);
@@ -259,8 +261,9 @@ void vp9_find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
for (i = 0; i < MVREF_NEIGHBOURS; ++i) {
const MV *mv_ref = &mv_ref_search[i];
if (is_inside(cm, mi_col, mi_row, mv_ref)) {
- const MB_MODE_INFO *const candidate = &mi[mv_ref->col + mv_ref->row
- * xd->mode_info_stride].mbmi;
+ const MB_MODE_INFO *const candidate = &xd->mi_8x8[mv_ref->col +
+ mv_ref->row
+ * xd->mode_info_stride]->mbmi;
// If the candidate is INTRA we don't want to consider its mv.
if (is_inter_block(candidate))