avcodec/vc1_block: Simplify resetting coded_block

Everything that init_block_index() sets will be overwritten
a few lines below again, so don't call it and simply calculate
the only thing that is used (namely block_index[0]) manually.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-06-08 01:28:16 +02:00
parent 6e1ca92206
commit 963bdac226
1 changed files with 1 additions and 2 deletions

View File

@ -2680,8 +2680,7 @@ static int vc1_decode_i_blocks_adv(VC1Context *v)
s->mb_x = 0; s->mb_x = 0;
s->mb_y = s->start_mb_y; s->mb_y = s->start_mb_y;
if (s->start_mb_y) { if (s->start_mb_y) {
init_block_index(v); memset(&s->coded_block[(2 * s->mb_y - 1) * s->b8_stride - 2], 0,
memset(&s->coded_block[s->block_index[0] - s->b8_stride], 0,
(1 + s->b8_stride) * sizeof(*s->coded_block)); (1 + s->b8_stride) * sizeof(*s->coded_block));
} }
for (; s->mb_y < s->end_mb_y; s->mb_y++) { for (; s->mb_y < s->end_mb_y; s->mb_y++) {