ref: 6d363223dc979c393217c86eda54848531d69b9e
parent: 99307bf33d25d8ca3c0a6b6ce51883936de37047
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Thu Sep 5 13:03:46 EDT 2019
Remove luma width check in fguv_32x32xn This would affect the output in samples with an odd width and horizontal chroma subsampling. The check does not exist in libaom, and might cause mismatches. This causes issues in the sample from #210, which uses super-resolution and has odd width. To work around this, make super-resolution's resize() always write an even number of pixels. This should not interfere with SIMD in the future.
--- a/src/film_grain_tmpl.c
+++ b/src/film_grain_tmpl.c
@@ -346,7 +346,7 @@
const int ly = y << sy; \
const pixel *const luma = luma_row + ly * PXSTRIDE(luma_stride) + lx; \
pixel avg = luma[0]; \
- if (sx && lx + 1 < pw) \
+ if (sx) \
avg = (avg + luma[1] + 1) >> 1; \
const pixel *const src = src_row + (y) * PXSTRIDE(stride) + (bx + (x)); \
pixel *const dst = dst_row + (y) * PXSTRIDE(stride) + (bx + (x)); \
--- a/src/mc_tmpl.c
+++ b/src/mc_tmpl.c
@@ -905,6 +905,7 @@
src_x += mx >> 14;
mx &= 0x3fff;
}
+ if (dst_w & 1) dst[dst_w] = dst[dst_w - 1];
dst += PXSTRIDE(dst_stride);
src += PXSTRIDE(src_stride);