Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1029)

Unified Diff: source/libvpx/vp9/common/vp9_mvref_common.c

Issue 181493009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/common/vp9_mvref_common.h ('k') | source/libvpx/vp9/common/vp9_onyx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_mvref_common.c
===================================================================
--- source/libvpx/vp9/common/vp9_mvref_common.c (revision 254565)
+++ source/libvpx/vp9/common/vp9_mvref_common.c (working copy)
@@ -186,17 +186,17 @@
// This function searches the neighbourhood of a given MB/SB
// to try and find candidate reference vectors.
-void vp9_find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
- const TileInfo *const tile,
- MODE_INFO *mi, const MODE_INFO *prev_mi,
- MV_REFERENCE_FRAME ref_frame,
- int_mv *mv_ref_list,
- int block_idx,
- int mi_row, int mi_col) {
+static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
+ const TileInfo *const tile,
+ MODE_INFO *mi, const MODE_INFO *prev_mi,
+ MV_REFERENCE_FRAME ref_frame,
+ int_mv *mv_ref_list,
+ int block_idx, int mi_row, int mi_col) {
const int *ref_sign_bias = cm->ref_frame_sign_bias;
int i, refmv_count = 0;
const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type];
- const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL;
+ const MB_MODE_INFO *const prev_mbmi = cm->coding_use_prev_mi && prev_mi ?
+ &prev_mi->mbmi : NULL;
int different_ref_found = 0;
int context_counter = 0;
@@ -290,6 +290,16 @@
clamp_mv_ref(&mv_ref_list[i].as_mv, xd);
}
+void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
+ const TileInfo *const tile,
+ MODE_INFO *mi, const MODE_INFO *prev_mi,
+ MV_REFERENCE_FRAME ref_frame,
+ int_mv *mv_ref_list,
+ int mi_row, int mi_col) {
+ find_mv_refs_idx(cm, xd, tile, mi, prev_mi, ref_frame, mv_ref_list, -1,
+ mi_row, mi_col);
+}
+
static void lower_mv_precision(MV *mv, int allow_hp) {
const int use_hp = allow_hp && vp9_use_mv_hp(mv);
if (!use_hp) {
@@ -324,8 +334,8 @@
assert(MAX_MV_REF_CANDIDATES == 2);
- vp9_find_mv_refs_idx(cm, xd, tile, mi, xd->last_mi, mi->mbmi.ref_frame[ref],
- mv_list, block, mi_row, mi_col);
+ find_mv_refs_idx(cm, xd, tile, mi, xd->last_mi, mi->mbmi.ref_frame[ref],
+ mv_list, block, mi_row, mi_col);
near->as_int = 0;
switch (block) {
« no previous file with comments | « source/libvpx/vp9/common/vp9_mvref_common.h ('k') | source/libvpx/vp9/common/vp9_onyx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698