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

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

Issue 1217053002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 5 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_entropymode.h ('k') | source/libvpx/vp9/common/vp9_enums.h » ('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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 }; 307 };
308 308
309 static const vp9_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] 309 static const vp9_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
310 [SWITCHABLE_FILTERS - 1] = { 310 [SWITCHABLE_FILTERS - 1] = {
311 { 235, 162, }, 311 { 235, 162, },
312 { 36, 255, }, 312 { 36, 255, },
313 { 34, 3, }, 313 { 34, 3, },
314 { 149, 144, }, 314 { 149, 144, },
315 }; 315 };
316 316
317 void vp9_init_mode_probs(FRAME_CONTEXT *fc) { 317 static void init_mode_probs(FRAME_CONTEXT *fc) {
318 vp9_copy(fc->uv_mode_prob, default_if_uv_probs); 318 vp9_copy(fc->uv_mode_prob, default_if_uv_probs);
319 vp9_copy(fc->y_mode_prob, default_if_y_probs); 319 vp9_copy(fc->y_mode_prob, default_if_y_probs);
320 vp9_copy(fc->switchable_interp_prob, default_switchable_interp_prob); 320 vp9_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
321 vp9_copy(fc->partition_prob, default_partition_probs); 321 vp9_copy(fc->partition_prob, default_partition_probs);
322 vp9_copy(fc->intra_inter_prob, default_intra_inter_p); 322 vp9_copy(fc->intra_inter_prob, default_intra_inter_p);
323 vp9_copy(fc->comp_inter_prob, default_comp_inter_p); 323 vp9_copy(fc->comp_inter_prob, default_comp_inter_p);
324 vp9_copy(fc->comp_ref_prob, default_comp_ref_p); 324 vp9_copy(fc->comp_ref_prob, default_comp_ref_p);
325 vp9_copy(fc->single_ref_prob, default_single_ref_p); 325 vp9_copy(fc->single_ref_prob, default_single_ref_p);
326 fc->tx_probs = default_tx_probs; 326 fc->tx_probs = default_tx_probs;
327 vp9_copy(fc->skip_probs, default_skip_probs); 327 vp9_copy(fc->skip_probs, default_skip_probs);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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 memset(cm->prev_mip, 0, 463 memset(cm->prev_mip, 0,
464 cm->mi_stride * (cm->mi_rows + 1) * 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_entropymode.h ('k') | source/libvpx/vp9/common/vp9_enums.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698