diff options
author | Debargha Mukherjee <debargha@google.com> | 2016-06-09 12:58:27 -0700 |
---|---|---|
committer | Debargha Mukherjee <debargha@google.com> | 2016-06-09 12:58:27 -0700 |
commit | 697bcef677df1ebe00424daf92675a6431177c9f (patch) | |
tree | 6294b2c3f570969a7649a200318ad5e67002f4c8 /vp10/common | |
parent | 5aeadbb4f62cb10b50722c383b47556c89fc9a07 (diff) | |
download | libvpx-697bcef677df1ebe00424daf92675a6431177c9f.tar libvpx-697bcef677df1ebe00424daf92675a6431177c9f.tar.gz libvpx-697bcef677df1ebe00424daf92675a6431177c9f.tar.bz2 libvpx-697bcef677df1ebe00424daf92675a6431177c9f.zip |
Add a couple of missing WRAPLOW checks
To make coefficient checking consistent with the VP9 spec sections
8.7.1.6 and 8.7.1.1.
Change-Id: I92e38e89a41d1e482317bb478c48ffa608d2d6ee
Diffstat (limited to 'vp10/common')
-rw-r--r-- | vp10/common/vp10_inv_txfm.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/vp10/common/vp10_inv_txfm.c b/vp10/common/vp10_inv_txfm.c index 00110f30b..c31275e6f 100644 --- a/vp10/common/vp10_inv_txfm.c +++ b/vp10/common/vp10_inv_txfm.c @@ -56,10 +56,10 @@ void vp10_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { c1 = e1 - c1; a1 -= b1; d1 += c1; - dest[stride * 0] = clip_pixel_add(dest[stride * 0], a1); - dest[stride * 1] = clip_pixel_add(dest[stride * 1], b1); - dest[stride * 2] = clip_pixel_add(dest[stride * 2], c1); - dest[stride * 3] = clip_pixel_add(dest[stride * 3], d1); + dest[stride * 0] = clip_pixel_add(dest[stride * 0], WRAPLOW(a1)); + dest[stride * 1] = clip_pixel_add(dest[stride * 1], WRAPLOW(b1)); + dest[stride * 2] = clip_pixel_add(dest[stride * 2], WRAPLOW(c1)); + dest[stride * 3] = clip_pixel_add(dest[stride * 3], WRAPLOW(d1)); ip++; dest++; @@ -268,7 +268,7 @@ void vp10_iadst4_c(const tran_low_t *input, tran_low_t *output) { s4 = sinpi_1_9 * x2; s5 = sinpi_2_9 * x3; s6 = sinpi_4_9 * x3; - s7 = x0 - x2 + x3; + s7 = WRAPLOW(x0 - x2 + x3); s0 = s0 + s3 + s5; s1 = s1 - s4 - s6; @@ -1290,11 +1290,14 @@ void vp10_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, c1 = e1 - c1; a1 -= b1; d1 += c1; - dest[stride * 0] = highbd_clip_pixel_add(dest[stride * 0], a1, bd); - dest[stride * 1] = highbd_clip_pixel_add(dest[stride * 1], b1, bd); - dest[stride * 2] = highbd_clip_pixel_add(dest[stride * 2], c1, bd); - dest[stride * 3] = highbd_clip_pixel_add(dest[stride * 3], d1, bd); - + dest[stride * 0] = highbd_clip_pixel_add(dest[stride * 0], + HIGHBD_WRAPLOW(a1, bd), bd); + dest[stride * 1] = highbd_clip_pixel_add(dest[stride * 1], + HIGHBD_WRAPLOW(b1, bd), bd); + dest[stride * 2] = highbd_clip_pixel_add(dest[stride * 2], + HIGHBD_WRAPLOW(c1, bd), bd); + dest[stride * 3] = highbd_clip_pixel_add(dest[stride * 3], + HIGHBD_WRAPLOW(d1, bd), bd); ip++; dest++; } @@ -1510,7 +1513,7 @@ void vp10_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd) { s4 = sinpi_1_9 * x2; s5 = sinpi_2_9 * x3; s6 = sinpi_4_9 * x3; - s7 = (tran_high_t)(x0 - x2 + x3); + s7 = (tran_high_t)HIGHBD_WRAPLOW(x0 - x2 + x3, bd); s0 = s0 + s3 + s5; s1 = s1 - s4 - s6; |