ref: d18bd0d7a090109af552db32e23a607b8b63e8b7
parent: 8a015fd0f546734f42e7ac8a1046bcef4a712964
author: Ronald S. Bultje <[email protected]>
date: Mon Sep 24 05:16:04 EDT 2018
Fix stride in ac buffer from 32 to width in padding. Fixes mismatch in issue #14.
--- a/include/common/dump.h
+++ b/include/common/dump.h
@@ -72,4 +72,15 @@
}
}
+static inline void ac_dump(const int16_t *buf, int w, int h, const char *what)
+{
+ printf("%s\n", what);
+ while (h--) {
+ for (int x = 0; x < w; x++)
+ printf(" %03d", buf[x]);
+ buf += w;
+ printf("\n");
+ }
+}
+
#endif /* __DAV1D_COMMON_DUMP_H__ */
--- a/src/ipred.c
+++ b/src/ipred.c
@@ -800,7 +800,7 @@
ypx += PXSTRIDE(stride) << ss_ver;
}
for (; y < height; y++) {
- memcpy(ac, &ac[-32], width * sizeof(*ac));
+ memcpy(ac, &ac[-width], width * sizeof(*ac));
ac += width;
}
--- a/src/recon.c
+++ b/src/recon.c
@@ -884,6 +884,7 @@
b->cfl_alpha,
cbh4 * 4);
if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
+ ac_dump(ac, 4*cbw4, 4*cbh4, "ac");
hex_dump(uv_dst[0], stride, cbw4 * 4, cbh4 * 4, "u-cfl-pred");
hex_dump(uv_dst[1], stride, cbw4 * 4, cbh4 * 4, "v-cfl-pred");
}