Fix highbd striped loop restoration bug
The "data8_bl" variable is a uint8_t* and will be scaled up
later (with REAL_PTR) if it's pointing to highbd data. Don't scale up
the x offset.
Change-Id: I03e2ce8861e25e3a603e8f0ba2c8af585e08b9c5
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index ed2c2d9..0373f2b 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -315,8 +315,7 @@
// (which might happen at the bottom of a restoration unit).
const int stripe_bottom = limits->v_start + stripe_height;
const int below_buf_y = RESTORATION_CTX_VERT * frame_stripe;
- uint8_t *data8_bl =
- data8 + (data_x0 << use_highbd) + stripe_bottom * data_stride;
+ uint8_t *data8_bl = data8 + data_x0 + stripe_bottom * data_stride;
for (int i = 0; i < RESTORATION_BORDER; ++i) {
const int buf_row = below_buf_y + AOMMIN(i, RESTORATION_CTX_VERT - 1);
@@ -365,8 +364,7 @@
}
const int stripe_bottom = limits->v_start + stripe_height;
- uint8_t *data8_bl =
- data8 + (data_x0 << use_highbd) + stripe_bottom * data_stride;
+ uint8_t *data8_bl = data8 + data_x0 + stripe_bottom * data_stride;
for (int i = 0; i < RESTORATION_BORDER; ++i) {
if (stripe_bottom + i >= limits->v_end + RESTORATION_BORDER) break;