Add new experiment: frame_context_signaling.
This stores frame contexts alongside a reference frame, and always
uses the frame in reference slot 0 (LAST_FRAME) as the source of
the frame context.
The encoder could then reorder reference frames as to control
which frame context is used, however currently it does not.
Low Latency AWCY result:
PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000
-0.1438 | 0.4161 | N/A | 0.0386 | -0.0281 | 0.0453 | 0.2514
https://arewecompressedyet.com/?job=before-frame-context-signaling%402017-06-07T23%3A20%3A49.473Z&job=after-frame-context-signaling%402017-06-07T23%3A21%3A36.117Z
Change-Id: I4f6f9b12cb403573efbf9e5c3077d62f5dedc467
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 94b7f74..cb56c34 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -5527,14 +5527,22 @@
// Reset all frame contexts.
for (i = 0; i < FRAME_CONTEXTS; ++i) cm->frame_contexts[i] = *cm->fc;
} else if (cm->reset_frame_context == RESET_FRAME_CONTEXT_CURRENT) {
+#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
+ // Reset the frame context of the first specified ref frame.
+ if (cm->frame_refs[0].idx >= 0) {
+ cm->frame_contexts[cm->frame_refs[0].idx] = *cm->fc;
+ }
+#else
// Reset only the frame context specified in the frame header.
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
+#endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING
}
// prev_mip will only be allocated in encoder.
if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode)
memset(cm->prev_mip, 0,
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
-
+#if !CONFIG_NO_FRAME_CONTEXT_SIGNALING
cm->frame_context_idx = 0;
+#endif // !CONFIG_NO_FRAME_CONTEXT_SIGNALING
}