Commit 6462afe0 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

Fix ref_frame segment feature when it is intra.

Change-Id: Ifbf790c14cee0c08a27f6728e3c637404e1f8477
parent 28164eb9
......@@ -525,9 +525,15 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mbmi->mb_skip_coeff = vp9_read(r, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
// Read the reference frame
mbmi->ref_frame[0] = vp9_read(r, vp9_get_pred_prob(cm, xd, PRED_INTRA_INTER));
cm->fc.intra_inter_count[vp9_get_pred_context(cm, xd, PRED_INTRA_INTER)]
[mbmi->ref_frame[0] != INTRA_FRAME]++;
if (!vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_REF_FRAME)) {
mbmi->ref_frame[0] =
vp9_read(r, vp9_get_pred_prob(cm, xd, PRED_INTRA_INTER));
cm->fc.intra_inter_count[vp9_get_pred_context(cm, xd, PRED_INTRA_INTER)]
[mbmi->ref_frame[0] != INTRA_FRAME]++;
} else {
mbmi->ref_frame[0] =
vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_REF_FRAME) != INTRA_FRAME;
}
if (cm->txfm_mode == TX_MODE_SELECT &&
(mbmi->mb_skip_coeff == 0 || mbmi->ref_frame[0] == INTRA_FRAME) &&
......
......@@ -561,7 +561,9 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_get_pred_prob(pc, xd, PRED_MBSKIP));
}
vp9_write(bc, rf != INTRA_FRAME, vp9_get_pred_prob(pc, xd, PRED_INTRA_INTER));
if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME))
vp9_write(bc, rf != INTRA_FRAME,
vp9_get_pred_prob(pc, xd, PRED_INTRA_INTER));
if (mi->sb_type >= BLOCK_SIZE_SB8X8 && pc->txfm_mode == TX_MODE_SELECT &&
!(rf != INTRA_FRAME &&
......
......@@ -631,15 +631,17 @@ static void update_stats(VP9_COMP *cpi, int mi_row, int mi_col) {
if (cm->frame_type != KEY_FRAME) {
int segment_id, seg_ref_active;
cpi->intra_inter_count[vp9_get_pred_context(cm, xd, PRED_INTRA_INTER)]
[mbmi->ref_frame[0] > INTRA_FRAME]++;
segment_id = mbmi->segment_id;
seg_ref_active = vp9_segfeature_active(xd, segment_id,
SEG_LVL_REF_FRAME);
if (!seg_ref_active)
cpi->intra_inter_count[vp9_get_pred_context(cm, xd, PRED_INTRA_INTER)]
[mbmi->ref_frame[0] > INTRA_FRAME]++;
// If the segment reference feature is enabled we have only a single
// reference frame allowed for the segment so exclude it from
// the reference frame counts used to work out probabilities.
segment_id = mbmi->segment_id;
seg_ref_active = vp9_segfeature_active(xd, segment_id,
SEG_LVL_REF_FRAME);
if ((mbmi->ref_frame[0] > INTRA_FRAME) && !seg_ref_active) {
if (cm->comp_pred_mode == HYBRID_PREDICTION)
cpi->comp_inter_count[vp9_get_pred_context(cm, xd,
......
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