aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStone Chen <chen.stonechen@gmail.com>2024-05-28 15:09:02 -0400
committerNuo Mi <nuomi2021@gmail.com>2024-05-29 21:35:34 +0800
commitd82c5035558730f0d1f2e5aec66df6d0db7f4e6f (patch)
treeb59ec4e758bc8cb6540131e04d37602f40edd39c
parent55e9c758f07de6f40489a2fc5f2b35ab368329f0 (diff)
downloadffmpeg-d82c5035558730f0d1f2e5aec66df6d0db7f4e6f.tar.gz
tests/checkasm/vvc_mc: for SAD, only test valid subblock sizes
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that 8x16, 16x8, and 16x16 are the only allowed sizes. This changes check_vvc_sad() to only test and benchmark those sizes.
-rw-r--r--tests/checkasm/vvc_mc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c
index 1e889e2cff..09cac82edb 100644
--- a/tests/checkasm/vvc_mc.c
+++ b/tests/checkasm/vvc_mc.c
@@ -337,11 +337,12 @@ static void check_vvc_sad(void)
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 h = 8; h <= 16; h *= 2) {
+ for (int w = 8; w <= 16; 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)) {
+ if(w * h >= 128) {
+ if(check_func(c.inter.sad, "sad_%dx%d", w, h)) {
int result0;
int result1;
@@ -350,13 +351,14 @@ static void check_vvc_sad(void)
if (result1 != result0)
fail();
- if(w == h && offx == 0 && offy == 0)
+ if(offx == 0 && offy == 0)
bench_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h);
+ }
}
}
}
}
- }
+ }
report("sad");
}