Commit 7d6b5425 authored by Adrian Grange's avatar Adrian Grange

New prediction filter

This patch removes the old pred-filter experiment and replaces it
with one that is implemented using the switchable filter framework.

If the pred-filter experiment is enabled, three interopolation
filters are tested during mode selection; the standard 8-tap
interpolation filter, a sharp 8-tap filter and a (new) 8-tap
smoothing filter.

The 6-tap filter code has been preserved for now and if the
enable-6tap experiment is enabled (in addition to the pred-filter
experiment) the original 6-tap filter replaces the new 8-tap smooth
filter in the switchable mode.

The new experiment applies the prediction filter in cases of a
fractional-pel motion vector. Future patches will apply the filter
where the mv is pel-aligned and also to intra predicted blocks.

Change-Id: I08e8cba978f2bbf3019f8413f376b8e2cd85eba4
parent 4b7304ee
......@@ -253,6 +253,7 @@ EXPERIMENT_LIST="
dwtdcthybrid
cnvcontext
newcoefcontext
enable_6tap
"
CONFIG_LIST="
external_build
......
......@@ -76,10 +76,13 @@ typedef enum {
typedef enum
{
SIXTAP = 0,
BILINEAR = 1,
EIGHTTAP = 2,
EIGHTTAP_SHARP = 3,
#if CONFIG_ENABLE_6TAP
SIXTAP,
#endif
EIGHTTAP_SMOOTH,
EIGHTTAP,
EIGHTTAP_SHARP,
BILINEAR,
SWITCHABLE /* should be the last one */
} INTERPOLATIONFILTERTYPE;
......@@ -268,10 +271,6 @@ typedef struct {
// a valid predictor
unsigned char mb_in_image;
#if CONFIG_PRED_FILTER
// Flag to turn prediction signal filter on(1)/off(0 ) at the MB level
unsigned int pred_filter_enabled;
#endif
INTERPOLATIONFILTERTYPE interp_filter;
BLOCK_SIZE_TYPE sb_type;
......@@ -399,11 +398,11 @@ typedef struct macroblockd {
void (*inv_walsh4x4_lossless)(int16_t *in, int16_t *out);
vp9_subpix_fn_t subpixel_predict;
vp9_subpix_fn_t subpixel_predict4x4;
vp9_subpix_fn_t subpixel_predict8x4;
vp9_subpix_fn_t subpixel_predict8x8;
vp9_subpix_fn_t subpixel_predict16x16;
vp9_subpix_fn_t subpixel_predict_avg;
vp9_subpix_fn_t subpixel_predict_avg4x4;
vp9_subpix_fn_t subpixel_predict_avg8x4;
vp9_subpix_fn_t subpixel_predict_avg8x8;
vp9_subpix_fn_t subpixel_predict_avg16x16;
......
......@@ -388,9 +388,15 @@ const vp9_tree_index vp9_switchable_interp_tree[VP9_SWITCHABLE_FILTERS*2-2] = {
-1, -2
};
struct vp9_token_struct vp9_switchable_interp_encodings[VP9_SWITCHABLE_FILTERS];
#if CONFIG_ENABLE_6TAP
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP9_SWITCHABLE_FILTERS] = {
EIGHTTAP, SIXTAP, EIGHTTAP_SHARP};
const int vp9_switchable_interp_map[SWITCHABLE+1] = {1, -1, 0, 2, -1};
SIXTAP, EIGHTTAP, EIGHTTAP_SHARP};
const int vp9_switchable_interp_map[SWITCHABLE+1] = {0, -1, 1, 2, -1, -1};
#else
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP9_SWITCHABLE_FILTERS] = {
EIGHTTAP, EIGHTTAP_SMOOTH, EIGHTTAP_SHARP};
const int vp9_switchable_interp_map[SWITCHABLE+1] = {1, 0, 2, -1, -1};
#endif
const vp9_prob vp9_switchable_interp_prob [VP9_SWITCHABLE_FILTERS+1]
[VP9_SWITCHABLE_FILTERS-1] = {
{248, 192}, { 32, 248}, { 32, 32}, {192, 160}
......@@ -408,7 +414,11 @@ const vp9_prob vp9_switchable_interp_prob [VP9_SWITCHABLE_FILTERS+1]
};
const INTERPOLATIONFILTERTYPE vp9_switchable_interp[VP9_SWITCHABLE_FILTERS] = {
EIGHTTAP, EIGHTTAP_SHARP};
const int vp9_switchable_interp_map[SWITCHABLE+1] = {-1, -1, 0, 1, -1}; //8, 8s
#if CONFIG_ENABLE_6TAP
const int vp9_switchable_interp_map[SWITCHABLE+1] = {-1, -1, 0, 1, -1, -1};
#else
const int vp9_switchable_interp_map[SWITCHABLE+1] = {-1, 0, 1, -1, -1};
#endif
#endif
void vp9_entropy_mode_init() {
......
......@@ -97,7 +97,11 @@ void vp9_kf_default_bmode_probs(vp9_prob dest[VP9_KF_BINTRAMODES]
void vp9_adapt_mode_probs(struct VP9Common *);
#if CONFIG_PRED_FILTER
#define VP9_SWITCHABLE_FILTERS 3 /* number of switchable filters */
#else
#define VP9_SWITCHABLE_FILTERS 2 /* number of switchable filters */
#endif
extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp
[VP9_SWITCHABLE_FILTERS];
......
This diff is collapsed.
......@@ -25,5 +25,6 @@ extern const int16_t vp9_bilinear_filters[SUBPEL_SHIFTS][2];
extern const int16_t vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6];
extern const int16_t vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8];
extern const int16_t vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8];
extern const int16_t vp9_sub_pel_filters_8lp[SUBPEL_SHIFTS][8];
#endif // VP9_COMMON_VP9_FILTER_H_
......@@ -278,13 +278,6 @@ typedef struct VP9Common {
struct postproc_state postproc_state;
#endif
#if CONFIG_PRED_FILTER
/* Prediction filter variables */
int pred_filter_mode; // 0=disabled at the frame level (no MB filtered)
// 1=enabled at the frame level (all MB filtered)
// 2=specified per MB (1=filtered, 0=non-filtered)
vp9_prob prob_pred_filter_off;
#endif
#if CONFIG_COMP_INTERINTRA_PRED
int use_interintra;
#endif
......
......@@ -18,39 +18,53 @@
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE mcomp_filter_type,
VP9_COMMON *cm) {
#if CONFIG_ENABLE_6TAP
if (mcomp_filter_type == SIXTAP) {
xd->subpixel_predict = vp9_sixtap_predict;
xd->subpixel_predict4x4 = vp9_sixtap_predict4x4;
xd->subpixel_predict8x4 = vp9_sixtap_predict8x4;
xd->subpixel_predict8x8 = vp9_sixtap_predict8x8;
xd->subpixel_predict16x16 = vp9_sixtap_predict16x16;
xd->subpixel_predict_avg = vp9_sixtap_predict_avg;
xd->subpixel_predict_avg4x4 = vp9_sixtap_predict_avg4x4;
xd->subpixel_predict_avg8x8 = vp9_sixtap_predict_avg8x8;
xd->subpixel_predict_avg16x16 = vp9_sixtap_predict_avg16x16;
} else if (mcomp_filter_type == EIGHTTAP || mcomp_filter_type == SWITCHABLE) {
xd->subpixel_predict = vp9_eighttap_predict;
} else {
#endif
if (mcomp_filter_type == EIGHTTAP || mcomp_filter_type == SWITCHABLE) {
xd->subpixel_predict4x4 = vp9_eighttap_predict4x4;
xd->subpixel_predict8x4 = vp9_eighttap_predict8x4;
xd->subpixel_predict8x8 = vp9_eighttap_predict8x8;
xd->subpixel_predict16x16 = vp9_eighttap_predict16x16;
xd->subpixel_predict_avg = vp9_eighttap_predict_avg4x4;
xd->subpixel_predict_avg4x4 = vp9_eighttap_predict_avg4x4;
xd->subpixel_predict_avg8x8 = vp9_eighttap_predict_avg8x8;
xd->subpixel_predict_avg16x16 = vp9_eighttap_predict_avg16x16;
} else if (mcomp_filter_type == EIGHTTAP_SMOOTH) {
xd->subpixel_predict4x4 = vp9_eighttap_predict4x4_smooth;
xd->subpixel_predict8x4 = vp9_eighttap_predict8x4_smooth;
xd->subpixel_predict8x8 = vp9_eighttap_predict8x8_smooth;
xd->subpixel_predict16x16 = vp9_eighttap_predict16x16_smooth;
xd->subpixel_predict_avg4x4 = vp9_eighttap_predict_avg4x4_smooth;
xd->subpixel_predict_avg8x8 = vp9_eighttap_predict_avg8x8_smooth;
xd->subpixel_predict_avg16x16 = vp9_eighttap_predict_avg16x16_smooth;
} else if (mcomp_filter_type == EIGHTTAP_SHARP) {
xd->subpixel_predict = vp9_eighttap_predict_sharp;
xd->subpixel_predict4x4 = vp9_eighttap_predict4x4_sharp;
xd->subpixel_predict8x4 = vp9_eighttap_predict8x4_sharp;
xd->subpixel_predict8x8 = vp9_eighttap_predict8x8_sharp;
xd->subpixel_predict16x16 = vp9_eighttap_predict16x16_sharp;
xd->subpixel_predict_avg = vp9_eighttap_predict_avg4x4_sharp;
xd->subpixel_predict_avg4x4 = vp9_eighttap_predict_avg4x4_sharp;
xd->subpixel_predict_avg8x8 = vp9_eighttap_predict_avg8x8_sharp;
xd->subpixel_predict_avg16x16 = vp9_eighttap_predict_avg16x16_sharp_c;
} else {
xd->subpixel_predict = vp9_bilinear_predict4x4;
xd->subpixel_predict4x4 = vp9_bilinear_predict4x4;
xd->subpixel_predict8x4 = vp9_bilinear_predict8x4;
xd->subpixel_predict8x8 = vp9_bilinear_predict8x8;
xd->subpixel_predict16x16 = vp9_bilinear_predict16x16;
xd->subpixel_predict_avg = vp9_bilinear_predict_avg4x4;
xd->subpixel_predict_avg4x4 = vp9_bilinear_predict_avg4x4;
xd->subpixel_predict_avg8x8 = vp9_bilinear_predict_avg8x8;
xd->subpixel_predict_avg16x16 = vp9_bilinear_predict_avg16x16;
}
#if CONFIG_ENABLE_6TAP
}
#endif
}
void vp9_copy_mem16x16_c(uint8_t *src,
......@@ -313,132 +327,6 @@ static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
}
}
/*encoder only*/
#if CONFIG_PRED_FILTER
// Select the thresholded or non-thresholded filter
#define USE_THRESH_FILTER 0
#define PRED_FILT_LEN 5
static const int filt_shift = 4;
static const int pred_filter[PRED_FILT_LEN] = {1, 2, 10, 2, 1};
// Alternative filter {1, 1, 4, 1, 1}
#if !USE_THRESH_FILTER
void filter_mb(uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
int width, int height) {
int i, j, k;
unsigned int temp[32 * 32];
unsigned int *pTmp = temp;
uint8_t *pSrc = src - (1 + src_stride) * (PRED_FILT_LEN / 2);
// Horizontal
for (i = 0; i < height + PRED_FILT_LEN - 1; i++) {
for (j = 0; j < width; j++) {
int sum = 0;
for (k = 0; k < PRED_FILT_LEN; k++)
sum += pSrc[j + k] * pred_filter[k];
pTmp[j] = sum;
}
pSrc += src_stride;
pTmp += width;
}
// Vertical
pTmp = temp;
for (i = 0; i < width; i++) {
uint8_t *pDst = dst + i;
for (j = 0; j < height; j++) {
int sum = 0;
for (k = 0; k < PRED_FILT_LEN; k++)
sum += pTmp[(j + k) * width] * pred_filter[k];
// Round
pDst[j * dst_stride] = (sum + ((1 << (filt_shift << 1)) >> 1)) >>
(filt_shift << 1);
}
++pTmp;
}
}
#else
// Based on vp9_post_proc_down_and_across_c (vp9_postproc.c)
void filter_mb(uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
int width, int height) {
uint8_t *pSrc, *pDst;
int row;
int col;
int i;
int v;
uint8_t d[8];
/* TODO flimit should be linked to the quantizer value */
int flimit = 7;
for (row = 0; row < height; row++) {
/* post_proc_down for one row */
pSrc = src;
pDst = dst;
for (col = 0; col < width; col++) {
int kernel = (1 << (filt_shift - 1));
int v = pSrc[col];
for (i = -2; i <= 2; i++) {
if (abs(v - pSrc[col + i * src_stride]) > flimit)
goto down_skip_convolve;
kernel += pred_filter[2 + i] * pSrc[col + i * src_stride];
}
v = (kernel >> filt_shift);
down_skip_convolve:
pDst[col] = v;
}
/* now post_proc_across */
pSrc = dst;
pDst = dst;
for (i = 0; i < 8; i++)
d[i] = pSrc[i];
for (col = 0; col < width; col++) {
int kernel = (1 << (filt_shift - 1));
v = pSrc[col];
d[col & 7] = v;
for (i = -2; i <= 2; i++) {
if (abs(v - pSrc[col + i]) > flimit)
goto across_skip_convolve;
kernel += pred_filter[2 + i] * pSrc[col + i];
}
d[col & 7] = (kernel >> filt_shift);
across_skip_convolve:
if (col >= 2)
pDst[col - 2] = d[(col - 2) & 7];
}
/* handle the last two pixels */
pDst[col - 2] = d[(col - 2) & 7];
pDst[col - 1] = d[(col - 1) & 7];
/* next row */
src += src_stride;
dst += dst_stride;
}
}
#endif // !USE_THRESH_FILTER
#endif // CONFIG_PRED_FILTER
/*encoder only*/
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
int i, j;
......@@ -523,13 +411,13 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd) {
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int)
build_inter_predictors2b(xd, d0, 8);
else {
vp9_build_inter_predictors_b(d0, 8, xd->subpixel_predict);
vp9_build_inter_predictors_b(d1, 8, xd->subpixel_predict);
vp9_build_inter_predictors_b(d0, 8, xd->subpixel_predict4x4);
vp9_build_inter_predictors_b(d1, 8, xd->subpixel_predict4x4);
}
if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
vp9_build_2nd_inter_predictors_b(d0, 8, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d1, 8, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d0, 8, xd->subpixel_predict_avg4x4);
vp9_build_2nd_inter_predictors_b(d1, 8, xd->subpixel_predict_avg4x4);
}
}
}
......@@ -587,29 +475,6 @@ void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
ptr = ptr_base + (ymv.as_mv.row >> 3) * pre_stride + (ymv.as_mv.col >> 3);
#if CONFIG_PRED_FILTER
if (xd->mode_info_context->mbmi.pred_filter_enabled) {
if ((ymv.as_mv.row | ymv.as_mv.col) & 7) {
// Sub-pel filter needs extended input
int len = 15 + (VP9_INTERP_EXTEND << 1);
uint8_t Temp[32 * 32]; // Data required by sub-pel filter
uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// Copy extended MB into Temp array, applying the spatial filter
filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
Temp, len, len, len);
// Sub-pel interpolation
xd->subpixel_predict16x16(pTemp, len,
(ymv.as_mv.col & 7) << 1,
(ymv.as_mv.row & 7) << 1,
dst_y, dst_ystride);
} else {
// Apply spatial filter to create the prediction directly
filter_mb(ptr, pre_stride, dst_y, dst_ystride, 16, 16);
}
} else
#endif
if ((ymv.as_mv.row | ymv.as_mv.col) & 7) {
xd->subpixel_predict16x16(ptr, pre_stride,
(ymv.as_mv.col & 7) << 1,
......@@ -658,37 +523,6 @@ void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
uptr = xd->pre.u_buffer + offset;
vptr = xd->pre.v_buffer + offset;
#if CONFIG_PRED_FILTER
if (xd->mode_info_context->mbmi.pred_filter_enabled) {
int i;
uint8_t *pSrc = uptr;
uint8_t *pDst = dst_u;
int len = 7 + (VP9_INTERP_EXTEND << 1);
uint8_t Temp[32 * 32]; // Data required by the sub-pel filter
uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// U & V
for (i = 0; i < 2; i++) {
if (_o16x16mv.as_int & 0x000f000f) {
// Copy extended MB into Temp array, applying the spatial filter
filter_mb(pSrc - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
Temp, len, len, len);
// Sub-pel filter
xd->subpixel_predict8x8(pTemp, len,
_o16x16mv.as_mv.col & 15,
_o16x16mv.as_mv.row & 15,
pDst, dst_uvstride);
} else {
filter_mb(pSrc, pre_stride, pDst, dst_uvstride, 8, 8);
}
// V
pSrc = vptr;
pDst = dst_v;
}
} else
#endif
if (_o16x16mv.as_int & 0x000f000f) {
xd->subpixel_predict8x8(uptr, pre_stride, _o16x16mv.as_mv.col & 15,
_o16x16mv.as_mv.row & 15, dst_u, dst_uvstride);
......@@ -849,9 +683,9 @@ void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
/*
* The following functions should be called after an initial
* call to vp9_build_1st_inter16x16_predictors_mb() or _mby()/_mbuv().
* It will run a second sixtap filter on a (different) ref
* It will run a second filter on a (different) ref
* frame and average the result with the output of the
* first sixtap filter. The second reference frame is stored
* first filter. The second reference frame is stored
* in x->second_pre (the reference frame index is in
* x->mode_info_context->mbmi.second_ref_frame). The second
* motion vector is x->mode_info_context->mbmi.second_mv.
......@@ -882,35 +716,11 @@ void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
ptr = ptr_base + (mv_row >> 3) * pre_stride + (mv_col >> 3);
#if CONFIG_PRED_FILTER
if (xd->mode_info_context->mbmi.pred_filter_enabled) {
if ((mv_row | mv_col) & 7) {
// Sub-pel filter needs extended input
int len = 15 + (VP9_INTERP_EXTEND << 1);
uint8_t Temp[32 * 32]; // Data required by sub-pel filter
uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// Copy extended MB into Temp array, applying the spatial filter
filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
Temp, len, len, len);
// Sub-pel filter
xd->subpixel_predict_avg16x16(pTemp, len, (mv_col & 7) << 1,
(mv_row & 7) << 1, dst_y, dst_ystride);
} else {
// TODO Needs to AVERAGE with the dst_y
// For now, do not apply the prediction filter in these cases!
vp9_avg_mem16x16(ptr, pre_stride, dst_y, dst_ystride);
}
} else
#endif // CONFIG_PRED_FILTER
{
if ((mv_row | mv_col) & 7) {
xd->subpixel_predict_avg16x16(ptr, pre_stride, (mv_col & 7) << 1,
(mv_row & 7) << 1, dst_y, dst_ystride);
} else {
vp9_avg_mem16x16(ptr, pre_stride, dst_y, dst_ystride);
}
if ((mv_row | mv_col) & 7) {
xd->subpixel_predict_avg16x16(ptr, pre_stride, (mv_col & 7) << 1,
(mv_row & 7) << 1, dst_y, dst_ystride);
} else {
vp9_avg_mem16x16(ptr, pre_stride, dst_y, dst_ystride);
}
}
......@@ -950,37 +760,6 @@ void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
uptr = xd->second_pre.u_buffer + offset;
vptr = xd->second_pre.v_buffer + offset;
#if CONFIG_PRED_FILTER
if (xd->mode_info_context->mbmi.pred_filter_enabled) {
int i;
int len = 7 + (VP9_INTERP_EXTEND << 1);
uint8_t Temp[32 * 32]; // Data required by sub-pel filter
uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
uint8_t *pSrc = uptr;
uint8_t *pDst = dst_u;
// U & V
for (i = 0; i < 2; i++) {
if ((omv_row | omv_col) & 15) {
// Copy extended MB into Temp array, applying the spatial filter
filter_mb(pSrc - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
Temp, len, len, len);
// Sub-pel filter
xd->subpixel_predict_avg8x8(pTemp, len, omv_col & 15,
omv_row & 15, pDst, dst_uvstride);
} else {
// TODO Needs to AVERAGE with the dst_[u|v]
// For now, do not apply the prediction filter here!
vp9_avg_mem8x8(pSrc, pre_stride, pDst, dst_uvstride);
}
// V
pSrc = vptr;
pDst = dst_v;
}
} else
#endif // CONFIG_PRED_FILTER
if ((omv_row | omv_col) & 15) {
xd->subpixel_predict_avg8x8(uptr, pre_stride, omv_col & 15,
omv_row & 15, dst_u, dst_uvstride);
......@@ -1058,13 +837,13 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) {
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int)
build_inter_predictors2b(xd, d0, 16);
else {
vp9_build_inter_predictors_b(d0, 16, xd->subpixel_predict);
vp9_build_inter_predictors_b(d1, 16, xd->subpixel_predict);
vp9_build_inter_predictors_b(d0, 16, xd->subpixel_predict4x4);
vp9_build_inter_predictors_b(d1, 16, xd->subpixel_predict4x4);
}
if (mbmi->second_ref_frame > 0) {
vp9_build_2nd_inter_predictors_b(d0, 16, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d1, 16, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d0, 16, xd->subpixel_predict_avg4x4);
vp9_build_2nd_inter_predictors_b(d1, 16, xd->subpixel_predict_avg4x4);
}
}
}
......@@ -1076,13 +855,13 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd) {
if (d0->bmi.as_mv.first.as_int == d1->bmi.as_mv.first.as_int)
build_inter_predictors2b(xd, d0, 8);
else {
vp9_build_inter_predictors_b(d0, 8, xd->subpixel_predict);
vp9_build_inter_predictors_b(d1, 8, xd->subpixel_predict);
vp9_build_inter_predictors_b(d0, 8, xd->subpixel_predict4x4);
vp9_build_inter_predictors_b(d1, 8, xd->subpixel_predict4x4);
}
if (mbmi->second_ref_frame > 0) {
vp9_build_2nd_inter_predictors_b(d0, 8, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d1, 8, xd->subpixel_predict_avg);
vp9_build_2nd_inter_predictors_b(d0, 8, xd->subpixel_predict_avg4x4);
vp9_build_2nd_inter_predictors_b(d1, 8, xd->subpixel_predict_avg4x4);
}
}
}
......
......@@ -310,8 +310,8 @@ specialize vp9_eighttap_predict_avg4x4
prototype void vp9_eighttap_predict8x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x4
prototype void vp9_eighttap_predict "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict
prototype void vp9_eighttap_predict4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict4x4
prototype void vp9_eighttap_predict16x16_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict16x16_sharp
......@@ -331,8 +331,29 @@ specialize vp9_eighttap_predict_avg4x4_sharp
prototype void vp9_eighttap_predict8x4_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x4_sharp
prototype void vp9_eighttap_predict_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_sharp
prototype void vp9_eighttap_predict4x4_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict4x4_sharp
prototype void vp9_eighttap_predict16x16_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict16x16_smooth
prototype void vp9_eighttap_predict8x8_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x8_smooth
prototype void vp9_eighttap_predict_avg16x16_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg16x16_smooth
prototype void vp9_eighttap_predict_avg8x8_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg8x8_smooth
prototype void vp9_eighttap_predict_avg4x4_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg4x4_smooth
prototype void vp9_eighttap_predict8x4_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x4_smooth
prototype void vp9_eighttap_predict4x4_smooth "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict4x4_smooth
prototype void vp9_sixtap_predict16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict16x16
......@@ -349,11 +370,11 @@ specialize vp9_sixtap_predict_avg8x8
prototype void vp9_sixtap_predict8x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict8x4
prototype void vp9_sixtap_predict "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict
prototype void vp9_sixtap_predict4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict4x4
prototype void vp9_sixtap_predict_avg "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict_avg
prototype void vp9_sixtap_predict_avg4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict_avg4x4
prototype void vp9_bilinear_predict16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict16x16 sse2
......
......@@ -550,12 +550,6 @@ static void mb_mode_mv_init(VP9D_COMP *pbi, vp9_reader *bc) {
if (!cm->kf_ymode_probs_update)
cm->kf_ymode_probs_index = vp9_read_literal(bc, 3);
} else {
#if CONFIG_PRED_FILTER
cm->pred_filter_mode = (vp9_prob)vp9_read_literal(bc, 2);
if (cm->pred_filter_mode == 2)
cm->prob_pred_filter_off = (vp9_prob)vp9_read_literal(bc, 8);
#endif
if (cm->mcomp_filter_type == SWITCHABLE)
read_switchable_interp_probs(pbi, bc);
#if CONFIG_COMP_INTERINTRA_PRED
......@@ -825,17 +819,6 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
#endif
}
#if CONFIG_PRED_FILTER
if (mbmi->mode >= NEARESTMV && mbmi->mode < SPLITMV) {
// Is the prediction filter enabled
if (cm->pred_filter_mode == 2)
mbmi->pred_filter_enabled =
vp9_read(bc, cm->prob_pred_filter_off);
else
mbmi->pred_filter_enabled = cm->pred_filter_mode;
}
#endif
if (mbmi->mode >= NEARESTMV && mbmi->mode <= SPLITMV)
{
if (cm->mcomp_filter_type == SWITCHABLE) {
......
......@@ -831,17 +831,6 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_accum_mv_refs(&cpi->common, mode, mi->mb_mode_context[rf]);
}
#if CONFIG_PRED_FILTER
// Is the prediction filter enabled
if (mode >= NEARESTMV && mode < SPLITMV) {
if (cpi->common.pred_filter_mode == 2)
vp9_write(bc, mi->pred_filter_enabled,
pc->prob_pred_filter_off);
else
assert(mi->pred_filter_enabled ==
cpi->common.pred_filter_mode);
}