ref: 697bcef677df1ebe00424daf92675a6431177c9f
parent: 5aeadbb4f62cb10b50722c383b47556c89fc9a07
author: Debargha Mukherjee <[email protected]>
date: Thu Jun 9 08:58:27 EDT 2016
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
--- a/vp10/common/vp10_inv_txfm.c
+++ b/vp10/common/vp10_inv_txfm.c
@@ -56,10 +56,10 @@
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 @@
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 @@
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 @@
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;
--- a/vpx_dsp/inv_txfm.c
+++ b/vpx_dsp/inv_txfm.c
@@ -56,10 +56,10 @@
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++;
@@ -266,7 +266,7 @@
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;
@@ -1309,10 +1309,14 @@
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++;
@@ -1529,7 +1533,7 @@
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;