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

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

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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
« 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(ThreadData *td) { 244 void vp9_update_mv_count(ThreadData *td) {
245 const MACROBLOCKD *xd = &td->mb.e_mbd; 245 const MACROBLOCKD *xd = &td->mb.e_mbd;
246 const MODE_INFO *mi = xd->mi[0].src_mi; 246 const MODE_INFO *mi = xd->mi[0];
247 const MB_MODE_INFO *const mbmi = &mi->mbmi; 247 const MB_MODE_INFO *const mbmi = &mi->mbmi;
248 248
249 if (mbmi->sb_type < BLOCK_8X8) { 249 if (mbmi->sb_type < BLOCK_8X8) {
250 const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type]; 250 const int num_4x4_w = num_4x4_blocks_wide_lookup[mbmi->sb_type];
251 const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi->sb_type]; 251 const int num_4x4_h = num_4x4_blocks_high_lookup[mbmi->sb_type];
252 int idx, idy; 252 int idx, idy;
253 253
254 for (idy = 0; idy < 2; idy += num_4x4_h) { 254 for (idy = 0; idy < 2; idy += num_4x4_h) {
255 for (idx = 0; idx < 2; idx += num_4x4_w) { 255 for (idx = 0; idx < 2; idx += num_4x4_w) {
256 const int i = idy * 2 + idx; 256 const int i = idy * 2 + idx;
257 if (mi->bmi[i].as_mode == NEWMV) 257 if (mi->bmi[i].as_mode == NEWMV)
258 inc_mvs(mbmi, mi->bmi[i].as_mv, &td->counts->mv); 258 inc_mvs(mbmi, mi->bmi[i].as_mv, &td->counts->mv);
259 } 259 }
260 } 260 }
261 } else { 261 } else {
262 if (mbmi->mode == NEWMV) 262 if (mbmi->mode == NEWMV)
263 inc_mvs(mbmi, mbmi->mv, &td->counts->mv); 263 inc_mvs(mbmi, mbmi->mv, &td->counts->mv);
264 } 264 }
265 } 265 }
266 266
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