ff_init_block_index() sets MpegEncContext.dest and MpegEncContext.block_index. The latter is unused by ff_mpv_reconstruct_mb() (which is what this code is preparatory for) and dest is overwritten a few lines below. So don't initialize block_index at all.
Unified · Split
| @@ -76,10 +76,6 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, · 75 unmodified lines | |||
| 76 | s->mcsel = 0; | 76 | s->mcsel = 0; |
| 77 | memcpy(s->mv, mv, sizeof(*mv)); | 77 | memcpy(s->mv, mv, sizeof(*mv)); |
| 78 | 78 | ||
| 79 | ff_init_block_index(s); | ||
| 80 | ff_update_block_index(s, s->avctx->bits_per_raw_sample, | ||
| 81 | s->avctx->lowres, s->chroma_x_shift); | ||
| 82 | |||
| 83 | s->bdsp.clear_blocks(s->block[0]); | 79 | s->bdsp.clear_blocks(s->block[0]); |
| 84 | if (!s->chroma_y_shift) | 80 | if (!s->chroma_y_shift) |
| 85 | s->bdsp.clear_blocks(s->block[6]); | 81 | s->bdsp.clear_blocks(s->block[6]); |