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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_modecosts.c

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mcomp.c ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.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
11 11
12 #include "vp9/common/vp9_blockd.h" 12 #include "vp9/common/vp9_blockd.h"
13 #include "vp9/encoder/vp9_onyx_int.h" 13 #include "vp9/encoder/vp9_onyx_int.h"
14 #include "vp9/encoder/vp9_treewriter.h" 14 #include "vp9/encoder/vp9_treewriter.h"
15 #include "vp9/common/vp9_entropymode.h" 15 #include "vp9/common/vp9_entropymode.h"
16 16
17 17
18 void vp9_init_mode_costs(VP9_COMP *c) { 18 void vp9_init_mode_costs(VP9_COMP *c) {
19 VP9_COMMON *const cm = &c->common; 19 VP9_COMMON *const cm = &c->common;
20 const vp9_tree_p KT = vp9_intra_mode_tree; 20 const vp9_tree_index *KT = vp9_intra_mode_tree;
21 int i, j; 21 int i, j;
22 22
23 for (i = 0; i < INTRA_MODES; i++) { 23 for (i = 0; i < INTRA_MODES; i++) {
24 for (j = 0; j < INTRA_MODES; j++) { 24 for (j = 0; j < INTRA_MODES; j++) {
25 vp9_cost_tokens((int *)c->mb.y_mode_costs[i][j], vp9_kf_y_mode_prob[i][j], 25 vp9_cost_tokens((int *)c->mb.y_mode_costs[i][j], vp9_kf_y_mode_prob[i][j],
26 KT); 26 KT);
27 } 27 }
28 } 28 }
29 29
30 // TODO(rbultje) separate tables for superblock costing? 30 // TODO(rbultje) separate tables for superblock costing?
31 vp9_cost_tokens(c->mb.mbmode_cost, cm->fc.y_mode_prob[1], 31 vp9_cost_tokens(c->mb.mbmode_cost, cm->fc.y_mode_prob[1],
32 vp9_intra_mode_tree); 32 vp9_intra_mode_tree);
33 vp9_cost_tokens(c->mb.intra_uv_mode_cost[1], 33 vp9_cost_tokens(c->mb.intra_uv_mode_cost[1],
34 cm->fc.uv_mode_prob[INTRA_MODES - 1], vp9_intra_mode_tree); 34 cm->fc.uv_mode_prob[INTRA_MODES - 1], vp9_intra_mode_tree);
35 vp9_cost_tokens(c->mb.intra_uv_mode_cost[0], 35 vp9_cost_tokens(c->mb.intra_uv_mode_cost[0],
36 vp9_kf_uv_mode_prob[INTRA_MODES - 1], 36 vp9_kf_uv_mode_prob[INTRA_MODES - 1],
37 vp9_intra_mode_tree); 37 vp9_intra_mode_tree);
38 38
39 for (i = 0; i <= SWITCHABLE_FILTERS; ++i) 39 for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
40 vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i], 40 vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i],
41 cm->fc.switchable_interp_prob[i], 41 cm->fc.switchable_interp_prob[i],
42 vp9_switchable_interp_tree); 42 vp9_switchable_interp_tree);
43 } 43 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mcomp.c ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698