[NORMATIVE] No loop restoration for lossless frame
Disable reading (and writing) these parameters from (and to) the bitstream.
BUG=aomedia:1428
Change-Id: I1d2142af3677cdcb34c212cfb54c6c342bc5897b
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 931f30d..c9d4e39 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1906,6 +1906,7 @@
static void encode_restoration_mode(AV1_COMMON *cm,
struct aom_write_bit_buffer *wb) {
+ assert(!cm->all_lossless);
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
const int num_planes = av1_num_planes(cm);
int all_none = 1, chroma_none = 1;
@@ -2072,6 +2073,8 @@
RestorationType frame_rtype = rsi->frame_restoration_type;
if (frame_rtype == RESTORE_NONE) return;
+ assert(!cm->all_lossless);
+
const int wiener_win = (plane > 0) ? WIENER_WIN_CHROMA : WIENER_WIN;
WienerInfo *wiener_info = xd->wiener_info + plane;
SgrprojInfo *sgrproj_info = xd->sgrproj_info + plane;
@@ -3340,8 +3343,9 @@
}
if (!cm->all_lossless) {
encode_cdef(cm, wb);
+ encode_restoration_mode(cm, wb);
}
- encode_restoration_mode(cm, wb);
+
write_tx_mode(cm, &cm->tx_mode, wb);
if (cpi->allow_comp_inter_inter) {