>> 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 at carpalis.nl> >> --- >> libavcodec/vc1_block.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c >> index 74935ec9e9..9c170a1e3c 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; >> + } > > see AV_ZERO*
This style of setting motion_val to zero is used all over the VC-1 decoder. vc1_decode_p_mb_intfr uses the exact same code. Changing to AV_ZERO may certainly a good point for improvement, however, for the sake of consistency the proposed code might be preferable. Regards, Jerome _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel