Commit dd04ff50 authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review
Browse files

Merge "Move vp9_setup_interp_filter() to encoder"

Showing with 23 additions and 24 deletions
...@@ -20,25 +20,6 @@ ...@@ -20,25 +20,6 @@
#include "vp9/common/vp9_reconinter.h" #include "vp9/common/vp9_reconinter.h"
#include "vp9/common/vp9_reconintra.h" #include "vp9/common/vp9_reconintra.h"
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATION_TYPE mcomp_filter_type,
VP9_COMMON *cm) {
if (xd->mi_8x8 && xd->mi_8x8[0]) {
MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
set_scale_factors(xd, mbmi->ref_frame[0] - LAST_FRAME,
mbmi->ref_frame[1] - LAST_FRAME,
cm->active_ref_scale);
} else {
set_scale_factors(xd, -1, -1, cm->active_ref_scale);
}
xd->subpix.filter_x = xd->subpix.filter_y =
vp9_get_filter_kernel(mcomp_filter_type == SWITCHABLE ?
EIGHTTAP : mcomp_filter_type);
assert(((intptr_t)xd->subpix.filter_x & 0xff) == 0);
}
static void inter_predictor(const uint8_t *src, int src_stride, static void inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride, uint8_t *dst, int dst_stride,
......
...@@ -24,10 +24,6 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col, ...@@ -24,10 +24,6 @@ void vp9_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col,
void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col, void vp9_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE bsize); BLOCK_SIZE bsize);
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATION_TYPE filter,
VP9_COMMON *cm);
void vp9_build_inter_predictor(const uint8_t *src, int src_stride, void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride, uint8_t *dst, int dst_stride,
const MV *mv_q3, const MV *mv_q3,
......
...@@ -25,6 +25,26 @@ ...@@ -25,6 +25,26 @@
#include "vp9/encoder/vp9_rdopt.h" #include "vp9/encoder/vp9_rdopt.h"
#include "vp9/encoder/vp9_tokenize.h" #include "vp9/encoder/vp9_tokenize.h"
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATION_TYPE mcomp_filter_type,
VP9_COMMON *cm) {
if (xd->mi_8x8 && xd->mi_8x8[0]) {
MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
set_scale_factors(xd, mbmi->ref_frame[0] - LAST_FRAME,
mbmi->ref_frame[1] - LAST_FRAME,
cm->active_ref_scale);
} else {
set_scale_factors(xd, -1, -1, cm->active_ref_scale);
}
xd->subpix.filter_x = xd->subpix.filter_y =
vp9_get_filter_kernel(mcomp_filter_type == SWITCHABLE ?
EIGHTTAP : mcomp_filter_type);
assert(((intptr_t)xd->subpix.filter_x & 0xff) == 0);
}
void vp9_subtract_block_c(int rows, int cols, void vp9_subtract_block_c(int rows, int cols,
int16_t *diff_ptr, ptrdiff_t diff_stride, int16_t *diff_ptr, ptrdiff_t diff_stride,
const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *src_ptr, ptrdiff_t src_stride,
......
...@@ -54,5 +54,7 @@ void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize); ...@@ -54,5 +54,7 @@ void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize);
void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize); void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize);
int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred); int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred);
void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATION_TYPE mcomp_filter_type,
VP9_COMMON *cm);
#endif // VP9_ENCODER_VP9_ENCODEMB_H_ #endif // VP9_ENCODER_VP9_ENCODEMB_H_
Supports Markdown
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