Commit d18bd0d7 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Fix stride in ac buffer from 32 to width in padding.

Fixes mismatch in issue #14.
parent 8a015fd0
......@@ -72,4 +72,15 @@ static inline void coef_dump(const coef *buf, const int w, const int h,
}
}
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__ */
......@@ -800,7 +800,7 @@ cfl_ac_c(int16_t *ac, const pixel *ypx, const ptrdiff_t stride,
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;
}
......
......@@ -884,6 +884,7 @@ void bytefn(recon_b_intra)(Dav1dTileContext *const t, const enum BlockSize bs,
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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment