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

Unified Diff: libvpx/source/libvpx/vp8/common/findnearmv.c

Issue 7624054: Revert r97185 "Update libvpx snapshot to v0.9.7-p1 (Cayuga)." (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party
Patch Set: Created 9 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
Index: libvpx/source/libvpx/vp8/common/findnearmv.c
diff --git a/libvpx/source/libvpx/vp8/common/findnearmv.c b/libvpx/source/libvpx/vp8/common/findnearmv.c
index c1022363eca524edba01f14279d503ce103419ee..2041afa13568c66e4b7d946f9e8830752f2ed1b4 100644
--- a/libvpx/source/libvpx/vp8/common/findnearmv.c
+++ b/libvpx/source/libvpx/vp8/common/findnearmv.c
@@ -25,9 +25,9 @@ void vp8_find_near_mvs
(
MACROBLOCKD *xd,
const MODE_INFO *here,
- int_mv *nearest,
- int_mv *nearby,
- int_mv *best_mv,
+ MV *nearest,
+ MV *nearby,
+ MV *best_mv,
int cnt[4],
int refframe,
int *ref_frame_sign_bias
@@ -131,14 +131,13 @@ void vp8_find_near_mvs
near_mvs[CNT_INTRA] = near_mvs[CNT_NEAREST];
/* Set up return values */
- best_mv->as_int = near_mvs[0].as_int;
- nearest->as_int = near_mvs[CNT_NEAREST].as_int;
- nearby->as_int = near_mvs[CNT_NEAR].as_int;
-
- //TODO: move clamp outside findnearmv
- vp8_clamp_mv2(nearest, xd);
- vp8_clamp_mv2(nearby, xd);
- vp8_clamp_mv2(best_mv, xd);
+ *best_mv = near_mvs[0].as_mv;
+ *nearest = near_mvs[CNT_NEAREST].as_mv;
+ *nearby = near_mvs[CNT_NEAR].as_mv;
+
+ vp8_clamp_mv(nearest, xd);
+ vp8_clamp_mv(nearby, xd);
+ vp8_clamp_mv(best_mv, xd); /*TODO: move this up before the copy*/
}
vp8_prob *vp8_mv_ref_probs(
@@ -153,3 +152,26 @@ vp8_prob *vp8_mv_ref_probs(
return p;
}
+const B_MODE_INFO *vp8_left_bmi(const MODE_INFO *cur_mb, int b)
+{
+ if (!(b & 3))
+ {
+ /* On L edge, get from MB to left of us */
+ --cur_mb;
+ b += 4;
+ }
+
+ return cur_mb->bmi + b - 1;
+}
+
+const B_MODE_INFO *vp8_above_bmi(const MODE_INFO *cur_mb, int b, int mi_stride)
+{
+ if (!(b >> 2))
+ {
+ /* On top edge, get from MB above us */
+ cur_mb -= mi_stride;
+ b += 16;
+ }
+
+ return cur_mb->bmi + b - 4;
+}
« no previous file with comments | « libvpx/source/libvpx/vp8/common/findnearmv.h ('k') | libvpx/source/libvpx/vp8/common/generic/systemdependent.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698