|
|
@ -45,7 +45,7 @@ static const int sizes[] = { 2, 4, 8, 16, 32, 64, 128 }; |
|
|
|
#define randomize_buffers(buf0, buf1, size, mask) \ |
|
|
|
#define randomize_buffers(buf0, buf1, size, mask) \ |
|
|
|
do { \
|
|
|
|
do { \
|
|
|
|
int k; \
|
|
|
|
int k; \
|
|
|
|
for (k = 0; k < size; k += 4) { \
|
|
|
|
for (k = 0; k < size; k += 4 / sizeof(*buf0)) { \
|
|
|
|
uint32_t r = rnd() & mask; \
|
|
|
|
uint32_t r = rnd() & mask; \
|
|
|
|
AV_WN32A(buf0 + k, r); \
|
|
|
|
AV_WN32A(buf0 + k, r); \
|
|
|
|
AV_WN32A(buf1 + k, r); \
|
|
|
|
AV_WN32A(buf1 + k, r); \
|
|
|
@ -324,8 +324,46 @@ static void check_avg(void) |
|
|
|
report("avg"); |
|
|
|
report("avg"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void check_vvc_sad(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
const int bit_depth = 10; |
|
|
|
|
|
|
|
VVCDSPContext c; |
|
|
|
|
|
|
|
LOCAL_ALIGNED_32(uint16_t, src0, [MAX_CTU_SIZE * MAX_CTU_SIZE * 4]); |
|
|
|
|
|
|
|
LOCAL_ALIGNED_32(uint16_t, src1, [MAX_CTU_SIZE * MAX_CTU_SIZE * 4]); |
|
|
|
|
|
|
|
declare_func(int, const int16_t *src0, const int16_t *src1, int dx, int dy, int block_w, int block_h); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ff_vvc_dsp_init(&c, bit_depth); |
|
|
|
|
|
|
|
memset(src0, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4 * sizeof(uint16_t)); |
|
|
|
|
|
|
|
memset(src1, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4 * sizeof(uint16_t)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
randomize_pixels(src0, src1, MAX_CTU_SIZE * MAX_CTU_SIZE * 4); |
|
|
|
|
|
|
|
for (int h = 8; h <= MAX_CTU_SIZE; h *= 2) { |
|
|
|
|
|
|
|
for (int w = 8; w <= MAX_CTU_SIZE; w *= 2) { |
|
|
|
|
|
|
|
for(int offy = 0; offy <= 4; offy++) { |
|
|
|
|
|
|
|
for(int offx = 0; offx <= 4; offx++) { |
|
|
|
|
|
|
|
if(check_func(c.inter.sad, "sad_%dx%d", w, h)) { |
|
|
|
|
|
|
|
int result0; |
|
|
|
|
|
|
|
int result1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result0 = call_ref(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); |
|
|
|
|
|
|
|
result1 = call_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result1 != result0) |
|
|
|
|
|
|
|
fail(); |
|
|
|
|
|
|
|
if(w == h && offx == 0 && offy == 0) |
|
|
|
|
|
|
|
bench_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
report("sad"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void checkasm_check_vvc_mc(void) |
|
|
|
void checkasm_check_vvc_mc(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
check_vvc_sad(); |
|
|
|
check_put_vvc_luma(); |
|
|
|
check_put_vvc_luma(); |
|
|
|
check_put_vvc_luma_uni(); |
|
|
|
check_put_vvc_luma_uni(); |
|
|
|
check_put_vvc_chroma(); |
|
|
|
check_put_vvc_chroma(); |
|
|
|