Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: source/libvpx/vp9/common/vp9_entropymode.c

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropy.c ('k') | source/libvpx/vp9/common/vp9_frame_buffers.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 431
432 if (cm->last_frame_seg_map && !cm->frame_parallel_decode) 432 if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
433 vpx_memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); 433 memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
434 434
435 if (cm->current_frame_seg_map) 435 if (cm->current_frame_seg_map)
436 vpx_memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); 436 memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
437 437
438 // Reset the mode ref deltas for loop filter 438 // Reset the mode ref deltas for loop filter
439 vp9_zero(lf->last_ref_deltas); 439 vp9_zero(lf->last_ref_deltas);
440 vp9_zero(lf->last_mode_deltas); 440 vp9_zero(lf->last_mode_deltas);
441 set_default_lf_deltas(lf); 441 set_default_lf_deltas(lf);
442 442
443 // To force update of the sharpness 443 // To force update of the sharpness
444 lf->last_sharpness_level = -1; 444 lf->last_sharpness_level = -1;
445 445
446 vp9_default_coef_probs(cm); 446 vp9_default_coef_probs(cm);
447 vp9_init_mode_probs(cm->fc); 447 vp9_init_mode_probs(cm->fc);
448 vp9_init_mv_probs(cm); 448 vp9_init_mv_probs(cm);
449 cm->fc->initialized = 1; 449 cm->fc->initialized = 1;
450 450
451 if (cm->frame_type == KEY_FRAME || 451 if (cm->frame_type == KEY_FRAME ||
452 cm->error_resilient_mode || cm->reset_frame_context == 3) { 452 cm->error_resilient_mode || cm->reset_frame_context == 3) {
453 // Reset all frame contexts. 453 // Reset all frame contexts.
454 for (i = 0; i < FRAME_CONTEXTS; ++i) 454 for (i = 0; i < FRAME_CONTEXTS; ++i)
455 cm->frame_contexts[i] = *cm->fc; 455 cm->frame_contexts[i] = *cm->fc;
456 } else if (cm->reset_frame_context == 2) { 456 } else if (cm->reset_frame_context == 2) {
457 // Reset only the frame context specified in the frame header. 457 // Reset only the frame context specified in the frame header.
458 cm->frame_contexts[cm->frame_context_idx] = *cm->fc; 458 cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
459 } 459 }
460 460
461 // prev_mip will only be allocated in encoder. 461 // prev_mip will only be allocated in encoder.
462 if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode) 462 if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode)
463 vpx_memset(cm->prev_mip, 0, cm->mi_stride * (cm->mi_rows + 1) * 463 memset(cm->prev_mip, 0,
464 sizeof(*cm->prev_mip)); 464 cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
465 465
466 vp9_zero(cm->ref_frame_sign_bias); 466 vp9_zero(cm->ref_frame_sign_bias);
467 467
468 cm->frame_context_idx = 0; 468 cm->frame_context_idx = 0;
469 } 469 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropy.c ('k') | source/libvpx/vp9/common/vp9_frame_buffers.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698