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