Commit 47fd87e7 authored by Debargha Mukherjee's avatar Debargha Mukherjee Committed by Gerrit Code Review
Browse files

Merge "Fix mismatch with ext-interp." into nextgenv2

parents 8dcb06fd 1502d9e4
......@@ -864,20 +864,24 @@ static int read_is_obmc_block(VP10_COMMON *const cm, MACROBLOCKD *const xd,
}
#endif // CONFIG_OBMC
static INLINE INTERP_FILTER read_switchable_interp_filter(
static INLINE INTERP_FILTER read_interp_filter(
VP10_COMMON *const cm, MACROBLOCKD *const xd,
vp10_reader *r) {
const int ctx = vp10_get_pred_context_switchable_interp(xd);
FRAME_COUNTS *counts = xd->counts;
INTERP_FILTER type;
#if CONFIG_EXT_INTERP
if (!vp10_is_interp_needed(xd)) return EIGHTTAP_REGULAR;
#endif
type = (INTERP_FILTER)vp10_read_tree(r, vp10_switchable_interp_tree,
cm->fc->switchable_interp_prob[ctx]);
if (counts)
++counts->switchable_interp[ctx][type];
return type;
if (cm->interp_filter != SWITCHABLE) {
return cm->interp_filter;
} else {
const int ctx = vp10_get_pred_context_switchable_interp(xd);
FRAME_COUNTS *counts = xd->counts;
const INTERP_FILTER type =
(INTERP_FILTER)vp10_read_tree(r, vp10_switchable_interp_tree,
cm->fc->switchable_interp_prob[ctx]);
if (counts)
++counts->switchable_interp[ctx][type];
return type;
}
}
static void read_intra_block_mode_info(VP10_COMMON *const cm,
......@@ -1381,9 +1385,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
#endif
#if !CONFIG_EXT_INTERP
mbmi->interp_filter = (cm->interp_filter == SWITCHABLE)
? read_switchable_interp_filter(cm, xd, r)
: cm->interp_filter;
mbmi->interp_filter = read_interp_filter(cm, xd, r);
#endif // !CONFIG_EXT_INTERP
if (bsize < BLOCK_8X8) {
......@@ -1605,9 +1607,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
#endif // CONFIG_EXT_INTER
#if CONFIG_EXT_INTERP
mbmi->interp_filter = (cm->interp_filter == SWITCHABLE)
? read_switchable_interp_filter(cm, xd, r)
: cm->interp_filter;
mbmi->interp_filter = read_interp_filter(cm, xd, r);
#endif // CONFIG_EXT_INTERP
}
......
......@@ -1073,13 +1073,13 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi,
#if CONFIG_EXT_INTRA
if (mode != DC_PRED && mode != TM_PRED) {
int p_angle;
const int intra_filter_ctx = vp10_get_pred_context_intra_interp(xd);
write_uniform(w, 2 * MAX_ANGLE_DELTAS + 1,
MAX_ANGLE_DELTAS + mbmi->angle_delta[0]);
p_angle = mode_to_angle_map[mode] + mbmi->angle_delta[0] * ANGLE_STEP;
if (pick_intra_filter(p_angle)) {
const int ctx = vp10_get_pred_context_intra_interp(xd);
vp10_write_token(w, vp10_intra_filter_tree,
cm->fc->intra_filter_probs[intra_filter_ctx],
cm->fc->intra_filter_probs[ctx],
&intra_filter_encodings[mbmi->intra_filter]);
}
}
......
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