diff options
Diffstat (limited to 'vp10/common')
-rw-r--r-- | vp10/common/reconinter.c | 47 | ||||
-rw-r--r-- | vp10/common/reconinter.h | 4 |
2 files changed, 51 insertions, 0 deletions
diff --git a/vp10/common/reconinter.c b/vp10/common/reconinter.c index 97c4abc6a..fdcb9673c 100644 --- a/vp10/common/reconinter.c +++ b/vp10/common/reconinter.c @@ -128,6 +128,53 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane, int block, } } +void vp10_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, + int i, int ir, int ic, + int mi_row, int mi_col) { + struct macroblockd_plane *const pd = &xd->plane[plane]; + MODE_INFO *const mi = xd->mi[0]; + const BLOCK_SIZE plane_bsize = get_plane_block_size(mi->mbmi.sb_type, pd); + const int width = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; + const int height = 4 * num_4x4_blocks_high_lookup[plane_bsize]; + + 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]; + + for (ref = 0; ref < 1 + is_compound; ++ref) { + const uint8_t *pre = + &pd->pre[ref].buf[(ir * pd->pre[ref].stride + ic) << 2]; +#if CONFIG_VP9_HIGHBITDEPTH + if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { + vp10_highbd_build_inter_predictor(pre, pd->pre[ref].stride, + dst, pd->dst.stride, + &mi->bmi[i].as_mv[ref].as_mv, + &xd->block_refs[ref]->sf, width, height, + ref, kernel, MV_PRECISION_Q3, + mi_col * MI_SIZE + 4 * ic, + mi_row * MI_SIZE + 4 * ir, xd->bd); + } else { + vp10_build_inter_predictor(pre, pd->pre[ref].stride, + dst, pd->dst.stride, + &mi->bmi[i].as_mv[ref].as_mv, + &xd->block_refs[ref]->sf, width, height, ref, + kernel, MV_PRECISION_Q3, + mi_col * MI_SIZE + 4 * ic, + mi_row * MI_SIZE + 4 * ir); + } +#else + vp10_build_inter_predictor(pre, pd->pre[ref].stride, + dst, pd->dst.stride, + &mi->bmi[i].as_mv[ref].as_mv, + &xd->block_refs[ref]->sf, width, height, ref, + kernel, MV_PRECISION_Q3, + mi_col * MI_SIZE + 4 * ic, + mi_row * MI_SIZE + 4 * ir); +#endif // CONFIG_VP9_HIGHBITDEPTH + } +} + static void build_inter_predictors_for_planes(MACROBLOCKD *xd, BLOCK_SIZE bsize, int mi_row, int mi_col, int plane_from, int plane_to) { diff --git a/vp10/common/reconinter.h b/vp10/common/reconinter.h index 1de405c4a..5678f473f 100644 --- a/vp10/common/reconinter.h +++ b/vp10/common/reconinter.h @@ -131,6 +131,10 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane, int block, int x, int y, int w, int h, int mi_x, int mi_y); +void vp10_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, + int i, int ir, int ic, + int mi_row, int mi_col); + void vp10_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col, BLOCK_SIZE bsize); |