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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 } | 421 } |
422 | 422 |
423 void vp9_setup_past_independence(VP9_COMMON *cm) { | 423 void vp9_setup_past_independence(VP9_COMMON *cm) { |
424 // Reset the segment feature data to the default stats: | 424 // Reset the segment feature data to the default stats: |
425 // Features disabled, 0, with delta coding (Default state). | 425 // Features disabled, 0, with delta coding (Default state). |
426 struct loopfilter *const lf = &cm->lf; | 426 struct loopfilter *const lf = &cm->lf; |
427 | 427 |
428 int i; | 428 int i; |
429 vp9_clearall_segfeatures(&cm->seg); | 429 vp9_clearall_segfeatures(&cm->seg); |
430 cm->seg.abs_delta = SEGMENT_DELTADATA; | 430 cm->seg.abs_delta = SEGMENT_DELTADATA; |
431 if (cm->last_frame_seg_map) | 431 |
| 432 if (cm->last_frame_seg_map && !cm->frame_parallel_decode) |
432 vpx_memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); | 433 vpx_memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); |
433 | 434 |
| 435 if (cm->current_frame_seg_map) |
| 436 vpx_memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); |
| 437 |
434 // Reset the mode ref deltas for loop filter | 438 // Reset the mode ref deltas for loop filter |
435 vp9_zero(lf->last_ref_deltas); | 439 vp9_zero(lf->last_ref_deltas); |
436 vp9_zero(lf->last_mode_deltas); | 440 vp9_zero(lf->last_mode_deltas); |
437 set_default_lf_deltas(lf); | 441 set_default_lf_deltas(lf); |
438 | 442 |
439 // To force update of the sharpness | 443 // To force update of the sharpness |
440 lf->last_sharpness_level = -1; | 444 lf->last_sharpness_level = -1; |
441 | 445 |
442 vp9_default_coef_probs(cm); | 446 vp9_default_coef_probs(cm); |
443 vp9_init_mode_probs(cm->fc); | 447 vp9_init_mode_probs(cm->fc); |
444 vp9_init_mv_probs(cm); | 448 vp9_init_mv_probs(cm); |
445 cm->fc->initialized = 1; | 449 cm->fc->initialized = 1; |
446 | 450 |
447 if (cm->frame_type == KEY_FRAME || | 451 if (cm->frame_type == KEY_FRAME || |
448 cm->error_resilient_mode || cm->reset_frame_context == 3) { | 452 cm->error_resilient_mode || cm->reset_frame_context == 3) { |
449 // Reset all frame contexts. | 453 // Reset all frame contexts. |
450 for (i = 0; i < FRAME_CONTEXTS; ++i) | 454 for (i = 0; i < FRAME_CONTEXTS; ++i) |
451 cm->frame_contexts[i] = *cm->fc; | 455 cm->frame_contexts[i] = *cm->fc; |
452 } else if (cm->reset_frame_context == 2) { | 456 } else if (cm->reset_frame_context == 2) { |
453 // Reset only the frame context specified in the frame header. | 457 // Reset only the frame context specified in the frame header. |
454 cm->frame_contexts[cm->frame_context_idx] = *cm->fc; | 458 cm->frame_contexts[cm->frame_context_idx] = *cm->fc; |
455 } | 459 } |
456 | 460 |
457 // prev_mip will only be allocated in encoder. | 461 // prev_mip will only be allocated in encoder. |
458 if (frame_is_intra_only(cm) && cm->prev_mip) | 462 if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode) |
459 vpx_memset(cm->prev_mip, 0, cm->mi_stride * (cm->mi_rows + 1) * | 463 vpx_memset(cm->prev_mip, 0, cm->mi_stride * (cm->mi_rows + 1) * |
460 sizeof(*cm->prev_mip)); | 464 sizeof(*cm->prev_mip)); |
461 | 465 |
462 vp9_zero(cm->ref_frame_sign_bias); | 466 vp9_zero(cm->ref_frame_sign_bias); |
463 | 467 |
464 cm->frame_context_idx = 0; | 468 cm->frame_context_idx = 0; |
465 } | 469 } |
OLD | NEW |