const MV *src_mv,
const struct scale_factors *sf,
int w, int h, int ref,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
enum mv_precision precision,
int x, int y, int bd) {
const int is_q4 = precision == MV_PRECISION_Q4;
src += (mv.row >> SUBPEL_BITS) * src_stride + (mv.col >> SUBPEL_BITS);
high_inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y,
- sf, w, h, ref, kernel, sf->x_step_q4, sf->y_step_q4, bd);
+ sf, w, h, ref, interp_filter, sf->x_step_q4,
+ sf->y_step_q4, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
const MV *src_mv,
const struct scale_factors *sf,
int w, int h, int ref,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
enum mv_precision precision,
int x, int y) {
const int is_q4 = precision == MV_PRECISION_Q4;
src += (mv.row >> SUBPEL_BITS) * src_stride + (mv.col >> SUBPEL_BITS);
inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y,
- sf, w, h, ref, kernel, sf->x_step_q4, sf->y_step_q4);
+ sf, w, h, ref, interp_filter, sf->x_step_q4, sf->y_step_q4);
}
void build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
struct macroblockd_plane *const pd = &xd->plane[plane];
const MODE_INFO *mi = xd->mi[0];
const int is_compound = has_second_ref(&mi->mbmi);
- const InterpKernel *kernel = vp10_filter_kernels[mi->mbmi.interp_filter];
+ const INTERP_FILTER interp_filter = mi->mbmi.interp_filter;
int ref;
for (ref = 0; ref < 1 + is_compound; ++ref) {
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
high_inter_predictor(pre, pre_buf->stride, dst, dst_buf->stride,
- subpel_x, subpel_y, sf, w, h, ref, kernel, xs, ys,
- xd->bd);
+ subpel_x, subpel_y, sf, w, h, ref,
+ interp_filter, xs, ys, xd->bd);
} else {
inter_predictor(pre, pre_buf->stride, dst, dst_buf->stride,
- subpel_x, subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_x, subpel_y, sf, w, h, ref, interp_filter, xs, ys);
}
#else
inter_predictor(pre, pre_buf->stride, dst, dst_buf->stride,
- subpel_x, subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_x, subpel_y, sf, w, h, ref, interp_filter, xs, ys);
#endif // CONFIG_VP9_HIGHBITDEPTH
}
}
uint8_t *const dst = &pd->dst.buf[(ir * pd->dst.stride + ic) << 2];
int ref;
const int is_compound = has_second_ref(&mi->mbmi);
- const InterpKernel *kernel = vp10_filter_kernels[mi->mbmi.interp_filter];
+ const INTERP_FILTER interp_filter = mi->mbmi.interp_filter;
for (ref = 0; ref < 1 + is_compound; ++ref) {
const uint8_t *pre =
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height,
- ref, kernel, MV_PRECISION_Q3,
+ ref, interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE + 4 * ic,
mi_row * MI_SIZE + 4 * ir, xd->bd);
} else {
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height, ref,
- kernel, MV_PRECISION_Q3,
+ interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE + 4 * ic,
mi_row * MI_SIZE + 4 * ir);
}
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height, ref,
- kernel, MV_PRECISION_Q3,
+ interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE + 4 * ic,
mi_row * MI_SIZE + 4 * ir);
#endif // CONFIG_VP9_HIGHBITDEPTH
#include "vp10/common/filter.h"
#include "vp10/common/onyxc_int.h"
#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_filter.h"
#ifdef __cplusplus
extern "C" {
const int subpel_y,
const struct scale_factors *sf,
int w, int h, int ref,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
int xs, int ys) {
+ const InterpKernel *kernel = vp10_filter_kernels[interp_filter];
#if CONFIG_EXT_INTERP && SUPPORT_NONINTERPOLATING_FILTERS
if (kernel[0][SUBPEL_TAPS / 2 - 1] == 128) {
// Interpolating filter
const int subpel_y,
const struct scale_factors *sf,
int w, int h, int ref,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
int xs, int ys, int bd) {
+ const InterpKernel *kernel = vp10_filter_kernels[interp_filter];
#if CONFIG_EXT_INTERP && SUPPORT_NONINTERPOLATING_FILTERS
if (kernel[0][SUBPEL_TAPS / 2 - 1] == 128) {
// Interpolating filter
const MV *mv_q3,
const struct scale_factors *sf,
int w, int h, int do_avg,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
enum mv_precision precision,
int x, int y);
const MV *mv_q3,
const struct scale_factors *sf,
int w, int h, int do_avg,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
enum mv_precision precision,
int x, int y, int bd);
#endif
int border_offset,
uint8_t *const dst, int dst_buf_stride,
int subpel_x, int subpel_y,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
const struct scale_factors *sf,
MACROBLOCKD *xd,
int w, int h, int ref, int xs, int ys) {
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
high_inter_predictor(buf_ptr, b_w, dst, dst_buf_stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys, xd->bd);
+ subpel_y, sf, w, h, ref, interp_filter,
+ xs, ys, xd->bd);
} else {
inter_predictor(buf_ptr, b_w, dst, dst_buf_stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_y, sf, w, h, ref, interp_filter, xs, ys);
}
}
int border_offset,
uint8_t *const dst, int dst_buf_stride,
int subpel_x, int subpel_y,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
const struct scale_factors *sf,
int w, int h, int ref, int xs, int ys) {
DECLARE_ALIGNED(16, uint8_t, mc_buf[80 * 2 * 80 * 2]);
buf_ptr = mc_buf + border_offset;
inter_predictor(buf_ptr, b_w, dst, dst_buf_stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_y, sf, w, h, ref, interp_filter, xs, ys);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
static void dec_build_inter_predictors(VP10Decoder *const pbi, MACROBLOCKD *xd,
int plane, int bw, int bh, int x,
int y, int w, int h, int mi_x, int mi_y,
- const InterpKernel *kernel,
+ const INTERP_FILTER interp_filter,
const struct scale_factors *sf,
struct buf_2d *pre_buf,
struct buf_2d *dst_buf, const MV* mv,
frame_width, frame_height, border_offset,
dst, dst_buf->stride,
subpel_x, subpel_y,
- kernel, sf,
+ interp_filter, sf,
#if CONFIG_VP9_HIGHBITDEPTH
xd,
#endif
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
high_inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys, xd->bd);
+ subpel_y, sf, w, h, ref, interp_filter,
+ xs, ys, xd->bd);
} else {
inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_y, sf, w, h, ref, interp_filter, xs, ys);
}
#else
inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x,
- subpel_y, sf, w, h, ref, kernel, xs, ys);
+ subpel_y, sf, w, h, ref, interp_filter, xs, ys);
#endif // CONFIG_VP9_HIGHBITDEPTH
}
const int mi_x = mi_col * MI_SIZE;
const int mi_y = mi_row * MI_SIZE;
const MODE_INFO *mi = xd->mi[0];
- const InterpKernel *kernel = vp10_filter_kernels[mi->mbmi.interp_filter];
+ const INTERP_FILTER interp_filter = mi->mbmi.interp_filter;
const BLOCK_SIZE sb_type = mi->mbmi.sb_type;
const int is_compound = has_second_ref(&mi->mbmi);
for (x = 0; x < num_4x4_w; ++x) {
const MV mv = average_split_mvs(pd, mi, ref, y * 2 + x);
dec_build_inter_predictors(pbi, xd, plane, n4w_x4, n4h_x4,
- 4 * x, 4 * y, pw, ph, mi_x, mi_y, kernel,
- sf, pre_buf, dst_buf, &mv,
- ref_frame_buf, is_scaled, ref);
+ 4 * x, 4 * y, pw, ph, mi_x, mi_y,
+ interp_filter, sf, pre_buf, dst_buf,
+ &mv, ref_frame_buf, is_scaled, ref);
}
}
} else {
const MV mv = mi->mbmi.mv[ref].as_mv;
dec_build_inter_predictors(pbi, xd, plane, n4w_x4, n4h_x4,
- 0, 0, n4w_x4, n4h_x4, mi_x, mi_y, kernel,
- sf, pre_buf, dst_buf, &mv, ref_frame_buf,
+ 0, 0, n4w_x4, n4h_x4, mi_x, mi_y,
+ interp_filter, sf, pre_buf, dst_buf,
+ &mv, ref_frame_buf,
is_scaled, ref);
}
}
const int mi_x = mi_col * MI_SIZE;
const int mi_y = mi_row * MI_SIZE;
const MODE_INFO *mi = xd->mi[0];
- const InterpKernel *kernel = vp10_filter_kernels[mi->mbmi.interp_filter];
+ const INTERP_FILTER interp_filter = mi->mbmi.interp_filter;
const int is_compound = has_second_ref(&mi->mbmi);
// For sub8x8 uv:
const int is_scaled = vp10_is_scaled(sf);
const MV mv = average_split_mvs(pd, mi, ref, block);
dec_build_inter_predictors(pbi, xd, plane, n4w_x4, n4h_x4,
- 0, 0, n4w_x4, n4h_x4, mi_x, mi_y, kernel,
- sf, pre_buf, dst_buf, &mv, ref_frame_buf,
- is_scaled, ref);
+ 0, 0, n4w_x4, n4h_x4, mi_x, mi_y,
+ interp_filter, sf, pre_buf, dst_buf,
+ &mv, ref_frame_buf, is_scaled, ref);
}
}
}
mbmi->ref_frame[1] < 0 ? 0 : mbmi->ref_frame[1]};
int_mv ref_mv[2];
int ite, ref;
- const InterpKernel *kernel = vp10_filter_kernels[mbmi->interp_filter];
+ const INTERP_FILTER interp_filter = mbmi->interp_filter;
struct scale_factors sf;
// Do joint motion search in compound mode to get more accurate mv.
second_pred, pw,
&frame_mv[refs[!id]].as_mv,
&sf, pw, ph, 0,
- kernel, MV_PRECISION_Q3,
+ interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE, mi_row * MI_SIZE,
xd->bd);
} else {
second_pred, pw,
&frame_mv[refs[!id]].as_mv,
&sf, pw, ph, 0,
- kernel, MV_PRECISION_Q3,
+ interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE, mi_row * MI_SIZE);
}
#else
second_pred, pw,
&frame_mv[refs[!id]].as_mv,
&sf, pw, ph, 0,
- kernel, MV_PRECISION_Q3,
+ interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE, mi_row * MI_SIZE);
#endif // CONFIG_VP9_HIGHBITDEPTH
int x, int y) {
const int which_mv = 0;
const MV mv = { mv_row, mv_col };
- const InterpKernel *const kernel =
- vp10_filter_kernels[xd->mi[0]->mbmi.interp_filter];
+ const INTERP_FILTER interp_filter = xd->mi[0]->mbmi.interp_filter;
enum mv_precision mv_precision_uv;
int uv_stride;
scale,
16, 16,
which_mv,
- kernel, MV_PRECISION_Q3, x, y, xd->bd);
+ interp_filter,
+ MV_PRECISION_Q3, x, y, xd->bd);
vp10_highbd_build_inter_predictor(u_mb_ptr, uv_stride,
&pred[256], uv_block_width,
scale,
uv_block_width, uv_block_height,
which_mv,
- kernel, mv_precision_uv, x, y, xd->bd);
+ interp_filter,
+ mv_precision_uv, x, y, xd->bd);
vp10_highbd_build_inter_predictor(v_mb_ptr, uv_stride,
&pred[512], uv_block_width,
scale,
uv_block_width, uv_block_height,
which_mv,
- kernel, mv_precision_uv, x, y, xd->bd);
+ interp_filter,
+ mv_precision_uv, x, y, xd->bd);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
scale,
16, 16,
which_mv,
- kernel, MV_PRECISION_Q3, x, y);
+ interp_filter, MV_PRECISION_Q3, x, y);
vp10_build_inter_predictor(u_mb_ptr, uv_stride,
&pred[256], uv_block_width,
scale,
uv_block_width, uv_block_height,
which_mv,
- kernel, mv_precision_uv, x, y);
+ interp_filter, mv_precision_uv, x, y);
vp10_build_inter_predictor(v_mb_ptr, uv_stride,
&pred[512], uv_block_width,
scale,
uv_block_width, uv_block_height,
which_mv,
- kernel, mv_precision_uv, x, y);
+ interp_filter, mv_precision_uv, x, y);
}
void vp10_temporal_filter_init(void) {