aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/llviddsp.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-14 21:31:53 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 01:03:52 +0200
commit1ea365082318f06cd42a8b37dd0c7724b599c821 (patch)
tree4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /tests/checkasm/llviddsp.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (diff)
downloadffmpeg-1ea365082318f06cd42a8b37dd0c7724b599c821.tar.gz
Replace all occurences of av_mallocz_array() by av_calloc()
They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests/checkasm/llviddsp.c')
-rw-r--r--tests/checkasm/llviddsp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/checkasm/llviddsp.c b/tests/checkasm/llviddsp.c
index 4f75ffc459..66e08c8099 100644
--- a/tests/checkasm/llviddsp.c
+++ b/tests/checkasm/llviddsp.c
@@ -46,8 +46,8 @@ static void check_add_bytes(LLVidDSPContext c, int width)
{
uint8_t *dst0 = av_mallocz(width);
uint8_t *dst1 = av_mallocz(width);
- uint8_t *src0 = av_mallocz_array(width, sizeof(uint8_t));
- uint8_t *src1 = av_mallocz_array(width, sizeof(uint8_t));
+ uint8_t *src0 = av_calloc(width, sizeof(*src0));
+ uint8_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t w);
init_buffer(src0, src1, uint8_t, width);
@@ -74,10 +74,10 @@ static void check_add_median_pred(LLVidDSPContext c, int width) {
int A0, A1, B0, B1;
uint8_t *dst0 = av_mallocz(width);
uint8_t *dst1 = av_mallocz(width);
- uint8_t *src0 = av_mallocz_array(width, sizeof(uint8_t));
- uint8_t *src1 = av_mallocz_array(width, sizeof(uint8_t));
- uint8_t *diff0 = av_mallocz_array(width, sizeof(uint8_t));
- uint8_t *diff1 = av_mallocz_array(width, sizeof(uint8_t));
+ uint8_t *src0 = av_calloc(width, sizeof(*src0));
+ uint8_t *src1 = av_calloc(width, sizeof(*src1));
+ uint8_t *diff0 = av_calloc(width, sizeof(*diff0));
+ uint8_t *diff1 = av_calloc(width, sizeof(*diff1));
declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, const uint8_t *src1,
const uint8_t *diff, ptrdiff_t w,
int *left, int *left_top);
@@ -112,8 +112,8 @@ static void check_add_left_pred(LLVidDSPContext c, int width, int acc, const cha
int res0, res1;
uint8_t *dst0 = av_mallocz(width);
uint8_t *dst1 = av_mallocz(width);
- uint8_t *src0 = av_mallocz_array(width, sizeof(uint8_t));
- uint8_t *src1 = av_mallocz_array(width, sizeof(uint8_t));
+ uint8_t *src0 = av_calloc(width, sizeof(*src0));
+ uint8_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, int, uint8_t *dst, uint8_t *src, ptrdiff_t w, int acc);
init_buffer(src0, src1, uint8_t, width);
@@ -139,10 +139,10 @@ static void check_add_left_pred(LLVidDSPContext c, int width, int acc, const cha
static void check_add_left_pred_16(LLVidDSPContext c, unsigned mask, int width, unsigned acc, const char * report)
{
int res0, res1;
- uint16_t *dst0 = av_mallocz_array(width, sizeof(uint16_t));
- uint16_t *dst1 = av_mallocz_array(width, sizeof(uint16_t));
- uint16_t *src0 = av_mallocz_array(width, sizeof(uint16_t));
- uint16_t *src1 = av_mallocz_array(width, sizeof(uint16_t));
+ uint16_t *dst0 = av_calloc(width, sizeof(*dst0));
+ uint16_t *dst1 = av_calloc(width, sizeof(*dst1));
+ uint16_t *src0 = av_calloc(width, sizeof(*src0));
+ uint16_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, int, uint16_t *dst, uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc);
init_buffer(src0, src1, uint16_t, width);