summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2012-10-22 14:43:01 -0700
committerDeb Mukherjee <debargha@google.com>2012-10-23 08:50:52 -0700
commit537311971348b1919de8b36266f900aa4657672f (patch)
tree0e6cf0972d087cb01b21fc4aeea42c5186ba7edf /vp8/decoder
parentf93d316e0c7121aca5857f3d6e1530dcd82e9d7f (diff)
downloadlibvpx-537311971348b1919de8b36266f900aa4657672f.tar
libvpx-537311971348b1919de8b36266f900aa4657672f.tar.gz
libvpx-537311971348b1919de8b36266f900aa4657672f.tar.bz2
libvpx-537311971348b1919de8b36266f900aa4657672f.zip
Merging in the Switchable interp experiment
There is a macro DEFAULT_INTERP_FILTER defined in encoder/onyx_if.c that is set as EIGHTTAP for now - so SWITCHABLE is not really used. Ideally, this should be SWITCHABLE but that would make the encoder quite a bit slower. We will change the default filter to SWITCHABLE once we find a faster way to search for switchable filters. Change-Id: Iee91832cdc07e6e14108d9b543130fdd12fc9874
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/decodemv.c8
-rw-r--r--vp8/decoder/decodframe.c7
2 files changed, 1 insertions, 14 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c
index 83b899edf..0adc3333e 100644
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -475,13 +475,11 @@ static const unsigned char mbsplit_fill_offset[4][16] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
};
-#if CONFIG_SWITCHABLE_INTERP
static void read_switchable_interp_probs(VP8D_COMP* const pbi,
BOOL_DECODER* const bc) {
VP8_COMMON *const cm = &pbi->common;
int i, j;
for (j = 0; j <= VP8_SWITCHABLE_FILTERS; ++j) {
- //for (j = 0; j <= 0; ++j) {
for (i = 0; i < VP8_SWITCHABLE_FILTERS - 1; ++i) {
cm->fc.switchable_interp_prob[j][i] = vp8_read_literal(bc, 8);
}
@@ -489,7 +487,6 @@ static void read_switchable_interp_probs(VP8D_COMP* const pbi,
//printf("DECODER: %d %d\n", cm->fc.switchable_interp_prob[0],
//cm->fc.switchable_interp_prob[1]);
}
-#endif
static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) {
VP8_COMMON *const cm = &pbi->common;
@@ -506,10 +503,8 @@ static void mb_mode_mv_init(VP8D_COMP *pbi, vp8_reader *bc) {
if (cm->pred_filter_mode == 2)
cm->prob_pred_filter_off = (vp8_prob)vp8_read_literal(bc, 8);
#endif
-#if CONFIG_SWITCHABLE_INTERP
if (cm->mcomp_filter_type == SWITCHABLE)
read_switchable_interp_probs(pbi, bc);
-#endif
// Decode the baseline probabilities for decoding reference frame
cm->prob_intra_coded = (vp8_prob)vp8_read_literal(bc, 8);
cm->prob_last_coded = (vp8_prob)vp8_read_literal(bc, 8);
@@ -756,19 +751,16 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mbmi->pred_filter_enabled = cm->pred_filter_mode;
}
#endif
-#if CONFIG_SWITCHABLE_INTERP
if (mbmi->mode >= NEARESTMV && mbmi->mode <= SPLITMV)
{
if (cm->mcomp_filter_type == SWITCHABLE) {
mbmi->interp_filter = vp8_switchable_interp[
vp8_treed_read(bc, vp8_switchable_interp_tree,
get_pred_probs(cm, xd, PRED_SWITCHABLE_INTERP))];
- //printf("Reading: %d\n", mbmi->interp_filter);
} else {
mbmi->interp_filter = cm->mcomp_filter_type;
}
}
-#endif
if (cm->comp_pred_mode == COMP_PREDICTION_ONLY ||
(cm->comp_pred_mode == HYBRID_PREDICTION &&
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 8e1ebe35d..bc35b17dc 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -253,11 +253,9 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
//mode = xd->mode_info_context->mbmi.mode;
-#if CONFIG_SWITCHABLE_INTERP
if (pbi->common.frame_type != KEY_FRAME)
vp8_setup_interp_filters(xd, xd->mode_info_context->mbmi.interp_filter,
&pbi->common);
-#endif
if (eobtotal == 0 && mode != B_PRED && mode != SPLITMV
&& mode != I8X8_PRED
@@ -1298,12 +1296,9 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
/* Is high precision mv allowed */
xd->allow_high_precision_mv = (unsigned char)vp8_read_bit(&header_bc);
// Read the type of subpel filter to use
-#if CONFIG_SWITCHABLE_INTERP
if (vp8_read_bit(&header_bc)) {
pc->mcomp_filter_type = SWITCHABLE;
- } else
-#endif
- {
+ } else {
pc->mcomp_filter_type = vp8_read_literal(&header_bc, 2);
}
/* To enable choice of different interploation filters */