Change the reference frame priority order
The new order is based on reference frame selection frequency calculated
from encoding stats. This only affects the first several frames in a KF
group. On lowres, there is 0.2% compression gains when encoding 16
frames(speed 1).
STATS_CHANGED
Change-Id: I7b83e91a34e9e79771361b7e8f082da9e4712f8f
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index 27ce6c4..156cf11 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -213,8 +213,8 @@
static int get_ref_frame_flags(const AV1_COMP *const cpi) {
static const MV_REFERENCE_FRAME
ref_frame_priority_order[INTER_REFS_PER_FRAME] = {
- LAST_FRAME, ALTREF_FRAME, LAST2_FRAME, LAST3_FRAME,
- GOLDEN_FRAME, BWDREF_FRAME, ALTREF2_FRAME,
+ LAST_FRAME, ALTREF_FRAME, BWDREF_FRAME, GOLDEN_FRAME,
+ ALTREF2_FRAME, LAST2_FRAME, LAST3_FRAME,
};
const AV1_COMMON *const cm = &cpi->common;
const RefCntBuffer *ref_frames[INTER_REFS_PER_FRAME];