From ee18edb13a9ae3041df961dd5003c2055b5cab35 Mon Sep 17 00:00:00 2001 From: Alan Kelly Date: Fri, 19 Feb 2021 14:55:39 +0100 Subject: checkasm/sw_scale: properly initialize src_pixer and filter_coeff buffers Fixes valgrind uninitialised value warnings. Signed-off-by: James Almer --- tests/checkasm/sw_scale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index 7504f8b45f..dee1af820c 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -86,8 +86,8 @@ static void check_yuv2yuvX(void) uint16_t coeff[8]; } *vFilterData; uint8_t d_val = rnd(); - randomize_buffers(filter_coeff, LARGEST_FILTER); - randomize_buffers(src_pixels, LARGEST_FILTER * LARGEST_INPUT_SIZE); + randomize_buffers((uint8_t*)src_pixels, LARGEST_FILTER * LARGEST_INPUT_SIZE * sizeof(int16_t)); + randomize_buffers((uint8_t*)filter_coeff, LARGEST_FILTER * sizeof(int16_t)); ctx = sws_alloc_context(); if (sws_init_context(ctx, NULL, NULL) < 0) fail(); -- cgit v1.2.3