Expose av1_loop_restoration_filter_unit in restoration.h
This patch also does a certain amount of rejigging for loop
restoration coefficients, grouping the information for a given
restoration unit into a structure called RestorationUnitInfo. The end
result is to completely dispense with the RestorationInternal
structure.
The copy_tile functions in restoration.c, together with those
functions that operate on a single stripe, have been changed so that
they take pointers to the top-left corner of the area on which they
should work, together with a width and height.
The same isn't true of av1_loop_restoration_filter_unit, which still
takes pointers to the top-left of the tile. This is because you
actually need the absolute position in the tile in order to do striped
loop restoration properly.
Change-Id: I768c182cd15c9b2d6cfabb5ffca697cd2a3ff9e1
diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c
index a7a2c5c..0bd26a7 100644
--- a/av1/common/alloccommon.c
+++ b/av1/common/alloccommon.c
@@ -162,8 +162,9 @@
int buf_size = num_stripes * 2 * stride;
uint8_t *above_buf, *below_buf;
- aom_free(cm->rst_info[p].stripe_boundary_above);
- aom_free(cm->rst_info[p].stripe_boundary_below);
+ RestorationStripeBoundaries *boundaries = &cm->rst_info[p].boundaries;
+ aom_free(boundaries->stripe_boundary_above);
+ aom_free(boundaries->stripe_boundary_below);
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) buf_size = buf_size * 2;
@@ -172,9 +173,9 @@
(uint8_t *)aom_memalign(1 << align_bits, buf_size));
CHECK_MEM_ERROR(cm, below_buf,
(uint8_t *)aom_memalign(1 << align_bits, buf_size));
- cm->rst_info[p].stripe_boundary_above = above_buf;
- cm->rst_info[p].stripe_boundary_below = below_buf;
- cm->rst_info[p].stripe_boundary_stride = stride;
+ boundaries->stripe_boundary_above = above_buf;
+ boundaries->stripe_boundary_below = below_buf;
+ boundaries->stripe_boundary_stride = stride;
}
#endif // CONFIG_STRIPED_LOOP_RESTORATION
}