diff options
Diffstat (limited to 'vp9/decoder/vp9_decodeframe.c')
-rw-r--r-- | vp9/decoder/vp9_decodeframe.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 39e4dcfe3..e27634cdd 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -587,7 +587,12 @@ static void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd, // Co-ordinate of containing block to pixel precision. int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x)); int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y)); - +#if CONFIG_BETTER_HW_COMPATIBILITY + assert(xd->mi[0]->mbmi.sb_type != BLOCK_4X8 && + xd->mi[0]->mbmi.sb_type != BLOCK_8X4); + assert(mv_q4.row == mv->row * (1 << (1 - pd->subsampling_y)) && + mv_q4.col == mv->col * (1 << (1 - pd->subsampling_x))); +#endif // Co-ordinate of the block to 1/16th pixel precision. x0_16 = (x_start + x) << SUBPEL_BITS; y0_16 = (y_start + y) << SUBPEL_BITS; @@ -714,6 +719,18 @@ static void dec_build_inter_predictors_sb(VP9Decoder *const pbi, const InterpKernel *kernel = vp9_filter_kernels[mi->mbmi.interp_filter]; const BLOCK_SIZE sb_type = mi->mbmi.sb_type; const int is_compound = has_second_ref(&mi->mbmi); + int ref; + + for (ref = 0; ref < 1 + is_compound; ++ref) { + const MV_REFERENCE_FRAME frame = mi->mbmi.ref_frame[ref]; + RefBuffer *ref_buf = &pbi->common.frame_refs[frame - LAST_FRAME]; + + xd->block_refs[ref] = ref_buf; + if (!vp9_is_valid_scale(&ref_buf->sf)) + vpx_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM, + "Reference frame has invalid dimensions"); + vp9_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col, &ref_buf->sf); + } for (plane = 0; plane < MAX_MB_PLANE; ++plane) { struct macroblockd_plane *const pd = &xd->plane[plane]; |