1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

checkasm/swscale: fix function prototypes

This aligns declared function types in checkasm with real definition.

Fixes FATE: checkasm-{sw_rgb,sw_scale,sw_yuv2rgb,sw_yuv2yuv}

Fixes: runtime error: call to function <func> through pointer to incorrect function type
Fixes: c1a0e65763

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-07-03 22:59:02 +02:00
parent 9015d595a1
commit ec51162bb6
4 changed files with 11 additions and 11 deletions

View File

@ -142,7 +142,7 @@ static void check_rgb24toyv12(SwsContext *sws)
declare_func(void, const uint8_t *src, uint8_t *ydst, uint8_t *udst, declare_func(void, const uint8_t *src, uint8_t *ydst, uint8_t *udst,
uint8_t *vdst, int width, int height, int lumStride, uint8_t *vdst, int width, int height, int lumStride,
int chromStride, int srcStride, int32_t *rgb2yuv); int chromStride, int srcStride, const int32_t *rgb2yuv);
randomize_buffers(src, BUFSIZE * 3); randomize_buffers(src, BUFSIZE * 3);

View File

@ -362,7 +362,7 @@ static void check_hscale(void)
// The dst parameter here is either int16_t or int32_t but we use void* to // The dst parameter here is either int16_t or int32_t but we use void* to
// just cover both cases. // just cover both cases.
declare_func(void, void *c, void *dst, int dstW, declare_func(void, SwsInternal *c, int16_t *dst, int dstW,
const uint8_t *src, const int16_t *filter, const uint8_t *src, const int16_t *filter,
const int32_t *filterPos, int filterSize); const int32_t *filterPos, int filterSize);
@ -422,11 +422,11 @@ static void check_hscale(void)
memset(dst0, 0, SRC_PIXELS * sizeof(dst0[0])); memset(dst0, 0, SRC_PIXELS * sizeof(dst0[0]));
memset(dst1, 0, SRC_PIXELS * sizeof(dst1[0])); memset(dst1, 0, SRC_PIXELS * sizeof(dst1[0]));
call_ref(NULL, dst0, sws->dst_w, src, filter, filterPos, width); call_ref(NULL, (int16_t *)dst0, sws->dst_w, src, filter, filterPos, width);
call_new(NULL, dst1, sws->dst_w, src, filterAvx2, filterPosAvx, width); call_new(NULL, (int16_t *)dst1, sws->dst_w, src, filterAvx2, filterPosAvx, width);
if (memcmp(dst0, dst1, sws->dst_w * sizeof(dst0[0]))) if (memcmp(dst0, dst1, sws->dst_w * sizeof(dst0[0])))
fail(); fail();
bench_new(NULL, dst0, sws->dst_w, src, filter, filterPosAvx, width); bench_new(NULL, (int16_t *)dst0, sws->dst_w, src, filter, filterPosAvx, width);
} }
} }
} }

View File

@ -107,9 +107,9 @@ static void check_yuv2rgb(int src_pix_fmt)
static const int input_sizes[] = {8, 128, 1080, MAX_LINE_SIZE}; static const int input_sizes[] = {8, 128, 1080, MAX_LINE_SIZE};
declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT,
int, SwsInternal *c, const uint8_t *src[], int, SwsInternal *c, const uint8_t *const src[],
int srcStride[], int srcSliceY, int srcSliceH, const int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[]); uint8_t *const dst[], const int dstStride[]);
LOCAL_ALIGNED_8(uint8_t, src_y, [MAX_LINE_SIZE * 2]); LOCAL_ALIGNED_8(uint8_t, src_y, [MAX_LINE_SIZE * 2]);
LOCAL_ALIGNED_8(uint8_t, src_u, [MAX_LINE_SIZE]); LOCAL_ALIGNED_8(uint8_t, src_u, [MAX_LINE_SIZE]);

View File

@ -46,9 +46,9 @@ static void check_semiplanar(int dst_pix_fmt)
static const int input_sizes[] = {8, 128, 1080, MAX_LINE_SIZE}; static const int input_sizes[] = {8, 128, 1080, MAX_LINE_SIZE};
declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT,
int, SwsInternal *c, const uint8_t *src[], int, SwsInternal *c, const uint8_t *const src[],
int srcStride[], int srcSliceY, int srcSliceH, const int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[]); uint8_t *const dstParam[], const int dstStride[]);
LOCAL_ALIGNED_8(uint8_t, src_y, [MAX_LINE_SIZE * NUM_LINES]); LOCAL_ALIGNED_8(uint8_t, src_y, [MAX_LINE_SIZE * NUM_LINES]);
LOCAL_ALIGNED_8(uint8_t, src_uv, [MAX_LINE_SIZE * NUM_LINES * 2]); LOCAL_ALIGNED_8(uint8_t, src_uv, [MAX_LINE_SIZE * NUM_LINES * 2]);