add new experiment loopfiltering_across_tiles_ext
based on the latest discussion in the HW working group about how loop
filter should be integrated with tiles, the following decisions have been
made:
1. two seperated flages should be added for
loop_filter_across_tiles_enabled for horizontal tile boundary and
vertical tile boundary.
2. encoder and decoder should only check these two flags to determine
whether loop filtering (including deblocking, CDEF and loop restoration)
should cross tile boundaries (vertical and/or horizontal) or not
regardless the horitontal depepdent tile flag.
This change list implemented the support for two seperated
loop_filter_across_tiles_enabled flags for vertical and horizontal tile
boundaries. The new experiment is disabled as default before it is
adopted.
Change-Id: I814377947517f5419c08b004a3b71b950d01eadd
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 9f596c1..ed809ed 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2838,8 +2838,17 @@
#endif // CONFIG_EXT_TILE
#if CONFIG_LOOPFILTERING_ACROSS_TILES
+#if CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+ if (cm->tile_cols > 1) {
+ aom_wb_write_bit(wb, cm->loop_filter_across_tiles_v_enabled);
+ }
+ if (cm->tile_rows > 1) {
+ aom_wb_write_bit(wb, cm->loop_filter_across_tiles_h_enabled);
+ }
+#else
if (cm->tile_cols * cm->tile_rows > 1)
aom_wb_write_bit(wb, cm->loop_filter_across_tiles_enabled);
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
}
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 2ac3b37..1253882 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3389,9 +3389,15 @@
#endif
#if CONFIG_LOOPFILTERING_ACROSS_TILES
+#if CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+ if (!cm->loop_filter_across_tiles_v_enabled ||
+ !cm->loop_filter_across_tiles_h_enabled)
+ av1_setup_across_tile_boundary_info(cm, tile_info);
+#else
if (!cm->loop_filter_across_tiles_enabled)
av1_setup_across_tile_boundary_info(cm, tile_info);
-#endif
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
av1_crc_calculator_init(&td->mb.tx_rd_record.crc_calculator, 24, 0x5D6DCB);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index f7bd121..9b89e2b 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1016,8 +1016,15 @@
#endif
#if CONFIG_LOOPFILTERING_ACROSS_TILES
+#if CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+ cm->loop_filter_across_tiles_v_enabled =
+ cpi->oxcf.loop_filter_across_tiles_v_enabled;
+ cm->loop_filter_across_tiles_h_enabled =
+ cpi->oxcf.loop_filter_across_tiles_h_enabled;
+#else
cm->loop_filter_across_tiles_enabled =
cpi->oxcf.loop_filter_across_tiles_enabled;
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
}
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index f84485e..1761b9a 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -265,7 +265,12 @@
int dependent_horz_tiles;
#endif
#if CONFIG_LOOPFILTERING_ACROSS_TILES
+#if CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+ int loop_filter_across_tiles_v_enabled;
+ int loop_filter_across_tiles_h_enabled;
+#else
int loop_filter_across_tiles_enabled;
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
int max_threads;
diff --git a/av1/encoder/pickrst.c b/av1/encoder/pickrst.c
index 37b0f1a..2a643c3 100644
--- a/av1/encoder/pickrst.c
+++ b/av1/encoder/pickrst.c
@@ -184,9 +184,14 @@
#if CONFIG_STRIPED_LOOP_RESTORATION
&rsi->boundaries, &rlbs, tile_rect, rsc->tile_stripe0,
#if CONFIG_LOOPFILTERING_ACROSS_TILES
+#if CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+ cm->loop_filter_across_tiles_v_enabled,
+ cm->loop_filter_across_tiles_h_enabled,
+#else
cm->loop_filter_across_tiles_enabled,
-#endif
-#endif
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES_EXT
+#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
+#endif // CONFIG_STRIPED_LOOP_RESTORATION
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);