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

Side by Side Diff: source/libvpx/vp9/common/vp9_findnearmv.h

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 11
12 #ifndef VP9_COMMON_VP9_FINDNEARMV_H_ 12 #ifndef VP9_COMMON_VP9_FINDNEARMV_H_
13 #define VP9_COMMON_VP9_FINDNEARMV_H_ 13 #define VP9_COMMON_VP9_FINDNEARMV_H_
14 14
15 #include "vp9/common/vp9_mv.h" 15 #include "vp9/common/vp9_mv.h"
16 #include "vp9/common/vp9_blockd.h" 16 #include "vp9/common/vp9_blockd.h"
17 #include "vp9/common/vp9_treecoder.h" 17 #include "vp9/common/vp9_treecoder.h"
18 #include "vp9/common/vp9_onyxc_int.h" 18 #include "vp9/common/vp9_onyxc_int.h"
19 19
20 /* check a list of motion vectors by sad score using a number rows of pixels 20 /* check a list of motion vectors by sad score using a number rows of pixels
21 * above and a number cols of pixels in the left to select the one with best 21 * above and a number cols of pixels in the left to select the one with best
22 * score to use as ref motion vector 22 * score to use as ref motion vector
23 */ 23 */
24 void vp9_find_best_ref_mvs(MACROBLOCKD *xd, 24 void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
25 unsigned char *ref_y_buffer, 25 uint8_t *ref_y_buffer,
26 int ref_y_stride, 26 int ref_y_stride,
27 int_mv *mvlist, 27 int_mv *mvlist,
28 int_mv *best_mv,
29 int_mv *nearest, 28 int_mv *nearest,
30 int_mv *near); 29 int_mv *near);
31 30
32 static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, co nst int *ref_frame_sign_bias) { 31 static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, co nst int *ref_frame_sign_bias) {
33 MV xmv; 32 MV xmv;
34 xmv = mvp->as_mv; 33 xmv = mvp->as_mv;
35 34
36 if (refmb_ref_frame_sign_bias != ref_frame_sign_bias[refframe]) { 35 if (refmb_ref_frame_sign_bias != ref_frame_sign_bias[refframe]) {
37 xmv.row *= -1; 36 xmv.row *= -1;
38 xmv.col *= -1; 37 xmv.col *= -1;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return (mv->as_mv.col < mb_to_left_edge) || 74 return (mv->as_mv.col < mb_to_left_edge) ||
76 (mv->as_mv.col > mb_to_right_edge) || 75 (mv->as_mv.col > mb_to_right_edge) ||
77 (mv->as_mv.row < mb_to_top_edge) || 76 (mv->as_mv.row < mb_to_top_edge) ||
78 (mv->as_mv.row > mb_to_bottom_edge); 77 (mv->as_mv.row > mb_to_bottom_edge);
79 } 78 }
80 79
81 vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc, 80 vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
82 vp9_prob p[VP9_MVREFS - 1], 81 vp9_prob p[VP9_MVREFS - 1],
83 const int context); 82 const int context);
84 83
85 extern const unsigned char vp9_mbsplit_offset[4][16]; 84 extern const uint8_t vp9_mbsplit_offset[4][16];
86 85
87 static int left_block_mv(const MODE_INFO *cur_mb, int b) { 86 static int left_block_mv(const MODE_INFO *cur_mb, int b) {
88 if (!(b & 3)) { 87 if (!(b & 3)) {
89 /* On L edge, get from MB to left of us */ 88 /* On L edge, get from MB to left of us */
90 --cur_mb; 89 --cur_mb;
91 90
92 if (cur_mb->mbmi.mode != SPLITMV) 91 if (cur_mb->mbmi.mode != SPLITMV)
93 return cur_mb->mbmi.mv[0].as_int; 92 return cur_mb->mbmi.mv[0].as_int;
94 b += 4; 93 b += 4;
95 } 94 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } else if (cur_mb->mbmi.mode == B_PRED) { 174 } else if (cur_mb->mbmi.mode == B_PRED) {
176 return ((cur_mb->bmi + 12 + b)->as_mode.first); 175 return ((cur_mb->bmi + 12 + b)->as_mode.first);
177 } else { 176 } else {
178 return B_DC_PRED; 177 return B_DC_PRED;
179 } 178 }
180 } 179 }
181 180
182 return (cur_mb->bmi + b - 4)->as_mode.first; 181 return (cur_mb->bmi + b - 4)->as_mode.first;
183 } 182 }
184 183
185 #endif 184 #endif // VP9_COMMON_VP9_FINDNEARMV_H_
OLDNEW
« 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