29#define MAX_BLOCK_SIZE 16
33#define BUF_SIZE ((MAX_HEIGHT - 1) * MAX_STRIDE + MAX_BLOCK_SIZE)
38#define INPUT_BUF_SIZE (MAX_HEIGHT * MAX_STRIDE + MAX_BLOCK_SIZE + 1 + (MAX_BLOCK_SIZE - 1))
40#define randomize_buffers(buf0, buf1) \
42 static_assert(sizeof(buf0) == sizeof(buf1), "Incompatible buffers"); \
43 static_assert(!(sizeof(buf0) % 4), "Tail handling needed"); \
44 static_assert(sizeof(buf0[0]) == 1 && sizeof(buf1[0]) == 1, \
45 "Pointer arithmetic needs to be adapted"); \
46 for (size_t k = 0; k < sizeof(buf0); k += 4) { \
48 AV_WN32A(buf0 + k, r); \
49 AV_WN32A(buf1 + k, r); \
64 unsigned nb_blocksizes;
66#define TEST(NAME, NB) { .name = #NAME, .offset = offsetof(HpelDSPContext, NAME), .nb_blocksizes = NB }
67 TEST(put_pixels_tab, 4),
68 TEST(avg_pixels_tab, 4),
69 TEST(put_no_rnd_pixels_tab, 2),
70 TEST(avg_no_rnd_pixels_tab, 1),
87 const unsigned h_mult = blocksize <= 4 ? 2 : 4;
95 for (
unsigned j = 0; j <
tests[
i].nb_blocksizes; ++j) {
98 for (
unsigned dxy = 0; dxy < 4; ++dxy) {
104 const uint8_t *
src0 = srcbuf0 + src_offset, *
src1 = srcbuf1 + src_offset;
105 uint8_t *dst0 = dstbuf0 + dst_offset, *dst1 = dstbuf1 + dst_offset;
107 int h = heights[
i][j][dxy];
124 if (memcmp(srcbuf0, srcbuf1,
sizeof(srcbuf0)) || memcmp(dstbuf0, dstbuf1,
sizeof(dstbuf0)))
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Libavcodec external API header.
#define i(width, name, range_min, range_max)
static const struct @213162273235257122266207155164174051374107224106 func_tab[]
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Average and put pixel Widths can be 16, 8, 4 or 2.
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
Utility Preprocessor macros.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
#define FF_ARRAY_ELEMS(a)
void checkasm_check_hpeldsp(void)
#define randomize_buffers(buf0, buf1)