Optimize loop restoration filter
While there is no cdef and no superres, we can write an optimized loop
restoration filter. This patch removes the operations to save boundary
lines for each 64x64 processing unit. During setup and restore of the
stripe boundary, we only need to save and restore 1 line from above
and 1 line from below. The boundaries buffer is not used.
(TODO: not allocate memory for boundaries buffer in this case.)
This change doesn't cause bitstream change. Test results verified that.
Change-Id: I26588154fd8de79c094f91a86a512586c10e1876
diff --git a/av1/encoder/pickrst.c b/av1/encoder/pickrst.c
index 8f938c8..f41a473 100644
--- a/av1/encoder/pickrst.c
+++ b/av1/encoder/pickrst.c
@@ -157,12 +157,15 @@
const int highbd = cm->use_highbitdepth;
const YV12_BUFFER_CONFIG *fts = cm->frame_to_show;
+ // TODO(yunqing): For now, only use optimized LR filter in decoder. Can be
+ // also used in encoder.
+ int opt = 0;
av1_loop_restoration_filter_unit(
limits, rui, &rsi->boundaries, &rlbs, tile_rect, rsc->tile_stripe0,
is_uv && cm->subsampling_x, is_uv && cm->subsampling_y, highbd, bit_depth,
fts->buffers[plane], fts->strides[is_uv], rsc->dst->buffers[plane],
- rsc->dst->strides[is_uv], cm->rst_tmpbuf);
+ rsc->dst->strides[is_uv], cm->rst_tmpbuf, opt);
return sse_restoration_unit(limits, rsc->src, rsc->dst, plane, highbd);
}