aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/h264qpel.c
diff options
context:
space:
mode:
authorHenrik Gramner <henrik@gramner.com>2015-08-16 13:00:21 +0200
committerHenrik Gramner <henrik@gramner.com>2015-08-19 16:17:35 +0200
commit18b101ff595c7f18e9571d26f8840f556b24ec03 (patch)
treef13145d96afd2d8d300ee4262ec7e9136a9d98a3 /tests/checkasm/h264qpel.c
parent99b9f0136c6e2d80c5ce2fc3c4125605035e11cb (diff)
downloadffmpeg-18b101ff595c7f18e9571d26f8840f556b24ec03.tar.gz
checkasm: Explicitly declare function prototypes
Now we no longer have to rely on function pointers intentionally declared without specified argument types. This makes it easier to support functions with floating point parameters or return values as well as functions returning 64-bit values on 32-bit architectures. It also avoids having to explicitly cast strides to ptrdiff_t for example.
Diffstat (limited to 'tests/checkasm/h264qpel.c')
-rw-r--r--tests/checkasm/h264qpel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/checkasm/h264qpel.c b/tests/checkasm/h264qpel.c
index 63b9a517a8..fb7a1db62d 100644
--- a/tests/checkasm/h264qpel.c
+++ b/tests/checkasm/h264qpel.c
@@ -55,6 +55,7 @@ void checkasm_check_h264qpel(void)
LOCAL_ALIGNED_16(uint8_t, dst1, [BUF_SIZE]);
H264QpelContext h;
int op, bit_depth, i, j;
+ declare_func(void, uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
for (op = 0; op < 2; op++) {
qpel_mc_func (*tab)[16] = op ? h.avg_h264_qpel_pixels_tab : h.put_h264_qpel_pixels_tab;
@@ -67,11 +68,11 @@ void checkasm_check_h264qpel(void)
for (j = 0; j < 16; j++)
if (check_func(tab[i][j], "%s_h264_qpel_%d_mc%d%d_%d", op_name, size, j & 3, j >> 2, bit_depth)) {
randomize_buffers();
- call_ref(dst0, src0, (ptrdiff_t)size * SIZEOF_PIXEL);
- call_new(dst1, src1, (ptrdiff_t)size * SIZEOF_PIXEL);
+ call_ref(dst0, src0, size * SIZEOF_PIXEL);
+ call_new(dst1, src1, size * SIZEOF_PIXEL);
if (memcmp(buf0, buf1, BUF_SIZE) || memcmp(dst0, dst1, BUF_SIZE))
fail();
- bench_new(dst1, src1, (ptrdiff_t)size * SIZEOF_PIXEL);
+ bench_new(dst1, src1, size * SIZEOF_PIXEL);
}
}
}