Reset restoration info at start of large_scale_tiles too
Since commit 6c54521, loop restoration coefficients are written inside
tiles data. Since the Wiener and Sgrproj coefficients are
delta-encoded (and tiles must be decoded independently) this means we
must call set_default_wiener and set_default_sgrproj at the start of
encoding and decoding each tile. That patch missed doing so when
encoding large scale tiles (part of the EXT_TILE experiment). This
adds the missing lines.
Note: This caused AV1/AVxEncoderThreadLSTest.EncoderResultTest/3 to
fail with --enable-ext-tile, which is tracked in bug
917. Unfortunately, there's something else going wrong that
means the test is still failing: I'll address that in a separate
patch.
BUG=aomedia:917
Change-Id: I5bd8e9d7f7a2abd60779abf170185a1c5b090474
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 2294ab6..b71ba8b 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3422,6 +3422,13 @@
#if CONFIG_ANS
mode_bc.size = 1 << cpi->common.ans_window_size_log2;
#endif
+#if CONFIG_LOOP_RESTORATION
+ for (int p = 0; p < MAX_MB_PLANE; ++p) {
+ set_default_wiener(cpi->td.mb.e_mbd.wiener_info + p);
+ set_default_sgrproj(cpi->td.mb.e_mbd.sgrproj_info + p);
+ }
+#endif // CONFIG_LOOP_RESTORATION
+
aom_start_encode(&mode_bc, buf->data + data_offset);
write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
assert(tok == tok_end);