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 */ |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 pred_context = 2; | 341 pred_context = 2; |
342 } | 342 } |
343 assert(pred_context >= 0 && pred_context < REF_CONTEXTS); | 343 assert(pred_context >= 0 && pred_context < REF_CONTEXTS); |
344 return pred_context; | 344 return pred_context; |
345 } | 345 } |
346 // Returns a context number for the given MB prediction signal | 346 // Returns a context number for the given MB prediction signal |
347 // The mode info data structure has a one element border above and to the | 347 // The mode info data structure has a one element border above and to the |
348 // left of the entries corresponding to real blocks. | 348 // left of the entries corresponding to real blocks. |
349 // The prediction flags in these dummy entries are initialized to 0. | 349 // The prediction flags in these dummy entries are initialized to 0. |
350 int vp9_get_tx_size_context(const MACROBLOCKD *xd) { | 350 int vp9_get_tx_size_context(const MACROBLOCKD *xd) { |
351 const int max_tx_size = max_txsize_lookup[xd->mi[0]->mbmi.sb_type]; | 351 const int max_tx_size = max_txsize_lookup[xd->mi[0].src_mi->mbmi.sb_type]; |
352 const MB_MODE_INFO *const above_mbmi = get_mbmi(get_above_mi(xd)); | 352 const MB_MODE_INFO *const above_mbmi = get_mbmi(get_above_mi(xd)); |
353 const MB_MODE_INFO *const left_mbmi = get_mbmi(get_left_mi(xd)); | 353 const MB_MODE_INFO *const left_mbmi = get_mbmi(get_left_mi(xd)); |
354 const int has_above = above_mbmi != NULL; | 354 const int has_above = above_mbmi != NULL; |
355 const int has_left = left_mbmi != NULL; | 355 const int has_left = left_mbmi != NULL; |
356 int above_ctx = (has_above && !above_mbmi->skip) ? (int)above_mbmi->tx_size | 356 int above_ctx = (has_above && !above_mbmi->skip) ? (int)above_mbmi->tx_size |
357 : max_tx_size; | 357 : max_tx_size; |
358 int left_ctx = (has_left && !left_mbmi->skip) ? (int)left_mbmi->tx_size | 358 int left_ctx = (has_left && !left_mbmi->skip) ? (int)left_mbmi->tx_size |
359 : max_tx_size; | 359 : max_tx_size; |
360 if (!has_left) | 360 if (!has_left) |
361 left_ctx = above_ctx; | 361 left_ctx = above_ctx; |
(...skipping 14 matching lines...) Expand all Loading... |
376 int x, y, segment_id = INT_MAX; | 376 int x, y, segment_id = INT_MAX; |
377 | 377 |
378 for (y = 0; y < ymis; y++) | 378 for (y = 0; y < ymis; y++) |
379 for (x = 0; x < xmis; x++) | 379 for (x = 0; x < xmis; x++) |
380 segment_id = MIN(segment_id, | 380 segment_id = MIN(segment_id, |
381 segment_ids[mi_offset + y * cm->mi_cols + x]); | 381 segment_ids[mi_offset + y * cm->mi_cols + x]); |
382 | 382 |
383 assert(segment_id >= 0 && segment_id < MAX_SEGMENTS); | 383 assert(segment_id >= 0 && segment_id < MAX_SEGMENTS); |
384 return segment_id; | 384 return segment_id; |
385 } | 385 } |
OLD | NEW |