diff options
author | James Zern <jzern@google.com> | 2017-03-20 20:24:30 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2017-03-24 20:45:44 -0700 |
commit | aefc1088a229c750d4da7b533045d7974d83e651 (patch) | |
tree | 2bae662d0fe2031b04e5c7eaea638c7134a063e1 /vpx_dsp | |
parent | 67cde46dd75ca273e96f64bd77e2c94fd406ece8 (diff) | |
download | libvpx-aefc1088a229c750d4da7b533045d7974d83e651.tar libvpx-aefc1088a229c750d4da7b533045d7974d83e651.tar.gz libvpx-aefc1088a229c750d4da7b533045d7974d83e651.tar.bz2 libvpx-aefc1088a229c750d4da7b533045d7974d83e651.zip |
intrapred: sync highbd_d135_predictor w/d135_
previously:
05437805f intrapred/d135: flatten border results before storing
BUG=webm:1316
Change-Id: I3b8bd89117ad7f2f4560b57f7c148da781e86f85
Diffstat (limited to 'vpx_dsp')
-rw-r--r-- | vpx_dsp/intrapred.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/vpx_dsp/intrapred.c b/vpx_dsp/intrapred.c index fe04f4ec9..9e2048ebf 100644 --- a/vpx_dsp/intrapred.c +++ b/vpx_dsp/intrapred.c @@ -547,19 +547,30 @@ static INLINE void highbd_d117_predictor(uint16_t *dst, ptrdiff_t stride, static INLINE void highbd_d135_predictor(uint16_t *dst, ptrdiff_t stride, int bs, const uint16_t *above, const uint16_t *left, int bd) { - int r, c; + int i; +#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 7 + // silence a spurious -Warray-bounds warning, possibly related to: + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 + uint16_t border[69]; +#else + uint16_t border[32 + 32 - 1]; // outer border from bottom-left to top-right +#endif (void)bd; - dst[0] = AVG3(left[0], above[-1], above[0]); - for (c = 1; c < bs; c++) dst[c] = AVG3(above[c - 2], above[c - 1], above[c]); - dst[stride] = AVG3(above[-1], left[0], left[1]); - for (r = 2; r < bs; ++r) - dst[r * stride] = AVG3(left[r - 2], left[r - 1], left[r]); + // dst(bs, bs - 2)[0], i.e., border starting at bottom-left + for (i = 0; i < bs - 2; ++i) { + border[i] = AVG3(left[bs - 3 - i], left[bs - 2 - i], left[bs - 1 - i]); + } + border[bs - 2] = AVG3(above[-1], left[0], left[1]); + border[bs - 1] = AVG3(left[0], above[-1], above[0]); + border[bs - 0] = AVG3(above[-1], above[0], above[1]); + // dst[0][2, size), i.e., remaining top border ascending + for (i = 0; i < bs - 2; ++i) { + border[bs + 1 + i] = AVG3(above[i], above[i + 1], above[i + 2]); + } - dst += stride; - for (r = 1; r < bs; ++r) { - for (c = 1; c < bs; c++) dst[c] = dst[-stride + c - 1]; - dst += stride; + for (i = 0; i < bs; ++i) { + memcpy(dst + i * stride, border + bs - 1 - i, bs * sizeof(dst[0])); } } |