Commit d1d11fc6 authored by Jingning Han's avatar Jingning Han

Unify frame border extension operation

This commit unifies the encoder and decoder border extension and
motion compensated prediction process. Remove the decoder specific
flow to simplify the development flow.

Change-Id: I9c43bbe6d7c017e6da2db6a62c5bf3d0af7ccfce
parent 2b7196a8
......@@ -119,6 +119,7 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
scaled_mv.col = mv_q4.col;
xs = ys = 16;
}
subpel_x = scaled_mv.col & SUBPEL_MASK;
subpel_y = scaled_mv.row & SUBPEL_MASK;
pre += (scaled_mv.row >> SUBPEL_BITS) * pre_buf->stride
......
......@@ -493,6 +493,7 @@ static int reconstruct_inter_block(MACROBLOCKD *const xd,
return eob;
}
#if (CONFIG_SUPERTX || CONFIG_OBMC)
static void build_mc_border(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
int x, int y, int b_w, int b_h, int w, int h) {
......@@ -581,9 +582,7 @@ static void high_build_mc_border(const uint8_t *src8, int src_stride,
ref_row += src_stride;
} while (--b_h);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
int x0, int y0, int b_w, int b_h,
int frame_width, int frame_height,
......@@ -616,9 +615,7 @@ static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
subpel_y, sf, w, h, ref, interp_filter, xs, ys);
}
}
#else
static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
int x0, int y0, int b_w, int b_h,
int frame_width, int frame_height,
......@@ -639,7 +636,6 @@ static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
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,
......@@ -872,6 +868,7 @@ static void dec_build_inter_predictors_sb(VP10Decoder *const pbi,
}
}
}
#endif // (CONFIG_SUPERTX || CONFIG_OBMC)
#if CONFIG_SUPERTX
static void dec_build_inter_predictors_sb_sub8x8(VP10Decoder *const pbi,
......@@ -1846,7 +1843,8 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
}
} else {
// Prediction
dec_build_inter_predictors_sb(pbi, xd, mi_row, mi_col);
vp10_build_inter_predictors_sb(xd, mi_row, mi_col,
VPXMAX(bsize, BLOCK_8X8));
#if CONFIG_OBMC
if (mbmi->obmc) {
#if CONFIG_VP9_HIGHBITDEPTH
......
......@@ -395,6 +395,8 @@ int vp10_receive_compressed_data(VP10Decoder *pbi,
swap_frame_buffers(pbi);
vpx_extend_frame_inner_borders(cm->frame_to_show);
vpx_clear_system_state();
if (!cm->show_existing_frame) {
......
......@@ -24,7 +24,7 @@ extern "C" {
#define VP9INNERBORDERINPIXELS 96
#define VP9_INTERP_EXTEND 4
#define VP9_ENC_BORDER_IN_PIXELS 160
#define VP9_DEC_BORDER_IN_PIXELS 32
#define VP9_DEC_BORDER_IN_PIXELS 160
typedef struct yv12_buffer_config {
int y_width;
......
Markdown is supported
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