ref: 0807e1b8f6d4a123286f82efeab435580e4f5948
parent: f5827699bf96a9f2ba046c10e239f3dfb5aa6667
parent: 84c5ed0e9860f9111e0be7a6726bc3afb794fa5d
author: Deb Mukherjee <debargha@google.com>
date: Thu May 30 09:33:51 EDT 2013
Merge "Bugfix in forward update with modeling on." into experimental
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1030,13 +1030,13 @@
VP9_COMP *cpi,
vp9_coeff_accum *context_counters,
#endif
- vp9_coeff_stats_model *coef_branch_ct,
+ vp9_coeff_stats *coef_branch_ct,
int block_types) {
int i, j, k, l;
#ifdef ENTROPY_STATS
int t = 0;
#endif
- unsigned int model_counts[UNCONSTRAINED_NODES + 1];
+ vp9_prob full_probs[ENTROPY_NODES];
for (i = 0; i < block_types; ++i) {
for (j = 0; j < REF_TYPES; ++j) {
@@ -1044,11 +1044,12 @@
for (l = 0; l < PREV_COEF_CONTEXTS; ++l) {
if (l >= 3 && k == 0)
continue;
- vp9_full_to_model_count(model_counts, coef_counts[i][j][k][l]);
- vp9_tree_probs_from_distribution(vp9_coefmodel_tree,
- coef_probs[i][j][k][l],
+ vp9_tree_probs_from_distribution(vp9_coef_tree,
+ full_probs,
coef_branch_ct[i][j][k][l],
- model_counts, 0);
+ coef_counts[i][j][k][l], 0);
+ vpx_memcpy(coef_probs[i][j][k][l], full_probs,
+ sizeof(vp9_prob) * UNCONSTRAINED_NODES);
#if CONFIG_BALANCED_COEFTREE
coef_branch_ct[i][j][k][l][1][1] = eob_branch_ct[i][j][k][l] -
coef_branch_ct[i][j][k][l][1][0];
@@ -1115,7 +1116,7 @@
#endif
vp9_coeff_probs_model *new_frame_coef_probs,
vp9_coeff_probs_model *old_frame_coef_probs,
- vp9_coeff_stats_model *frame_branch_ct,
+ vp9_coeff_stats *frame_branch_ct,
TX_SIZE tx_size) {
int i, j, k, l, t;
int update[2] = {0, 0};
@@ -1122,7 +1123,6 @@
int savings;
const int entropy_nodes_update = UNCONSTRAINED_NODES;
- // vp9_prob bestupd = find_coef_update_prob(cpi);
const int tstart = 0;
/* dry run to see if there is any udpate at all needed */
@@ -1136,7 +1136,7 @@
vp9_prob newp = new_frame_coef_probs[i][j][k][l][t];
const vp9_prob oldp = old_frame_coef_probs[i][j][k][l][t];
const vp9_prob upd = vp9_coef_update_prob[t];
- int s; // = prev_coef_savings[t];
+ int s;
int u = 0;
if (l >= 3 && k == 0)
@@ -1178,11 +1178,10 @@
vp9_prob newp = new_frame_coef_probs[i][j][k][l][t];
vp9_prob *oldp = old_frame_coef_probs[i][j][k][l] + t;
const vp9_prob upd = vp9_coef_update_prob[t];
- int s; // = prev_coef_savings[t];
+ int s;
int u = 0;
if (l >= 3 && k == 0)
continue;
-
if (t == PIVOT_NODE)
s = prob_diff_update_savings_search_model(
frame_branch_ct[i][j][k][l][0],
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -419,19 +419,19 @@
vp9_coeff_count coef_counts_4x4[BLOCK_TYPES];
vp9_coeff_probs_model frame_coef_probs_4x4[BLOCK_TYPES];
- vp9_coeff_stats_model frame_branch_ct_4x4[BLOCK_TYPES];
+ vp9_coeff_stats frame_branch_ct_4x4[BLOCK_TYPES];
vp9_coeff_count coef_counts_8x8[BLOCK_TYPES];
vp9_coeff_probs_model frame_coef_probs_8x8[BLOCK_TYPES];
- vp9_coeff_stats_model frame_branch_ct_8x8[BLOCK_TYPES];
+ vp9_coeff_stats frame_branch_ct_8x8[BLOCK_TYPES];
vp9_coeff_count coef_counts_16x16[BLOCK_TYPES];
vp9_coeff_probs_model frame_coef_probs_16x16[BLOCK_TYPES];
- vp9_coeff_stats_model frame_branch_ct_16x16[BLOCK_TYPES];
+ vp9_coeff_stats frame_branch_ct_16x16[BLOCK_TYPES];
vp9_coeff_count coef_counts_32x32[BLOCK_TYPES];
vp9_coeff_probs_model frame_coef_probs_32x32[BLOCK_TYPES];
- vp9_coeff_stats_model frame_branch_ct_32x32[BLOCK_TYPES];
+ vp9_coeff_stats frame_branch_ct_32x32[BLOCK_TYPES];
int gfu_boost;
int last_boost;
--
⑨