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

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

Issue 23600008: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 4 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_filter.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 219822)
+++ source/libvpx/vp9/common/vp9_findnearmv.h (working copy)
@@ -29,31 +29,19 @@
int_mv *near);
// TODO(jingning): this mv clamping function should be block size dependent.
-static void clamp_mv(int_mv *mv,
- int mb_to_left_edge,
- int mb_to_right_edge,
- int mb_to_top_edge,
- int mb_to_bottom_edge) {
- mv->as_mv.col = clamp(mv->as_mv.col, mb_to_left_edge, mb_to_right_edge);
- mv->as_mv.row = clamp(mv->as_mv.row, mb_to_top_edge, mb_to_bottom_edge);
+static void clamp_mv2(MV *mv, const MACROBLOCKD *xd) {
+ clamp_mv(mv, xd->mb_to_left_edge - LEFT_TOP_MARGIN,
+ xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
+ xd->mb_to_top_edge - LEFT_TOP_MARGIN,
+ xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
}
-static int clamp_mv2(int_mv *mv, const MACROBLOCKD *xd) {
- int_mv tmp_mv;
- tmp_mv.as_int = mv->as_int;
- clamp_mv(mv,
- xd->mb_to_left_edge - LEFT_TOP_MARGIN,
- xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN,
- xd->mb_to_top_edge - LEFT_TOP_MARGIN,
- xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
- return tmp_mv.as_int != mv->as_int;
-}
-
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *pc,
MACROBLOCKD *xd,
int_mv *dst_nearest,
int_mv *dst_near,
- int block_idx, int ref_idx);
+ 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) {
// FIXME(rbultje, jingning): temporary hack because jenkins doesn't
@@ -62,10 +50,10 @@
/* On L edge, get from MB to left of us */
--cur_mb;
- if (cur_mb->mbmi.ref_frame[0] != INTRA_FRAME) {
+ if (is_inter_block(&cur_mb->mbmi)) {
return DC_PRED;
- } else if (cur_mb->mbmi.sb_type < BLOCK_SIZE_SB8X8) {
- return ((cur_mb->bmi + 1 + b)->as_mode);
+ } else if (cur_mb->mbmi.sb_type < BLOCK_8X8) {
+ return (cur_mb->bmi + 1 + b)->as_mode;
} else {
return cur_mb->mbmi.mode;
}
@@ -80,10 +68,10 @@
/* On top edge, get from MB above us */
cur_mb -= mi_stride;
- if (cur_mb->mbmi.ref_frame[0] != INTRA_FRAME) {
+ if (is_inter_block(&cur_mb->mbmi)) {
return DC_PRED;
- } else if (cur_mb->mbmi.sb_type < BLOCK_SIZE_SB8X8) {
- return ((cur_mb->bmi + 2 + b)->as_mode);
+ } else if (cur_mb->mbmi.sb_type < BLOCK_8X8) {
+ return (cur_mb->bmi + 2 + b)->as_mode;
} else {
return cur_mb->mbmi.mode;
}
« no previous file with comments | « source/libvpx/vp9/common/vp9_filter.c ('k') | source/libvpx/vp9/common/vp9_findnearmv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698