diff --git a/tests/mts_tests.c b/tests/mts_tests.c index b417aa35..61f9fb2c 100644 --- a/tests/mts_tests.c +++ b/tests/mts_tests.c @@ -158,6 +158,7 @@ TEST dct(void) { char testname[100]; for (int blocksize = 0; blocksize < NUM_SIZES; blocksize++) { + size_t size = 1 << (LCU_MIN_LOG_W + blocksize); for (int trafo = 0; trafo < NUM_TRANSFORM; trafo++) { sprintf(testname, "Block: %d x %d, trafo: %d", 1 << (LCU_MIN_LOG_W + blocksize), 1 << (LCU_MIN_LOG_W + blocksize), trafo); cu_info_t tu; @@ -172,8 +173,13 @@ TEST dct(void) test_env.tested_func(UVG_BIT_DEPTH, COLOR_Y, &tu, 1 << (LCU_MIN_LOG_W + blocksize), 1 << (LCU_MIN_LOG_W + blocksize), buf, test_result, UVG_MTS_BOTH); - for (int i = 0; i < LCU_WIDTH * LCU_WIDTH; ++i) { - ASSERT_EQm(testname, test_result[i], dct_result[trafo][blocksize][i]); + for (int y = 0; y < size; ++y) { + if (y>= 16) break; + for (int x = 0; x < size; ++x) { + if (x >= 16) break; + int i = y * size + x; + ASSERT_EQm(testname, test_result[i], dct_result[trafo][blocksize][i]); + } } //fprintf(stderr, "PASS: %s\r\n", testname); }