EC_ADAPT: use tile context for switchable filter.
Change-Id: I7bbd3c62341ede45628641766b8683b77f3a7efb
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4687944..286e97c 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1072,6 +1072,11 @@
aom_writer *w) {
AV1_COMMON *const cm = &cpi->common;
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
+#if CONFIG_EC_ADAPT
+ FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
+#else
+ FRAME_CONTEXT *ec_ctx = cm->fc;
+#endif
if (cm->interp_filter == SWITCHABLE) {
#if CONFIG_DUAL_FILTER
@@ -1087,7 +1092,7 @@
has_subpel_mv_component(xd->mi[0], xd, dir + 2))) {
const int ctx = av1_get_pred_context_switchable_interp(xd, dir);
av1_write_token(w, av1_switchable_interp_tree,
- cm->fc->switchable_interp_prob[ctx],
+ ec_ctx->switchable_interp_prob[ctx],
&switchable_interp_encodings[mbmi->interp_filter[dir]]);
++cpi->interp_filter_selected[0][mbmi->interp_filter[dir]];
}
@@ -1097,10 +1102,10 @@
const int ctx = av1_get_pred_context_switchable_interp(xd);
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol(w, av1_switchable_interp_ind[mbmi->interp_filter],
- cm->fc->switchable_interp_cdf[ctx], SWITCHABLE_FILTERS);
+ ec_ctx->switchable_interp_cdf[ctx], SWITCHABLE_FILTERS);
#else
av1_write_token(w, av1_switchable_interp_tree,
- cm->fc->switchable_interp_prob[ctx],
+ ec_ctx->switchable_interp_prob[ctx],
&switchable_interp_encodings[mbmi->interp_filter]);
#endif
++cpi->interp_filter_selected[0][mbmi->interp_filter];