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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_encodemv.c

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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/encoder/vp9_encodemb.c ('k') | source/libvpx/vp9/encoder/vp9_encoder.h » ('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
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 for (i = 0; i < 1 + has_second_ref(mbmi); ++i) { 236 for (i = 0; i < 1 + has_second_ref(mbmi); ++i) {
237 const MV *ref = &mbmi->ref_mvs[mbmi->ref_frame[i]][0].as_mv; 237 const MV *ref = &mbmi->ref_mvs[mbmi->ref_frame[i]][0].as_mv;
238 const MV diff = {mvs[i].as_mv.row - ref->row, 238 const MV diff = {mvs[i].as_mv.row - ref->row,
239 mvs[i].as_mv.col - ref->col}; 239 mvs[i].as_mv.col - ref->col};
240 vp9_inc_mv(&diff, counts); 240 vp9_inc_mv(&diff, counts);
241 } 241 }
242 } 242 }
243 243
244 void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd) { 244 void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd) {
245 const MODE_INFO *mi = xd->mi[0]; 245 const MODE_INFO *mi = xd->mi[0].src_mi;
246 const MB_MODE_INFO *const mbmi = &mi->mbmi; 246 const MB_MODE_INFO *const mbmi = &mi->mbmi;
247 247
248 if (mbmi->sb_type < BLOCK_8X8) { 248 if (mbmi->sb_type < BLOCK_8X8) {
249 const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type]; 249 const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type];
250 const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi->sb_type]; 250 const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi->sb_type];
251 int idx, idy; 251 int idx, idy;
252 252
253 for (idy = 0; idy < 2; idy += num_4x4_h) { 253 for (idy = 0; idy < 2; idy += num_4x4_h) {
254 for (idx = 0; idx < 2; idx += num_4x4_w) { 254 for (idx = 0; idx < 2; idx += num_4x4_w) {
255 const int i = idy * 2 + idx; 255 const int i = idy * 2 + idx;
256 if (mi->bmi[i].as_mode == NEWMV) 256 if (mi->bmi[i].as_mode == NEWMV)
257 inc_mvs(mbmi, mi->bmi[i].as_mv, &cm->counts.mv); 257 inc_mvs(mbmi, mi->bmi[i].as_mv, &cm->counts.mv);
258 } 258 }
259 } 259 }
260 } else { 260 } else {
261 if (mbmi->mode == NEWMV) 261 if (mbmi->mode == NEWMV)
262 inc_mvs(mbmi, mbmi->mv, &cm->counts.mv); 262 inc_mvs(mbmi, mbmi->mv, &cm->counts.mv);
263 } 263 }
264 } 264 }
265 265
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodemb.c ('k') | source/libvpx/vp9/encoder/vp9_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698