Commit ad343687 authored by Ronald S. Bultje's avatar Ronald S. Bultje

New intra mode and partitioning probabilities.

Split partition probabilities between keyframes and non-keyframes,
since they are fairly different. Also have per-blocksize interframe
y intramode probabilities, since these vary heavily between different
blocksizes.

Lastly, replace default probabilities for partitioning and intra modes
with new ones generated from current codec. Replace counts with actual
probabilities also.

Change-Id: I77ca996e25e4a28e03bdbc542f27a3e64ca1234f
parent d03e974f
......@@ -21,6 +21,7 @@
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_enums.h"
#define BLOCK_SIZE_GROUPS 4
#define MAX_MB_SEGMENTS 8
#define MB_SEG_TREE_PROBS (MAX_MB_SEGMENTS-1)
#define PREDICTION_PROBS 3
......@@ -55,7 +56,8 @@ static INLINE int combine_entropy_contexts(ENTROPY_CONTEXT a,
typedef enum {
KEY_FRAME = 0,
INTER_FRAME = 1
INTER_FRAME = 1,
NUM_FRAME_TYPES,
} FRAME_TYPE;
typedef enum {
......
......@@ -15,58 +15,87 @@
#include "vp9/common/vp9_alloccommon.h"
#include "vpx_mem/vpx_mem.h"
static const unsigned int y_mode_cts[VP9_INTRA_MODES] = {
/* DC V H D45 D135 D117 D153 D27 D63 TM */
98, 19, 15, 14, 14, 14, 14, 12, 12, 13,
static const vp9_prob default_kf_uv_probs[VP9_INTRA_MODES]
[VP9_INTRA_MODES - 1] = {
{ 149, 13, 48, 141, 174, 131, 54, 61, 109 } /* y = dc */,
{ 120, 17, 119, 132, 103, 103, 54, 100, 130 } /* y = v */,
{ 114, 16, 19, 177, 220, 145, 31, 33, 122 } /* y = h */,
{ 119, 12, 43, 102, 133, 133, 77, 90, 102 } /* y = d45 */,
{ 110, 10, 28, 144, 78, 158, 40, 49, 161 } /* y = d135 */,
{ 114, 10, 46, 169, 50, 96, 48, 70, 150 } /* y = d117 */,
{ 116, 10, 24, 125, 134, 168, 26, 27, 193 } /* y = d153 */,
{ 121, 14, 26, 124, 175, 143, 36, 37, 79 } /* y = d27 */,
{ 116, 13, 54, 100, 105, 122, 58, 126, 122 } /* y = d63 */,
{ 98, 22, 60, 147, 159, 124, 45, 68, 128 } /* y = tm */
};
static const unsigned int uv_mode_cts[VP9_INTRA_MODES][VP9_INTRA_MODES] = {
/* DC V H D45 135 117 153 D27 D63 TM */
{ 200, 15, 15, 10, 10, 10, 10, 10, 10, 6}, /* DC */
{ 130, 75, 10, 10, 10, 10, 10, 10, 10, 6}, /* V */
{ 130, 10, 75, 10, 10, 10, 10, 10, 10, 6}, /* H */
{ 130, 15, 10, 75, 10, 10, 10, 10, 10, 6}, /* D45 */
{ 150, 15, 10, 10, 75, 10, 10, 10, 10, 6}, /* D135 */
{ 150, 15, 10, 10, 10, 75, 10, 10, 10, 6}, /* D117 */
{ 150, 15, 10, 10, 10, 10, 75, 10, 10, 6}, /* D153 */
{ 150, 15, 10, 10, 10, 10, 10, 75, 10, 6}, /* D27 */
{ 150, 15, 10, 10, 10, 10, 10, 10, 75, 6}, /* D63 */
{ 160, 30, 30, 10, 10, 10, 10, 10, 10, 16}, /* TM */
static const vp9_prob default_if_y_probs[BLOCK_SIZE_GROUPS]
[VP9_INTRA_MODES - 1] = {
{ 42, 31, 23, 150, 161, 193, 32, 53, 100 } /* block_size < 8x8 */,
{ 132, 58, 30, 160, 209, 195, 52, 47, 76 } /* block_size < 16x16 */,
{ 179, 85, 24, 168, 236, 198, 87, 45, 46 } /* block_size < 32x32 */,
{ 221, 176, 63, 133, 233, 121, 125, 105, 34 } /* block_size >= 32x32 */
};
static const unsigned int kf_uv_mode_cts[VP9_INTRA_MODES][VP9_INTRA_MODES] = {
// DC V H D45 135 117 153 D27 D63 TM
{ 160, 24, 24, 20, 20, 20, 20, 20, 20, 8}, /* DC */
{ 102, 64, 30, 20, 20, 20, 20, 20, 20, 10}, /* V */
{ 102, 30, 64, 20, 20, 20, 20, 20, 20, 10}, /* H */
{ 102, 33, 20, 64, 20, 20, 20, 20, 20, 14}, /* D45 */
{ 102, 33, 20, 20, 64, 20, 20, 20, 20, 14}, /* D135 */
{ 122, 33, 20, 20, 20, 64, 20, 20, 20, 14}, /* D117 */
{ 102, 33, 20, 20, 20, 20, 64, 20, 20, 14}, /* D153 */
{ 102, 33, 20, 20, 20, 20, 20, 64, 20, 14}, /* D27 */
{ 102, 33, 20, 20, 20, 20, 20, 20, 64, 14}, /* D63 */
{ 132, 36, 30, 20, 20, 20, 20, 20, 20, 18}, /* TM */
static const vp9_prob default_if_uv_probs[VP9_INTRA_MODES]
[VP9_INTRA_MODES - 1] = {
{ 115, 7, 78, 180, 210, 127, 34, 57, 104 } /* y = dc */,
{ 43, 9, 165, 140, 112, 93, 45, 125, 117 } /* y = v */,
{ 68, 6, 25, 206, 241, 154, 16, 23, 102 } /* y = h */,
{ 90, 5, 48, 117, 155, 134, 61, 88, 96 } /* y = d45 */,
{ 77, 5, 43, 148, 100, 147, 37, 60, 146 } /* y = d135 */,
{ 75, 5, 57, 167, 62, 91, 45, 76, 139 } /* y = d117 */,
{ 86, 4, 34, 155, 185, 163, 22, 29, 160 } /* y = d153 */,
{ 82, 5, 34, 155, 207, 144, 26, 38, 79 } /* y = d27 */,
{ 69, 6, 65, 105, 104, 122, 48, 131, 116 } /* y = d63 */,
{ 86, 16, 114, 177, 189, 108, 28, 72, 120 } /* y = tm */
};
const vp9_prob vp9_partition_probs[NUM_PARTITION_CONTEXTS]
const vp9_prob vp9_partition_probs[NUM_FRAME_TYPES][NUM_PARTITION_CONTEXTS]
[PARTITION_TYPES - 1] = {
// FIXME(jingning,rbultje) put real probabilities here
{202, 162, 107},
{16, 2, 169},
{3, 246, 19},
{104, 90, 134},
{202, 162, 107},
{16, 2, 169},
{3, 246, 19},
{104, 90, 134},
{202, 162, 107},
{16, 2, 169},
{3, 246, 19},
{104, 90, 134},
{183, 70, 109},
{30, 14, 162},
{67, 208, 22},
{4, 17, 5},
{ /* frame_type = keyframe */
/* 8x8 -> 4x4 */
{ 164, 121, 109 } /* a/l both not split */,
{ 69, 11, 129 } /* a split, l not split */,
{ 52, 181, 37 } /* l split, a not split */,
{ 66, 71, 93 } /* a/l both split */,
/* 16x16 -> 8x8 */
{ 154, 48, 43 } /* a/l both not split */,
{ 81, 11, 63 } /* a split, l not split */,
{ 67, 65, 17 } /* l split, a not split */,
{ 57, 18, 24 } /* a/l both split */,
/* 32x32 -> 16x16 */
{ 156, 42, 35 } /* a/l both not split */,
{ 74, 10, 40 } /* a split, l not split */,
{ 59, 53, 10 } /* l split, a not split */,
{ 28, 10, 9 } /* a/l both split */,
/* 64x64 -> 32x32 */
{ 168, 32, 43 } /* a/l both not split */,
{ 59, 13, 41 } /* a split, l not split */,
{ 60, 25, 10 } /* l split, a not split */,
{ 13, 5, 4 } /* a/l both split */
}, { /* frame_type = interframe */
/* 8x8 -> 4x4 */
{ 192, 121, 151 } /* a/l both not split */,
{ 134, 63, 162 } /* a split, l not split */,
{ 136, 134, 127 } /* l split, a not split */,
{ 101, 97, 131 } /* a/l both split */,
/* 16x16 -> 8x8 */
{ 167, 67, 80 } /* a/l both not split */,
{ 87, 36, 70 } /* a split, l not split */,
{ 90, 61, 45 } /* l split, a not split */,
{ 46, 31, 32 } /* a/l both split */,
/* 32x32 -> 16x16 */
{ 167, 63, 75 } /* a/l both not split */,
{ 67, 27, 61 } /* a split, l not split */,
{ 56, 87, 31 } /* l split, a not split */,
{ 15, 13, 11 } /* a/l both split */,
/* 64x64 -> 32x32 */
{ 222, 45, 44 } /* a/l both not split */,
{ 62, 17, 62 } /* a split, l not split */,
{ 52, 65, 16 } /* l split, a not split */,
{ 9, 7, 6 } /* a/l both split */
}
};
/* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */
......@@ -101,18 +130,12 @@ struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
void vp9_init_mbmode_probs(VP9_COMMON *x) {
unsigned int bct[VP9_INTRA_MODES][2]; // num Ymodes > num UV modes
int i;
vp9_tree_probs_from_distribution(vp9_intra_mode_tree, x->fc.y_mode_prob,
bct, y_mode_cts, 0);
for (i = 0; i < VP9_INTRA_MODES; i++) {
vp9_tree_probs_from_distribution(vp9_intra_mode_tree, x->kf_uv_mode_prob[i],
bct, kf_uv_mode_cts[i], 0);
vp9_tree_probs_from_distribution(vp9_intra_mode_tree, x->fc.uv_mode_prob[i],
bct, uv_mode_cts[i], 0);
}
vpx_memcpy(x->fc.uv_mode_prob, default_if_uv_probs,
sizeof(default_if_uv_probs));
vpx_memcpy(x->kf_uv_mode_prob, default_kf_uv_probs,
sizeof(default_kf_uv_probs));
vpx_memcpy(x->fc.y_mode_prob, default_if_y_probs,
sizeof(default_if_y_probs));
vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob,
sizeof(vp9_switchable_interp_prob));
......@@ -280,9 +303,10 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
printf("};\n");
#endif
update_mode_probs(VP9_INTRA_MODES, vp9_intra_mode_tree,
fc->y_mode_counts, fc->pre_y_mode_prob,
fc->y_mode_prob, 0);
for (i = 0; i < BLOCK_SIZE_GROUPS; i++)
update_mode_probs(VP9_INTRA_MODES, vp9_intra_mode_tree,
fc->y_mode_counts[i], fc->pre_y_mode_prob[i],
fc->y_mode_prob[i], 0);
for (i = 0; i < VP9_INTRA_MODES; ++i)
update_mode_probs(VP9_INTRA_MODES, vp9_intra_mode_tree,
......@@ -292,7 +316,7 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
for (i = 0; i < NUM_PARTITION_CONTEXTS; i++)
update_mode_probs(PARTITION_TYPES, vp9_partition_tree,
fc->partition_counts[i], fc->pre_partition_prob[i],
fc->partition_prob[i], 0);
fc->partition_prob[INTER_FRAME][i], 0);
if (cm->mcomp_filter_type == SWITCHABLE) {
for (i = 0; i <= VP9_SWITCHABLE_FILTERS; i++) {
......
......@@ -21,7 +21,7 @@ extern int vp9_mv_cont(const int_mv *l, const int_mv *a);
extern const vp9_prob vp9_kf_default_bmode_probs[VP9_INTRA_MODES]
[VP9_INTRA_MODES]
[VP9_INTRA_MODES -1 ];
[VP9_INTRA_MODES - 1];
extern const vp9_tree_index vp9_intra_mode_tree[];
extern const vp9_tree_index vp9_sb_mv_ref_tree[];
......@@ -35,6 +35,9 @@ extern struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
// probability models for partition information
extern const vp9_tree_index vp9_partition_tree[];
extern struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
extern const vp9_prob vp9_partition_probs[NUM_FRAME_TYPES]
[NUM_PARTITION_CONTEXTS]
[PARTITION_TYPES - 1];
void vp9_entropy_mode_init(void);
......
This diff is collapsed.
......@@ -45,18 +45,19 @@
#define MAX_LAG_BUFFERS 25
typedef struct frame_contexts {
vp9_prob y_mode_prob[VP9_INTRA_MODES - 1]; /* interframe intra mode probs */
vp9_prob y_mode_prob[BLOCK_SIZE_GROUPS][VP9_INTRA_MODES - 1];
vp9_prob uv_mode_prob[VP9_INTRA_MODES][VP9_INTRA_MODES - 1];
vp9_prob partition_prob[NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_prob partition_prob[NUM_FRAME_TYPES][NUM_PARTITION_CONTEXTS]
[PARTITION_TYPES - 1];
nmv_context nmvc;
nmv_context pre_nmvc;
/* interframe intra mode probs */
vp9_prob pre_y_mode_prob[VP9_INTRA_MODES - 1];
vp9_prob pre_y_mode_prob[BLOCK_SIZE_GROUPS][VP9_INTRA_MODES - 1];
vp9_prob pre_uv_mode_prob[VP9_INTRA_MODES][VP9_INTRA_MODES - 1];
vp9_prob pre_partition_prob[NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
/* interframe intra mode probs */
unsigned int y_mode_counts[VP9_INTRA_MODES];
unsigned int y_mode_counts[BLOCK_SIZE_GROUPS][VP9_INTRA_MODES];
unsigned int uv_mode_counts[VP9_INTRA_MODES][VP9_INTRA_MODES];
unsigned int partition_counts[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
......
......@@ -404,17 +404,20 @@ static void mb_mode_mv_init(VP9D_COMP *pbi, vp9_reader *r) {
cm->prob_comppred[i] = vp9_read_prob(r);
// VP9_INTRA_MODES
for (i = 0; i < VP9_INTRA_MODES - 1; ++i) {
if (vp9_read(r, VP9_DEF_UPDATE_PROB)) {
cm->fc.y_mode_prob[i] =
vp9_read_prob_diff_update(r, cm->fc.y_mode_prob[i]);
for (j = 0; j < BLOCK_SIZE_GROUPS; j++) {
for (i = 0; i < VP9_INTRA_MODES - 1; ++i) {
if (vp9_read(r, VP9_DEF_UPDATE_PROB)) {
cm->fc.y_mode_prob[j][i] =
vp9_read_prob_diff_update(r, cm->fc.y_mode_prob[j][i]);
}
}
}
for (j = 0; j < NUM_PARTITION_CONTEXTS; ++j) {
for (i = 0; i < PARTITION_TYPES - 1; ++i) {
if (vp9_read(r, VP9_DEF_UPDATE_PROB)) {
cm->fc.partition_prob[j][i] =
vp9_read_prob_diff_update(r, cm->fc.partition_prob[j][i]);
cm->fc.partition_prob[INTER_FRAME][j][i] =
vp9_read_prob_diff_update(r,
cm->fc.partition_prob[INTER_FRAME][j][i]);
}
}
}
......@@ -785,16 +788,19 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mv0->as_int = 0;
if (bsize >= BLOCK_SIZE_SB8X8) {
mbmi->mode = read_intra_mode(r, cm->fc.y_mode_prob);
cm->fc.y_mode_counts[mbmi->mode]++;
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
const int bsl = MIN(bwl, bhl);
mbmi->mode = read_intra_mode(r, cm->fc.y_mode_prob[MIN(3, bsl)]);
cm->fc.y_mode_counts[MIN(3, bsl)][mbmi->mode]++;
} else {
int idx, idy;
for (idy = 0; idy < 2; idy += bh) {
for (idx = 0; idx < 2; idx += bw) {
int ib = idy * 2 + idx, k;
int m = read_intra_mode(r, cm->fc.y_mode_prob);
int m = read_intra_mode(r, cm->fc.y_mode_prob[0]);
mi->bmi[ib].as_mode.first = m;
cm->fc.y_mode_counts[m]++;
cm->fc.y_mode_counts[0][m]++;
for (k = 1; k < bh; ++k)
mi->bmi[ib + k * 2].as_mode.first = m;
for (k = 1; k < bw; ++k)
......
......@@ -474,7 +474,7 @@ static void decode_modes_sb(VP9D_COMP *pbi, int mi_row, int mi_col,
xd->above_seg_context = pc->above_seg_context + mi_col;
pl = partition_plane_context(xd, bsize);
partition = treed_read(r, vp9_partition_tree,
pc->fc.partition_prob[pl]);
pc->fc.partition_prob[pc->frame_type][pl]);
pc->fc.partition_counts[pl][partition]++;
}
......@@ -757,7 +757,7 @@ static void update_frame_context(FRAME_CONTEXT *fc) {
vp9_copy(fc->pre_coef_probs, fc->coef_probs);
vp9_copy(fc->pre_y_mode_prob, fc->y_mode_prob);
vp9_copy(fc->pre_uv_mode_prob, fc->uv_mode_prob);
vp9_copy(fc->pre_partition_prob, fc->partition_prob);
vp9_copy(fc->pre_partition_prob, fc->partition_prob[1]);
fc->pre_nmvc = fc->nmvc;
vp9_copy(fc->pre_switchable_interp_prob, fc->switchable_interp_prob);
vp9_copy(fc->pre_inter_mode_probs, fc->inter_mode_probs);
......
......@@ -325,13 +325,15 @@ static void update_mode(
static void update_mbintra_mode_probs(VP9_COMP* const cpi,
vp9_writer* const bc) {
VP9_COMMON *const cm = &cpi->common;
int j;
vp9_prob pnew[VP9_INTRA_MODES - 1];
unsigned int bct[VP9_INTRA_MODES - 1][2];
update_mode(bc, VP9_INTRA_MODES, vp9_intra_mode_encodings,
vp9_intra_mode_tree, pnew,
cm->fc.y_mode_prob, bct, (unsigned int *)cpi->y_mode_count);
for (j = 0; j < BLOCK_SIZE_GROUPS; j++)
update_mode(bc, VP9_INTRA_MODES, vp9_intra_mode_encodings,
vp9_intra_mode_tree, pnew,
cm->fc.y_mode_prob[j], bct,
(unsigned int *)cpi->y_mode_count[j]);
}
void vp9_update_skip_probs(VP9_COMP *cpi) {
......@@ -676,15 +678,19 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
#endif
if (m->mbmi.sb_type >= BLOCK_SIZE_SB8X8) {
write_intra_mode(bc, mode, pc->fc.y_mode_prob);
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
const int bsl = MIN(bwl, bhl);
write_intra_mode(bc, mode, pc->fc.y_mode_prob[MIN(3, bsl)]);
} else {
int idx, idy;
int bw = 1 << b_width_log2(mi->sb_type);
int bh = 1 << b_height_log2(mi->sb_type);
for (idy = 0; idy < 2; idy += bh)
for (idx = 0; idx < 2; idx += bw)
write_intra_mode(bc, m->bmi[idy * 2 + idx].as_mode.first,
pc->fc.y_mode_prob);
for (idx = 0; idx < 2; idx += bw) {
MB_PREDICTION_MODE bm = m->bmi[idy * 2 + idx].as_mode.first;
write_intra_mode(bc, bm, pc->fc.y_mode_prob[0]);
}
}
write_intra_mode(bc, mi->uv_mode,
pc->fc.uv_mode_prob[mode]);
......@@ -900,7 +906,8 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
xd->above_seg_context = cm->above_seg_context + mi_col;
pl = partition_plane_context(xd, bsize);
// encode the partition information
write_token(bc, vp9_partition_tree, cm->fc.partition_prob[pl],
write_token(bc, vp9_partition_tree,
cm->fc.partition_prob[cm->frame_type][pl],
vp9_partition_encodings + partition);
}
......@@ -1557,7 +1564,8 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
vp9_copy(pc->fc.pre_coef_probs, pc->fc.coef_probs);
vp9_copy(pc->fc.pre_y_mode_prob, pc->fc.y_mode_prob);
vp9_copy(pc->fc.pre_uv_mode_prob, pc->fc.uv_mode_prob);
vp9_copy(pc->fc.pre_partition_prob, pc->fc.partition_prob);
vp9_copy(cpi->common.fc.pre_partition_prob,
cpi->common.fc.partition_prob[INTER_FRAME]);
pc->fc.pre_nmvc = pc->fc.nmvc;
vp9_copy(pc->fc.pre_switchable_interp_prob, pc->fc.switchable_interp_prob);
vp9_copy(pc->fc.pre_inter_mode_probs, pc->fc.inter_mode_probs);
......@@ -1614,7 +1622,8 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
vp9_prob Pnew[PARTITION_TYPES - 1];
unsigned int bct[PARTITION_TYPES - 1][2];
update_mode(&header_bc, PARTITION_TYPES, vp9_partition_encodings,
vp9_partition_tree, Pnew, pc->fc.partition_prob[i], bct,
vp9_partition_tree, Pnew,
pc->fc.partition_prob[pc->frame_type][i], bct,
(unsigned int *)cpi->partition_count[i]);
}
......
......@@ -1928,7 +1928,10 @@ static void sum_intra_stats(VP9_COMP *cpi, MACROBLOCK *x) {
++cpi->y_uv_mode_count[m][uvm];
if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB8X8) {
++cpi->y_mode_count[m];
const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
const int bsl = MIN(bwl, bhl);
++cpi->y_mode_count[MIN(bsl, 3)][m];
} else {
int idx, idy;
int bw = 1 << b_width_log2(xd->mode_info_context->mbmi.sb_type);
......@@ -1936,7 +1939,7 @@ static void sum_intra_stats(VP9_COMP *cpi, MACROBLOCK *x) {
for (idy = 0; idy < 2; idy += bh) {
for (idx = 0; idx < 2; idx += bw) {
int m = xd->mode_info_context->bmi[idy * 2 + idx].as_mode.first;
++cpi->y_mode_count[m];
++cpi->y_mode_count[0][m];
}
}
}
......
......@@ -28,7 +28,7 @@ void vp9_init_mode_costs(VP9_COMP *c) {
}
// TODO(rbultje) separate tables for superblock costing?
vp9_cost_tokens(c->mb.mbmode_cost, x->fc.y_mode_prob,
vp9_cost_tokens(c->mb.mbmode_cost, x->fc.y_mode_prob[1],
vp9_intra_mode_tree);
vp9_cost_tokens(c->mb.intra_uv_mode_cost[1],
x->fc.uv_mode_prob[VP9_INTRA_MODES - 1], vp9_intra_mode_tree);
......
......@@ -78,9 +78,9 @@ typedef struct {
vp9_coeff_probs_model coef_probs[TX_SIZE_MAX_SB][BLOCK_TYPES];
vp9_prob y_mode_prob[VP9_INTRA_MODES - 1]; /* interframe intra mode probs */
vp9_prob y_mode_prob[4][VP9_INTRA_MODES - 1];
vp9_prob uv_mode_prob[VP9_INTRA_MODES][VP9_INTRA_MODES - 1];
vp9_prob partition_prob[NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_prob partition_prob[2][NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_prob switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
[VP9_SWITCHABLE_FILTERS - 1];
......@@ -406,7 +406,7 @@ typedef struct VP9_COMP {
int cq_target_quality;
int y_mode_count[VP9_INTRA_MODES];
int y_mode_count[4][VP9_INTRA_MODES];
int y_uv_mode_count[VP9_INTRA_MODES][VP9_INTRA_MODES];
unsigned int partition_count[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
......
......@@ -264,7 +264,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
for (i = 0; i < NUM_PARTITION_CONTEXTS; i++)
vp9_cost_tokens(cpi->mb.partition_cost[i],
cpi->common.fc.partition_prob[i],
cpi->common.fc.partition_prob[cpi->common.frame_type][i],
vp9_partition_tree);
/*rough estimate for costing*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment