From 64a1a74f0a6dd625e6ac05951f6615269a097559 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Date: Thu, 13 Mar 2025 21:48:17 +0100 Subject: [PATCH 10/17] avcodec/hqx: Combine memsets Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/hqx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c index e5a727a609..c6f0989ee5 100644 --- a/libavcodec/hqx.c +++ b/libavcodec/hqx.c @@ -224,8 +224,7 @@ static int hqx_decode_422a(HQXContext *ctx, int slice_no, int x, int y) int i, ret; int cbp; - for (i = 0; i < 12; i++) - memset(slice->block[i], 0, sizeof(**slice->block) * 64); + memset(slice->block, 0, sizeof(*slice->block) * 12); for (i = 0; i < 12; i++) slice->block[i][0] = -0x800; @@ -308,8 +307,7 @@ static int hqx_decode_444a(HQXContext *ctx, int slice_no, int x, int y) int i, ret; int cbp; - for (i = 0; i < 16; i++) - memset(slice->block[i], 0, sizeof(**slice->block) * 64); + memset(slice->block, 0, sizeof(*slice->block) * 16); for (i = 0; i < 16; i++) slice->block[i][0] = -0x800; -- 2.45.2