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

Unified Diff: source/libvpx/vp9/common/vp9_findnearmv.h

Issue 23530058: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 3 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_extend.c ('k') | source/libvpx/vp9/common/vp9_findnearmv.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_findnearmv.h
===================================================================
--- source/libvpx/vp9/common/vp9_findnearmv.h (revision 223100)
+++ source/libvpx/vp9/common/vp9_findnearmv.h (working copy)
@@ -36,48 +36,57 @@
xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
}
-void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *pc,
+void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm,
MACROBLOCKD *xd,
int_mv *dst_nearest,
int_mv *dst_near,
int block_idx, int ref_idx,
int mi_row, int mi_col);
-static MB_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b) {
+static MB_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb,
+ const MODE_INFO *left_mb, int b) {
// FIXME(rbultje, jingning): temporary hack because jenkins doesn't
// understand this condition. This will go away soon.
+ const MODE_INFO *mi = cur_mb;
+
if (b == 0 || b == 2) {
/* On L edge, get from MB to left of us */
- --cur_mb;
+ mi = left_mb;
+ if (!mi)
+ return DC_PRED;
- if (is_inter_block(&cur_mb->mbmi)) {
+ if (mi->mbmi.ref_frame[0] != INTRA_FRAME) {
return DC_PRED;
- } else if (cur_mb->mbmi.sb_type < BLOCK_8X8) {
- return (cur_mb->bmi + 1 + b)->as_mode;
+ } else if (mi->mbmi.sb_type < BLOCK_8X8) {
+ return ((mi->bmi + 1 + b)->as_mode);
} else {
- return cur_mb->mbmi.mode;
+ return mi->mbmi.mode;
}
}
assert(b == 1 || b == 3);
- return (cur_mb->bmi + b - 1)->as_mode;
+ return (mi->bmi + b - 1)->as_mode;
}
static MB_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb,
- int b, int mi_stride) {
+ const MODE_INFO *above_mb, int b) {
+ const MODE_INFO *mi = cur_mb;
+
if (!(b >> 1)) {
/* On top edge, get from MB above us */
- cur_mb -= mi_stride;
+ mi = above_mb;
+ if (!mi)
+ return DC_PRED;
- if (is_inter_block(&cur_mb->mbmi)) {
+ if (mi->mbmi.ref_frame[0] != INTRA_FRAME) {
return DC_PRED;
- } else if (cur_mb->mbmi.sb_type < BLOCK_8X8) {
- return (cur_mb->bmi + 2 + b)->as_mode;
+ } else if (mi->mbmi.sb_type < BLOCK_8X8) {
+ return ((mi->bmi + 2 + b)->as_mode);
} else {
- return cur_mb->mbmi.mode;
+ return mi->mbmi.mode;
}
}
- return (cur_mb->bmi + b - 2)->as_mode;
+ return (mi->bmi + b - 2)->as_mode;
}
#endif // VP9_COMMON_VP9_FINDNEARMV_H_
« no previous file with comments | « source/libvpx/vp9/common/vp9_extend.c ('k') | source/libvpx/vp9/common/vp9_findnearmv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698