{
#if CONFIG_NEWENTROPY
MACROBLOCKD *const xd = & pbi->mb;
- xd->mode_info_context = m;
m->mbmi.mb_skip_coeff = vp8_read(bc, get_pred_prob(cm, xd, PRED_MBSKIP));
#else
m->mbmi.mb_skip_coeff = vp8_read(bc, pbi->prob_skip_false);
#if CONFIG_COMP_INTRA_PRED
m->mbmi.second_uv_mode = (MB_PREDICTION_MODE) (DC_PRED - 1);
#endif
+
}
static int read_mvcomponent(vp8_reader *r, const MV_CONTEXT *mvc)
int i;
VP8_COMMON *cm = &pbi->common;
MODE_INFO *mi = cm->mi;
+ MACROBLOCKD *const xd = &pbi->mb;
int sb_row, sb_col;
int sb_rows = (cm->mb_rows + 1)>>1;
int sb_cols = (cm->mb_cols + 1)>>1;
continue;
}
+ // Make sure the MacroBlockD mode info pointer is set correctly
+ xd->mode_info_context = mi;
+ xd->prev_mode_info_context = prev_mi;
+
pbi->mb.mb_to_top_edge = mb_to_top_edge = -((mb_row * 16)) << 3;
mb_to_top_edge -= LEFT_TOP_MARGIN;
// Make sure the MacroBlockD mode info pointer is set correctly
xd->mode_info_context = m;
-
xd->prev_mode_info_context = prev_m;
#ifdef ENTROPY_STATS
vp8_writer *const bc = & cpi->bc;
VP8_COMMON *const c = & cpi->common;
const int mis = c->mode_info_stride;
+ MACROBLOCKD *xd = &cpi->mb.e_mbd;
MODE_INFO *m;
int i;
int row, col;
int row_delta[4] = { 0, +1, 0, -1};
int col_delta[4] = {+1, -1, +1, +1};
- MACROBLOCKD *xd = &cpi->mb.e_mbd;
-
if (c->mb_no_coeff_skip)
{
// Divide by 0 check. 0 case possible with segment features
continue;
}
+ // Make sure the MacroBlockD mode info pointer is set correctly
+ xd->mode_info_context = m;
+
ym = m->mbmi.mode;
segment_id = m->mbmi.segment_id;
( !segfeature_active( xd, segment_id, SEG_LVL_EOB ) ||
(get_segdata( xd, segment_id, SEG_LVL_EOB ) != 0) ) )
{
- #if CONFIG_NEWENTROPY
+#if CONFIG_NEWENTROPY
vp8_encode_bool(bc, m->mbmi.mb_skip_coeff,
get_pred_prob(c, xd, PRED_MBSKIP));
- #else
+#else
vp8_encode_bool(bc, m->mbmi.mb_skip_coeff, prob_skip_false);
- #endif
+#endif
}
- #if CONFIG_QIMODE
+#if CONFIG_QIMODE
kfwrite_ymode(bc, ym,
c->kf_ymode_prob[c->kf_ymode_probs_index]);
- #else
+#else
kfwrite_ymode(bc, ym, c->kf_ymode_prob);
- #endif
+#endif
+
if (ym == B_PRED)
{
const int mis = c->mode_info_stride;
int i = 0;
- #if CONFIG_COMP_INTRA_PRED
+#if CONFIG_COMP_INTRA_PRED
int uses_second =
m->bmi[0].as_mode.second !=
(B_PREDICTION_MODE) (B_DC_PRED - 1);
vp8_write(bc, uses_second, 128);
- #endif
+#endif
do
{
const B_PREDICTION_MODE A = above_block_mode(m, i, mis);
const B_PREDICTION_MODE L = left_block_mode(m, i);
const int bm = m->bmi[i].as_mode.first;
- #if CONFIG_COMP_INTRA_PRED
+#if CONFIG_COMP_INTRA_PRED
const int bm2 = m->bmi[i].as_mode.second;
- #endif
+#endif
- #ifdef ENTROPY_STATS
+#ifdef ENTROPY_STATS
++intra_mode_stats [A] [L] [bm];
- #endif
+#endif
write_bmode(bc, bm, c->kf_bmode_prob [A] [L]);
- #if CONFIG_COMP_INTRA_PRED
+#if CONFIG_COMP_INTRA_PRED
if (uses_second)
{
write_bmode(bc, bm2, c->kf_bmode_prob [A] [L]);
}
- #endif
+#endif
}
while (++i < 16);
}
#else
write_uv_mode(bc, m->mbmi.uv_mode, c->kf_uv_mode_prob);
#endif
+
// Next MB
mb_row += dy;
mb_col += dx;