diff options
author | Jerome Borsboom <jerome.borsboom@carpalis.nl> | 2018-05-28 23:50:28 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-05-28 23:50:28 +0200 |
commit | 8a4dbd3e9fd13a0941bbb63d249ed92c2037fd4c (patch) | |
tree | d16c4858cb2a6fb9d8a060b70995fc248099c40f /libavcodec/vc1_block.c | |
parent | c0402e1e30c2318359af1bce1d652f4616b21566 (diff) | |
download | ffmpeg-8a4dbd3e9fd13a0941bbb63d249ed92c2037fd4c.tar.gz |
avcodec/vc1: store zero MVs for all blocks in a MB
Direct prediction for interlace frame B pictures references the mv in the
second block in an MB in the backward reference frame for the twomv case.
When the backward reference frame is an I frame, this value may be unset.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Diffstat (limited to 'libavcodec/vc1_block.c')
-rw-r--r-- | libavcodec/vc1_block.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 21ab108169..0160095c6c 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2678,8 +2678,10 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) s->bdsp.clear_blocks(block[0]); mb_pos = s->mb_x + s->mb_y * s->mb_stride; s->current_picture.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA; - s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0; - s->current_picture.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0; + for (int i = 0; i < 4; i++) { + s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = 0; + s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][1] = 0; + } // do actual MB decoding and displaying if (v->fieldtx_is_raw) |