OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 3 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license | 5 * Use of this source code is governed by a BSD-style license |
6 * that can be found in the LICENSE file in the root of the source | 6 * that can be found in the LICENSE file in the root of the source |
7 * tree. An additional intellectual property rights grant can be found | 7 * tree. An additional intellectual property rights grant can be found |
8 * in the file PATENTS. All contributing project authors may | 8 * in the file PATENTS. All contributing project authors may |
9 * be found in the AUTHORS file in the root of the source tree. | 9 * be found in the AUTHORS file in the root of the source tree. |
10 */ | 10 */ |
11 | 11 |
12 #include "vp9/common/vp9_mvref_common.h" | 12 #include "vp9/common/vp9_mvref_common.h" |
13 | 13 |
14 // This function searches the neighbourhood of a given MB/SB | 14 // This function searches the neighbourhood of a given MB/SB |
15 // to try and find candidate reference vectors. | 15 // to try and find candidate reference vectors. |
16 static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd, | 16 static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd, |
17 const TileInfo *const tile, | 17 const TileInfo *const tile, |
18 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, | 18 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, |
19 int_mv *mv_ref_list, | 19 int_mv *mv_ref_list, |
20 int block, int mi_row, int mi_col) { | 20 int block, int mi_row, int mi_col) { |
21 const int *ref_sign_bias = cm->ref_frame_sign_bias; | 21 const int *ref_sign_bias = cm->ref_frame_sign_bias; |
22 int i, refmv_count = 0; | 22 int i, refmv_count = 0; |
23 const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi | 23 const MODE_INFO *prev_mi = !cm->error_resilient_mode && cm->prev_mi |
24 ? cm->prev_mi_grid_visible[mi_row * xd->mi_stride + mi_col] | 24 ? cm->prev_mi_grid_visible[mi_row * xd->mi_stride + mi_col] |
25 : NULL; | 25 : NULL; |
26 const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL; | 26 const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL; |
27 | 27 |
28 | 28 |
29 const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type]; | 29 const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type]; |
30 | 30 |
31 int different_ref_found = 0; | 31 int different_ref_found = 0; |
32 int context_counter = 0; | 32 int context_counter = 0; |
33 | 33 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (nearest->as_int != candidates[n].as_int) { | 181 if (nearest->as_int != candidates[n].as_int) { |
182 near->as_int = candidates[n].as_int; | 182 near->as_int = candidates[n].as_int; |
183 break; | 183 break; |
184 } | 184 } |
185 break; | 185 break; |
186 } | 186 } |
187 default: | 187 default: |
188 assert("Invalid block index."); | 188 assert("Invalid block index."); |
189 } | 189 } |
190 } | 190 } |
OLD | NEW |