mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[tests] Fix mts_tests.c to not consider irrelevant elements
This commit is contained in:
parent
69c1c948fa
commit
079d7e9a1a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue