fix mismatch when obu and loop_restoration are both enabled
Change-Id: Ib1ec44f6276b78543296e7dae2f4f8d1b6dc303f
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index c0c1dba..fab8888 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -5167,6 +5167,13 @@
#if CONFIG_ANS
mode_bc.size = 1 << cpi->common.ans_window_size_log2;
#endif // CONFIG_ANS
+#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, dst + total_size);
write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
#if !CONFIG_LV_MAP