| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 for (y = 0; y < y_mis; ++y) | 309 for (y = 0; y < y_mis; ++y) |
| 310 for (x = !y; x < x_mis; ++x) | 310 for (x = !y; x < x_mis; ++x) |
| 311 xd->mi[y * cm->mi_stride + x] = xd->mi[0]; | 311 xd->mi[y * cm->mi_stride + x] = xd->mi[0]; |
| 312 | 312 |
| 313 set_skip_context(xd, mi_row, mi_col); | 313 set_skip_context(xd, mi_row, mi_col); |
| 314 | 314 |
| 315 // Distance of Mb to the various image edges. These are specified to 8th pel | 315 // Distance of Mb to the various image edges. These are specified to 8th pel |
| 316 // as they are always compared to values that are in 1/8th pel units | 316 // as they are always compared to values that are in 1/8th pel units |
| 317 set_mi_row_col(xd, tile, mi_row, bh, mi_col, bw, cm->mi_rows, cm->mi_cols); | 317 set_mi_row_col(xd, tile, mi_row, bh, mi_col, bw, cm->mi_rows, cm->mi_cols); |
| 318 | 318 |
| 319 vp9_setup_dst_planes(xd, get_frame_new_buffer(cm), mi_row, mi_col); | 319 vp9_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col); |
| 320 return &xd->mi[0]->mbmi; | 320 return &xd->mi[0]->mbmi; |
| 321 } | 321 } |
| 322 | 322 |
| 323 static void set_ref(VP9_COMMON *const cm, MACROBLOCKD *const xd, | 323 static void set_ref(VP9_COMMON *const cm, MACROBLOCKD *const xd, |
| 324 int idx, int mi_row, int mi_col) { | 324 int idx, int mi_row, int mi_col) { |
| 325 MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; | 325 MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; |
| 326 RefBuffer *ref_buffer = &cm->frame_refs[mbmi->ref_frame[idx] - LAST_FRAME]; | 326 RefBuffer *ref_buffer = &cm->frame_refs[mbmi->ref_frame[idx] - LAST_FRAME]; |
| 327 xd->block_refs[idx] = ref_buffer; | 327 xd->block_refs[idx] = ref_buffer; |
| 328 if (!vp9_is_valid_scale(&ref_buffer->sf)) | 328 if (!vp9_is_valid_scale(&ref_buffer->sf)) |
| 329 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, | 329 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 int do_loopfilter_inline, vp9_reader *r) { | 679 int do_loopfilter_inline, vp9_reader *r) { |
| 680 const int num_threads = pbi->max_threads; | 680 const int num_threads = pbi->max_threads; |
| 681 VP9_COMMON *const cm = &pbi->common; | 681 VP9_COMMON *const cm = &pbi->common; |
| 682 int mi_row, mi_col; | 682 int mi_row, mi_col; |
| 683 MACROBLOCKD *xd = &pbi->mb; | 683 MACROBLOCKD *xd = &pbi->mb; |
| 684 | 684 |
| 685 if (do_loopfilter_inline) { | 685 if (do_loopfilter_inline) { |
| 686 LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1; | 686 LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1; |
| 687 lf_data->frame_buffer = get_frame_new_buffer(cm); | 687 lf_data->frame_buffer = get_frame_new_buffer(cm); |
| 688 lf_data->cm = cm; | 688 lf_data->cm = cm; |
| 689 lf_data->xd = pbi->mb; | 689 vp9_copy(lf_data->planes, pbi->mb.plane); |
| 690 lf_data->stop = 0; | 690 lf_data->stop = 0; |
| 691 lf_data->y_only = 0; | 691 lf_data->y_only = 0; |
| 692 vp9_loop_filter_frame_init(cm, cm->lf.filter_level); | 692 vp9_loop_filter_frame_init(cm, cm->lf.filter_level); |
| 693 } | 693 } |
| 694 | 694 |
| 695 for (mi_row = tile->mi_row_start; mi_row < tile->mi_row_end; | 695 for (mi_row = tile->mi_row_start; mi_row < tile->mi_row_end; |
| 696 mi_row += MI_BLOCK_SIZE) { | 696 mi_row += MI_BLOCK_SIZE) { |
| 697 // For a SB there are 2 left contexts, each pertaining to a MB row within | 697 // For a SB there are 2 left contexts, each pertaining to a MB row within |
| 698 vp9_zero(xd->left_context); | 698 vp9_zero(xd->left_context); |
| 699 vp9_zero(xd->left_seg_context); | 699 vp9_zero(xd->left_seg_context); |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 } else { | 1388 } else { |
| 1389 debug_check_frame_counts(cm); | 1389 debug_check_frame_counts(cm); |
| 1390 } | 1390 } |
| 1391 } | 1391 } |
| 1392 | 1392 |
| 1393 if (cm->refresh_frame_context) | 1393 if (cm->refresh_frame_context) |
| 1394 cm->frame_contexts[cm->frame_context_idx] = cm->fc; | 1394 cm->frame_contexts[cm->frame_context_idx] = cm->fc; |
| 1395 | 1395 |
| 1396 return 0; | 1396 return 0; |
| 1397 } | 1397 } |
| OLD | NEW |