[NORMATIVE] Unify context design for single ref
The CL makes the context design for single reference frame coding the
same as that for the compound reference frame coding. There are 3
contexts designed for each of the binary symbols for the single
reference frame scenario, and the designed contexts simply rely on the
counts of the references used in the neighboring two blocks.
Once this CL is merged, the coding of the reference frames, regardless
of single prediction or compound prediction, will all follow the same
context design pattern for all the binary symbols. The design logic is
much simpler and the lines of code for each binary symbol context
identification are reduced by 80%.
Further, this CL has obtained a small coding gain for 30 frames with
the default coding tools:
lowres: avg_psnr -0.015%; ovr_psnr -0.021%; ssim -0.002%
midres: avg_psnr -0.108%; ovr_psnr -0.139%; ssim -0.135%
BUG=aomedia:1402
BUG=aomedia:973
Change-Id: Ia72a1d18e85ac3a05308675b60b95f80f2219c46
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 02335df..e44d97b 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -579,8 +579,7 @@
#define INTRA_INTER_CONTEXTS 4
#define COMP_INTER_CONTEXTS 5
-#define COMP_REF_CONTEXTS 3
-#define REF_CONTEXTS 5
+#define REF_CONTEXTS 3
#if CONFIG_EXT_COMP_REFS
#define COMP_REF_TYPE_CONTEXTS 5