History

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.

Stone Chen committed 2 years ago

Commit d82c5031 parent 55e9c751 file · +7 −5Browse files

Unified · Split

tests/checkasm/vvc_mc.c+7−5
@@ -337,11 +337,12 @@ static void check_vvc_sad(void) · 336 unmodified lines
337 memset(src1, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4 * sizeof(uint16_t));337 memset(src1, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4 * sizeof(uint16_t));
338 338
339 randomize_pixels(src0, src1, MAX_CTU_SIZE * MAX_CTU_SIZE * 4);339 randomize_pixels(src0, src1, MAX_CTU_SIZE * MAX_CTU_SIZE * 4);
340 for (int h = 8; h <= MAX_CTU_SIZE; h *= 2) {340 for (int h = 8; h <= 16; h *= 2) {
341 for (int w = 8; w <= MAX_CTU_SIZE; w *= 2) {341 for (int w = 8; w <= 16; w *= 2) {
342 for(int offy = 0; offy <= 4; offy++) {342 for(int offy = 0; offy <= 4; offy++) {
343 for(int offx = 0; offx <= 4; offx++) {343 for(int offx = 0; offx <= 4; offx++) {
344 if(check_func(c.inter.sad, "sad_%dx%d", w, h)) {344 if(w * h >= 128) {
345 if(check_func(c.inter.sad, "sad_%dx%d", w, h)) {
345 int result0;346 int result0;
346 int result1;347 int result1;
347 348
@@ -350,13 +351,14 @@ static void check_vvc_sad(void) · 2 unmodified lines
350 351
351 if (result1 != result0)352 if (result1 != result0)
352 fail();353 fail();
353 if(w == h && offx == 0 && offy == 0)354 if(offx == 0 && offy == 0)
354 bench_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h);355 bench_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h);
356 }
355 }357 }
356 }358 }
357 }359 }
358 }360 }
359 }361 }
360 362
361 report("sad");363 report("sad");
362}364}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t