aboutsummaryrefslogtreecommitdiff
path: root/tests/block_utils.cc
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2021-11-07 08:50:18 -0500
committerBoyuan Yang <byang@debian.org>2021-11-07 08:50:18 -0500
commit320ef65362608ee1148c299d8d5d7618af34e470 (patch)
treec47911c219d1e35b8b0771e9e0176eff0e0d08ec /tests/block_utils.cc
parent2381d803c76105f44717d75f089ec37f51e5cfe4 (diff)
downloadlibgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.gz
libgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.bz2
libgav1-320ef65362608ee1148c299d8d5d7618af34e470.zip
New upstream version 0.17.0
Diffstat (limited to 'tests/block_utils.cc')
-rw-r--r--tests/block_utils.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/block_utils.cc b/tests/block_utils.cc
index 96833a2..07337c4 100644
--- a/tests/block_utils.cc
+++ b/tests/block_utils.cc
@@ -23,6 +23,7 @@ namespace libgav1 {
namespace test_utils {
namespace {
+#define LIBGAV1_DEBUG_FORMAT_CODE "x"
template <typename Pixel>
void PrintBlockDiff(const Pixel* block1, const Pixel* block2, int width,
int height, int stride1, int stride2,
@@ -35,15 +36,17 @@ void PrintBlockDiff(const Pixel* block1, const Pixel* block2, int width,
for (int x = 0; x < print_width; ++x) {
if (x >= width) {
if (block1[x] == block2[x]) {
- printf("[%*d] ", field_width, block1[x]);
+ printf("[%*" LIBGAV1_DEBUG_FORMAT_CODE "] ", field_width, block1[x]);
} else {
- printf("[*%*d] ", field_width - 1, block1[x]);
+ printf("[*%*" LIBGAV1_DEBUG_FORMAT_CODE "] ", field_width - 1,
+ block1[x]);
}
} else {
if (block1[x] == block2[x]) {
- printf("%*d ", field_width, block1[x]);
+ printf("%*" LIBGAV1_DEBUG_FORMAT_CODE " ", field_width, block1[x]);
} else {
- printf("*%*d ", field_width - 1, block1[x]);
+ printf("*%*" LIBGAV1_DEBUG_FORMAT_CODE " ", field_width - 1,
+ block1[x]);
}
}
}
@@ -52,6 +55,7 @@ void PrintBlockDiff(const Pixel* block1, const Pixel* block2, int width,
block2 += stride2;
}
}
+#undef LIBGAV1_DEBUG_FORMAT_CODE
} // namespace