You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
tests/checkasm/hpeldsp: Use instruction-set independent height
Otherwise the benchmark numbers are incomparable. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -86,10 +86,16 @@ void checkasm_check_hpeldsp(void)
|
||||
size_t dst_offset = (rnd() % (MAX_BLOCK_SIZE / blocksize)) * blocksize;
|
||||
size_t src_offset = rnd() % MAX_BLOCK_SIZE;
|
||||
ptrdiff_t stride = (rnd() % (MAX_STRIDE / blocksize) + 1) * blocksize;
|
||||
int h = (rnd() % (MAX_HEIGHT / h_mult) + 1) * h_mult;
|
||||
const uint8_t *src0 = srcbuf0 + src_offset, *src1 = srcbuf1 + src_offset;
|
||||
uint8_t *dst0 = dstbuf0 + dst_offset, *dst1 = dstbuf1 + dst_offset;
|
||||
|
||||
// Always use the same height for each test, so that comparisons of benchmarks
|
||||
// from different instruction sets are meaningful.
|
||||
static int saved_heights[FF_ARRAY_ELEMS(tests)][4][4];
|
||||
int h = saved_heights[i][j][dxy];
|
||||
if (!h)
|
||||
saved_heights[i][j][dxy] = h = (rnd() % (MAX_HEIGHT / h_mult) + 1) * h_mult;
|
||||
|
||||
if (rnd() & 1) {
|
||||
// Flip stride.
|
||||
dst1 += (h - 1) * stride;
|
||||
|
Reference in New Issue
Block a user