[FFmpeg-cvslog] checkasm/sw_scale: properly initialize src_pixer and filter_coeff buffers

Alan Kelly git at videolan.org
Fri Feb 19 16:22:27 EET 2021


ffmpeg | branch: master | Alan Kelly <alankelly-at-google.com at ffmpeg.org> | Fri Feb 19 14:55:39 2021 +0100| [ee18edb13a9ae3041df961dd5003c2055b5cab35] | committer: James Almer

checkasm/sw_scale: properly initialize src_pixer and filter_coeff buffers

Fixes valgrind uninitialised value warnings.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee18edb13a9ae3041df961dd5003c2055b5cab35
---

 tests/checkasm/sw_scale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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();



More information about the ffmpeg-cvslog mailing list