OLD | NEW |
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 Loading... |
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 |
OLD | NEW |