vpx/vp9/encoder/vp9_modecosts.c
Jingning Han 4729a6f389 further clean-ups on intra4x4 coding
Removed one 4x4 prediction step that was unnessary in the rd loop.
Removed a unused modecosts estimate from encoder side.

Change-Id: I65221a52719d6876492996955ef04142d2752d86
2013-05-28 11:19:05 -07:00

46 lines
1.6 KiB
C

/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vp9/common/vp9_blockd.h"
#include "vp9/encoder/vp9_onyx_int.h"
#include "vp9/encoder/vp9_treewriter.h"
#include "vp9/common/vp9_entropymode.h"
void vp9_init_mode_costs(VP9_COMP *c) {
VP9_COMMON *x = &c->common;
const vp9_tree_p KT = vp9_bmode_tree;
int i, j;
for (i = 0; i < VP9_BINTRAMODES; i++) {
for (j = 0; j < VP9_BINTRAMODES; j++) {
vp9_cost_tokens((int *)c->mb.bmode_costs[i][j],
x->kf_bmode_prob[i][j], KT);
}
}
// TODO(rbultje) separate tables for superblock costing?
vp9_cost_tokens(c->mb.mbmode_cost[1], x->fc.sb_ymode_prob,
vp9_sb_ymode_tree);
vp9_cost_tokens(c->mb.mbmode_cost[0],
x->sb_kf_ymode_prob[c->common.kf_ymode_probs_index],
vp9_sb_ymode_tree);
vp9_cost_tokens(c->mb.intra_uv_mode_cost[1],
x->fc.uv_mode_prob[VP9_YMODES - 1], vp9_uv_mode_tree);
vp9_cost_tokens(c->mb.intra_uv_mode_cost[0],
x->kf_uv_mode_prob[VP9_YMODES - 1], vp9_uv_mode_tree);
for (i = 0; i <= VP9_SWITCHABLE_FILTERS; ++i)
vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i],
x->fc.switchable_interp_prob[i],
vp9_switchable_interp_tree);
}