aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-08 01:28:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:38 +0200
commit963bdac226b611664bdd033a8b3a914e5e148ebd (patch)
tree1e74fe30cfd9d98f6b57c0607616f230d07da93d
parent6e1ca92206ad5c149f69693191a61aa98a1b5209 (diff)
downloadffmpeg-963bdac226b611664bdd033a8b3a914e5e148ebd.tar.gz
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>
-rw-r--r--libavcodec/vc1_block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 384979caf5..1d622b1a67 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -2680,8 +2680,7 @@ static int vc1_decode_i_blocks_adv(VC1Context *v)
s->mb_x = 0;
s->mb_y = s->start_mb_y;
if (s->start_mb_y) {
- init_block_index(v);
- memset(&s->coded_block[s->block_index[0] - s->b8_stride], 0,
+ memset(&s->coded_block[(2 * s->mb_y - 1) * s->b8_stride - 2], 0,
(1 + s->b8_stride) * sizeof(*s->coded_block));
}
for (; s->mb_y < s->end_mb_y; s->mb_y++) {